Page 1 of 1

No network connection via vboxnet hostonly adapter

Posted: 4. Jun 2014, 07:45
by michaelknoll
Hello!

In our current project, we are using two network adapters in a virtual machine to connect the machine to the network. The user downloads an .ova file from our website and the network configuration in the .ovf file looks as follows:

Code: Select all

                    <Adapter slot="0" enabled="true" MACAddress="080027073FC8" cable="true" speed="0" type="82540EM">
                        <DisabledModes>
                            <InternalNetwork name="intnet"/>
                        </DisabledModes>
                        <NAT>
                            <DNS pass-domain="true" use-proxy="true" use-host-resolver="true"/>
                            <Alias logging="false" proxy-only="false" use-same-ports="false"/>
                            <Forwarding name="ssh" proto="1" hostip="127.0.0.1" hostport="2200" guestport="22"/>
                        </NAT>
                    </Adapter>
                    <Adapter slot="1" enabled="true" MACAddress="080027B6573A" cable="true" speed="0" type="82540EM">
                        <DisabledModes>
                            <NAT>
                                <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
                                <Alias logging="false" proxy-only="false" use-same-ports="false"/>
                            </NAT>
                            <InternalNetwork name="intnet"/>
                        </DisabledModes>
                        <HostOnlyInterface name="vboxnet0"/>
                    </Adapter>
We have several problems now:

1. AFAIK the name of the virtual adapter for the host-only adapter (vboxnet0) needs to be a fixed value. What happens if the user already has a vboxnet adapter in his VirtualBox and the existing one has another IP configuration?

2. The names of the host-only adapters seem to be completely different on Windows hosts. Is the name of the adapter relevant in any way or is it only the IP address that matters?

3. On some hosts we have the problem that after creating the vboxnet host-only adapter (217.29.33.1 in our case), there is no connection from the virtual machine (217.29.33.33) to the host. In most cases, it helped to remove all (existing) host-only adapters, add them again and restart VirtualBox. Is there a better way to fix this issue, maybe using the VBoxManage commands?

I would appreciate any kind of help!

Thanks a lot,

Michael

Re: No network connection via vboxnet hostonly adapter

Posted: 4. Jun 2014, 12:26
by noteirak
michaelknoll wrote:1. AFAIK the name of the virtual adapter for the host-only adapter (vboxnet0) needs to be a fixed value. What happens if the user already has a vboxnet adapter in his VirtualBox and the existing one has another IP configuration?
Then it will use the existing one and the network will not work
michaelknoll wrote:2. The names of the host-only adapters seem to be completely different on Windows hosts. Is the name of the adapter relevant in any way or is it only the IP address that matters?
The name is relevant, not the IP address
michaelknoll wrote:3. On some hosts we have the problem that after creating the vboxnet host-only adapter (217.29.33.1 in our case), there is no connection from the virtual machine (217.29.33.33) to the host. In most cases, it helped to remove all (existing) host-only adapters, add them again and restart VirtualBox. Is there a better way to fix this issue, maybe using the VBoxManage commands?
You can script that procedure using a batch or bash file using vboxmanage to remove & add interfaces, yes.

Re: No network connection via vboxnet hostonly adapter

Posted: 5. Jun 2014, 12:28
by michaelknoll
Thanks for your response!
You can script that procedure using a batch or bash file using vboxmanage to remove & add interfaces, yes.
Is it (normally) necessary to restart VirtualBox when a new host-only adapter is added? It's clear to me that the virtual machine needs to be restarted eventually when a new host-only adapter is added - but what about VirtualBox itself?

Thanks for any hints!

Re: No network connection via vboxnet hostonly adapter

Posted: 5. Jun 2014, 15:39
by noteirak
no restart is needed, changes are directly taken into account.