1

On VirtualBox virtual machine there is a host-only network adapter with the following configuration:

$ VBoxManage list hostonlyifs
Name:            vboxnet0
GUID:            786f6276-656e-4074-8000-0a0027000000
DHCP:            Disabled
IPAddress:       192.168.56.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType:      Ethernet
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet0

When host machine is started the interface doesn't exist on the host machine, then it appears on the system as soon as the network settings have been opened on the VirtualBox UI, but the interface is not up:

$ ifconfig -a
vboxnet0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 0a:00:27:00:00:00  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

If the virtual machine is launched, the interface becomes up and everything works. The problem is that I want to use this interface without virtual machine running. For example, start Apache webserver binded to IP address of this interface. Is it possible? How can I achieve it?

To be more specific, I need a set of console commands to get this virtual interface up, running and having all the settings (including IPv4 address) from the VirtualBox configuration.

Host machine is Debian Testing x86, VirtualBox 5.0.4 from Debian repository.

Your Answer

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

Browse other questions tagged or ask your own question.