Como posso configurar um servidor DHCP atribuído a uma rede somente host no virtualbox

Como posso configurar um servidor DHCP atribuído a uma rede somente host no virtualbox

Posso criar um adaptador via VBoxManage hostonlyif createmas como configurá-lo com DHCP, não parece VBoxManage hostonlyif ipconfighaver nenhum argumento para DHCP:

Kits-MacBook-Air:media-pop kitsunde$ VBoxManage hostonlyif ipconfig vboxnet0
Oracle VM VirtualBox Command Line Management Interface Version 4.1.16
(C) 2005-2012 Oracle Corporation
All rights reserved.

Usage:

VBoxManage hostonlyif       ipconfig <name>
                            [--dhcp |
                            --ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |
                            --ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]
                            create |
                            remove <name>


Syntax error: Not enough parameters
Kits-MacBook-Air:media-pop kitsunde$ VBoxManage hostonlyif ipconfig vboxnet0 --dhcp
VBoxManage: error: Code NS_ERROR_NOT_IMPLEMENTED (0x80004001) - Not implemented (extended info not available)
Context: "EnableDynamicIpConfig ()" at line 244 of file VBoxManageHostonly.cpp

Responder1

Parece que posso fazer isso:

VBoxManage hostonlyif create
VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1
VBoxManage dhcpserver add --ifname vboxnet0 --ip 192.168.56.1 --netmask 255.255.255.0 --lowerip 192.168.56.100 --upperip 192.168.56.200
VBoxManage dhcpserver modify --ifname vboxnet0 --enable

informação relacionada