2

I am trying to create VM with the one Bridged interface and one Hostonly interface, but I keep getting an error as the I am not able to attach a device to the hostonly nic. I have done this:

# vboxmanage hostonlyif create
# vboxmanage hostonlyif ipconfig vboxnet0 --ip 10.0.0.10 --netmask 255.255.255.0
# vboxmanage createvm --name "centos604" --register --basefolder /vboxes
# vboxmanage modifyvm "centos604" --memory 512 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 --nic2 hostonly --hostonlyadapter1 vboxnet0 --ostype RedHat_64
# vboxmanage createvdi --filename /vboxes/centos604hdd.vdi --size 10000
# vboxmanage storagectl "centos604" --name "IDE Controller" --add ide"
# vboxmanage storageattach "centos604" --storagectl "IDE Controller"  --port 0 --device 0 --type hdd --medium /vboxes/centos604hdd.vdi 
# vboxmanage storageattach "centos604" --storagectl "IDE Controller"  --port 1 --device 0 --type dvddrive --medium CentOS-6.4-x86_64-minimal.iso 
# vboxmanage startvm
# vboxmanage startvm "centos604" --type headless
Waiting for VM "centos604" to power on...
VBoxManage: error: Nonexistent host networking interface, name '' (VERR_INTERNAL_ERROR)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Console, interface IConsole

And here is the output of my ip:

# ip addr show vboxnet0
15: vboxnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.10/24 brd 10.0.0.255 scope global vboxnet0
    inet6 fe80::800:27ff:fe00:0/64 scope link 
       valid_lft forever preferred_lft forever

This is my error:

Nonexistent host networking interface, name
1
  • :) Ask Ubuntu doesn't work like a forum. Instead of using "SOLVED" we accept answers to tell people we found a solution. See the FAQ and tour pages for more information.
    – Seth
    May 23 '13 at 4:57
4

I have figured out with some trial and error, that the "--hostadapter1" in the command

vboxmanage modifyvm "centos604" --memory 512 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 --nic2 hostonly --hostonlyadapter1 vboxnet0 --ostype RedHat_64

should actually be replaced with the "--hostadapter2"

vboxmanage modifyvm "centos604" --memory 512 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 --nic2 hostonly --hostonlyadapter2 vboxnet0 --ostype RedHat_64

And it works fine.

1
  • Do you mean "--hostonlyadapter1" and "--hostonlyadapter2"? Feb 24 '16 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.