Regular IT guy

Just a guy – talking about technology … in an uncomplicated way.

Menu
  • Contact
  • Speaking
Menu

How to fix Ubuntu network hangs on client Hyper-V

Posted on February 11, 2016 by Rick
Share on Social Media
twitter facebook linkedin email

I find I need to run various Linux distros on my work machine for my new job on the Azure Compute team. While I still run Windows 10 as my primary OS (sorry – app compat reasons) – I have installed Hyper-V Client so I can at least switch out to whatever distro I need for the task at hand. Things were working great for the most part, until i left the machine running in the background or for extended periods of time.

Then it started to happen.  The network stack would say it’s up and happy, but nothing was working.  This happened a lot while i was using Ubuntu and I couldn’t figure it out.  After some back and forth with some networking guys and virtualization guys – the following was suggested…

  1. Disable network-manager:  It just doesn’t play well with virtualized NICs and the way most hypervisors work. Sure it’s supposed to make wireless easier and things like that, but it’s not required in a virtualized environment where your network stack isn’t going to be changing on ya.
    • $ sudo systemctl stop NetworkManager.service
    • $ sudo systemctl disable NetworkManager.service
  2. Disable avahi: it seemed to be the main culprit that was causing the freezing / wonkieness of the network stack.
    • $ sudo apt-get purge -y avahi-daemon avahi-utils libavahi-core7 libavahi-gobject0
  3. don’t forget to edit your /etc/network/interfaces file to include the necessary info to enable DHCP on eth0
    • $ sudo -H gedit /etc/network/interfaces
    • edit or put in an eth0 reference I added in the following and saved the file.
      • auto eth0
      • iface eth0 inet dhcp
    • after saving and exiting the file, restart your network
      • sudo /etc/init.d/networking restart
  4. Install the updated virtual kernel, Linux tools and cloud tools (if they aren’t already present).
    • $ sudo apt-get install linux-virtual linux-tools-virtual linux-cloud-tools-virtual

Low and behold – things are now rock solid. I can leave my Ubuntu running all day, switch in and out of the VM without any issues and I know my networking stack will be in a consistent state without having to restart the VM.

Am I missing anything? Anyone else working with Ubuntu (client) inside of a windows client implementation of Hyper-V?

Share on Social Media
twitter facebook linkedin email

Follow me on Social Media
twitter facebook youtube linkedin

Recent Posts

  • Moved over to Dreamhost
  • Microsoft Azure HPC goodness
  • Whats new in Azure VM Images
  • Whats New in Azure Managed Disks
  • What up with Azure File Sync

Recent Comments

  1. Farhan Sattar on New Year, New Responsibilities
  2. Frederi on Tuesdays with Corey: Seasons Greetings and Until Next Year!
  3. Leon Han on HowTo: Bootable USB Stick for OS Install
  4. Frederi on Tuesdays with Corey: Seasons Greetings and Until Next Year!
  5. Rick Claus [rclaus@MSFT] on Tuesdays with Corey: Seasons Greetings and Until Next Year!

Archives

  • January 2023
  • March 2019
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • March 2014
  • February 2014
  • December 2013
  • October 2013
  • August 2013
  • July 2013
  • March 2013
  • February 2013
  • December 2012
  • November 2012
  • September 2012
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • June 2011
  • May 2011

Categories

  • Azure
  • Azure 4 ServerHuggers
  • Azure IT Pro News Roundup
  • CH9 Videos
  • CloudOpsAdvocacy
  • Comments
  • Community
  • Debunking Azure Myths
  • Events
  • Helpful Tech
  • How To
  • interviews
  • Microsoft
  • Networking
  • PatchAndSwitch
  • Personal
  • Presentations
  • Security
  • Server
  • TechEd
  • Troubleshooting
  • Tuesdays with Corey
  • Uncategorized
  • Windows 8
  • Windows Server 8
  • Workarounds

©2023 Regular IT guy