Debian Guest reset network adapter after snapshot restore ignores config on VirtualBox

by Sim   Last Updated May 18, 2018 14:01 PM

I am using a virtualbox 5.2 on Ubuntu 14.04 as a host and a Debian 9 as a guest.

I have configured my Debian guest system to have a static IP (192.168.56.101) with a host-only adapter (192.168.56.1/24) no dhcp.

This configuration is written into /etc/network/interfaces.d/setup on the guest and works perfectly when the machine is booted up regulary. The host can ping the guest and the guest can ping the host.

However, if I take a snapshot and later on restore that snapshot the adapter is reset and the configuration ignored. The host cannot ping the machine and the machine cannot ping the host. A /etc/init.d/network restart fixes the problem. Consequently it cannot be the adapter or the host but must be an issue on the guest.

The reset itself is not the main issue, but the blatant disregard of the configuration is the problem after the reset. I am fine to wait a few seconds but I cannot log into the machine by hand as the machine is run headless in production.

How can I force the adherence to the network configuration file after an adapter reset?

The only related dmesg entry on the guest are:

[...] pcnet32 0000:00:03.0 enp0s3: link down
[...] pcnet32 0000:00:03.0 enp0s3: link up, 100Mbps, full-duplex


Related Questions






Ping VM from host impossible (bridge connection)

Updated September 14, 2015 05:00 AM