Woes of Linux Virtualization on Windows 8

Update 2/13/2014

Since this article is still getting a significant number of hits, please see this newer post of mine that walks one through, in my opinion, the most optimal way to set up a Linux VM on Client Hyper-V.


First and foremost, I would like to state that I extensively use the Hyper-V feature included in Windows 8. I enjoy it despite what is going to be said here. Currently I have five virtual machines: Windows 7, Windows Server 2012, CentOS 5.8, Linux Mint 13, and Ubuntu 12.04. The Windows virtual machines, by far, work the best. I can remote desktop into the VM, and it will work flawlessly. The seam between virtual and reality can be so thin that sometimes I will forget what operating system I am using.

On the Linux side, things are not as smooth. Here are some current issues I am fighting.

While Microsoft does officially have a Linux integration kit, it only supports certain distributions such as CentOS and RedHat, and even when installed on supported OSs, I still have mixed feelings. While clock drift is fixed, “mouse” drift has taken its place. Whenever I am using my CentOS installation, I have two mice: one which is Hyper-v’s and the other CentOS’s. Only CentOS’s can interact with CentOS, but Hyper-v’s controls CentOS’s cursor and the problem is that these cursors don’t move with the same speed and inertia, requiring a careful balance to interact with the interface.

I realize that what I am doing may be bleeding edge, and for the most part, it works. However, I hope that in the near future Microsoft will fix the few issues mentioned here and make a great product even better.

Update 6/16/2013

I have found a way to fix the wireless issue! Simply assign a static IP address to the Linux VM! Sure it may be annoying not having DHCP automatically give one, but having wireless is infinitely better than not having wireless.

Update 8/14/2013

Just resolved my issue where I would lose access to my Windows shares. The trick was to first double check that the IP address of my host machine didn’t change. If it did, update correspondingly. Then execute the following bash commands.

sudo umount -l <drive>
sudo mount <drive>

I had to execute umount with the lazy option because I kept getting error with a message “device is busy”.

I also found a workaround to the resolution issue. I’m so excited, I can barely contain myself. I can’t believe it took me this long to figure it out, but the solution is simple. Use SSH and connect via Putty. One apt-get install openssh-server later and a Putty connection, and I’m coding using all the pixels on my laptop. Some might find Putty ugly, but once I set the appearance just right and immerse myself into full screen mode, I wouldn’t want anything else.

Now I can say after all these months of putting up with these problems I ask ask, “Woes of Linux Virtualization on Windows 8? What Woes?”

Update 8/15/2013

I am unsure what I did, but I had to spend the last six hours debugging why I was getting an error message when I had seemingly changed nothing.

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

What was the cause of this problem? I do not know. I can’t imagine it was installing openssh-server, but then again one can’t be so sure. I do; however, know what the solution was, in my case.

I supply my credentials to mount via a file, and in the file, I had to add a workgroup line

username=Nick
password=[redacted]
workgroup=[%USERDOMAIN%]

I also had to use mount.cifs instead of mount -t cifs. I could not tell you why. Pause to check something. I actually can tell you the problem. I use two mounted Window shares and they just happened to have flipped IP addresses, which is probably why that eluded my search because I refer to the shares through their names defined in /etc/hosts and not by their IP addresses. Ridiculous.

Now back to coding.

Update

Sick of these updates yet? I just thought I would drop by and deposit some configurations that ease usage with Putty. Warning, I am new to this method, and basically this is an aggregation of content from stackoverflow

caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c"

Update 8/19/2013

Clock drift still a problem?

sudo apt-get install ntp

That’s it. Now Linux will synchronize the time via the internet.

Comments

If you'd like to leave a comment, please email [email protected]

2017-10-04 - Marc

Interesting how I have many of the same issues you do, like clock and mouse drift, with VMWare Workstation. I don’t think I have dynamic memory enabled, but I think it’s an option.

2017-10-04 - Nick

Hey Marc! If you’ve been having the same problems with VMware, maybe I won’t switch. I was tentatively thinking about switching in the hopes of better Linux support. If what you say is true, I’ll definitely be sticking to Hyper-v!

2017-10-04 - Matt

Not sure whether this is still alive. I thought you may have an idea on this issue - I have been looking for hours but cannot find anything that solves this issue. I have a problem running apt-get (or any other command that requires a download) on Ubuntu 14.04 guest running in Hyper-V (W28K) server. The download always fails. However, the internet connection from the Ubuntu server works fine as I can ping from it successfully and connect into it with SSH or to the Web server it is running. Thanks.