6

After upgrade to Ubuntu 15.04, I see the same behavior with VirtualBox and VMWare Workstation. After the system is waked up from suspend, there's neither vboxnet0 nor vmnet8 devices in the output of ifconfig. In the network menu, both virtual devices are marked as not managed.

In order to start the VMWare Workstation network, I have to sudo service vmware restart. Then I see: "Connection Established. You are now connected to vmnet8".

In order to start the VirtualBox network, I go to File -> Preferences -> Network -> Host-Only Networks -> vboxnet0.
Then press OK. I see "Connection Established. You are now connected to vboxnet0".

The question is, how to make virtual networks start automatically? It looks like a systemd issue since I haven't seen anything like that previously.

4
  • 1
    FWIW there's a VirtualBox issue here: virtualbox.org/ticket/13873 Jun 11, 2015 at 12:58
  • I have the same problem as well. I could not find a solution anywhere, and it seems the VirtualBox ticket is not been dealt with. Have you found a solution, by any chance? Jun 26, 2015 at 17:51
  • No, I'm still suffering from this. Jun 29, 2015 at 7:50
  • The same here with Ubuntu 15.04 64 bit and Virtualbox 4.3.26_Ubuntur98988 Sep 8, 2015 at 17:27

3 Answers 3

2

Making it work manually

I have solved this problem typing the following command in a terminal after wake up:

sudo ifconfig vboxnet0 192.168.50.1/24

I'm not really sure if 192.168.50.1 is the VirtualBox default IP, but it's the one that my Virtualbox is using, if yours is using another you have to replace the IP.

Making it work automatically

To make it work automatically while the system wakes up I have created a file in the folder:

/lib/systemd/system-sleep/

The content of that file should be something like this:

#!/bin/sh
ifconfig vboxnet0 192.168.50.1/24

Make the file executable with:

chmod a+x /lib/systemd/system-sleep/name_of_file.sh

Since it's a root file, you'd need to be sudo to create the file, but we don't need to include the sudo in the script.

Hope it's helpful!

NOTE: Just tested on Ubuntu 15.10

0

jjcarrion's answer fixes the network after waking up from sleep, but you can also keep sleep from interfering with the network in the first place, by adding:

[keyfile]
unmanaged-devices=interface-name:vboxnet0

to /etc/NetworkManager/NetworkManager.conf. Tested on 15.10.

0

(Fast way) It is not good but it works.

Go to Virtual Machine Settings > Hardware

And Remove Network Adapter

Then Add new one (Use NAT)

You must log in to answer this question.

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