Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can create an adapter via VBoxManage hostonlyif create but how to I configure it with DHCP, it doesn't seem like VBoxManage hostonlyif ipconfig take any arguments for 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.


VBoxManage hostonlyif       ipconfig <name>
                            [--dhcp |
                            --ip<ipv4> [--netmask<ipv4> (def:] |
                            --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
share|improve this question
up vote 12 down vote accepted

Seems like I can do this:

VBoxManage hostonlyif create
VBoxManage hostonlyif ipconfig vboxnet0 --ip
VBoxManage dhcpserver add --ifname vboxnet0 --ip --netmask --lowerip --upperip
VBoxManage dhcpserver modify --ifname vboxnet0 --enable
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .