IPV4 network dies in Ubuntu VM


wayner

Recommended Posts

I set up an Ubuntu 16.04 VM in my server a few months ago and every few weeks or so it will have an issue where the IPv4 network seems to disappear.  When this happens I can no longer access the VM via SSH or XRDP (more normal methods) but I can still get in using the noVNC through the web UI.  When I get in I do an ifconfig and I see that the line with the IPv4 info is missing.  Normally I would restart the VM but last time I issued the command "sudo service network-manager restart".  That brought it back.

 

I am currently using a DHCP connection.

 

Anyone have any suggestions on how to fix this?  Should I try a statically assigned IP instead?

Link to comment

Where do I find that info - here is a cut and paste from my xml file - I didn't change anything as I just used the defaults when I built the VM.

 

    <interface type='bridge'>
      <mac address='52:54:00:8f:42:1f'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>

 

Link to comment

Thanks - for now I have set a static IP in the vm by putting an entry in the /etc/network/interfaces file.  When did you start using funky adapter names like enp2s1 rather than eth0?

 

I will give this a while and see if it behaves now.  When you set a static IP in the network config you don't have to change anything in the router do you?  The static Ip that I have set is outside of my HDCP range.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.