Ubuntu 12.04 Server as Hyper-V Guest – Blank Screen Fix


This post is in the category: Guides

Posts here are mostly step-by-step guides on how to replicate something I have set up in the past. Read over my About page to see how I show commands/output and read the disclaimer.


Ubuntu 12.04 does play pretty well as a Hyper-V guest, but not without its quarks. This includes a completly blank screen after the installation is finished. Not to worry though – it’s nothing we can’t fix with a couple tweaks.

These notes are for Hyper-V running on Windows 8 Pro.

Bonus Video

General VM Settings

When creating the VM in Hyper-V, make sure Generation 1 is used.

Network Installations

Skip this section if you install from an ISO image.

I prefer to do network installs with my deployment server, and that can be done with Hyper-V guests, but it needs a little encouragement. First, make sure you select “Install an operating system from a network-based installation server” in the setup wizard. After the VM is created, open up the settings for that VM, and look at the hardware. Note that a Legacy Network Adapter was created instead of a Network Adapter.

The Legacy Network Adapter is required for PXE-booting, but there is a catch. I had a world of trouble getting the Legacy Network Adapter to work after the OS is installed. So after the network installation is complete, the VM has to be shutdown. Remove the Legacy Network Adapter, and add a Network Adapter in its place. It’s important to have a working network connection for the first boot, because…

Blank Screen After Reboot

After the first reboot, you may see a blank screen where the terminal prompt should be. We need to change grub settings to fix this.

Hopefully, this VM was able to connect to the network, because you need to SSH into it. Once you do that, login as root, and follow the below steps.

[root]$ vim /etc/default/grub

Find the below lines, and make sure they are set accordingly. You may have to remove quiet splash from one of the lines.

GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

Next uncomment this line.

GRUB_TERMINAL=console

Save and close the text editor.

Now update the grub images.

[root]$ update-grub

Finally reboot.

[root]$ reboot

When the VM comes back up, you should see the boot progress in the Hyper-V viewer as well as the login prompt once the machine has finished booting.

This entry was posted in Guides and tagged , on by .

About Andrew Wells

I have been developing on the LAMP stack since about 2006. I run Ubuntu XFCE on my desktop and have a history of managing Ubuntu and CentOS servers. I code web applications mostly in PHP but have experience with other languages as well. When I'm not working, I can be found working in my home lab or out snowboarding, hiking, camping, or biking depending on the season.

2 thoughts on “Ubuntu 12.04 Server as Hyper-V Guest – Blank Screen Fix

  1. Roy

    In case SSH is not enabled or networking is not working, pressing on ALT+2 will switch to another terminal session and all the above modifications can be done from there. (Tried on Lubuntu 15.04 Core)

    Reply
  2. Jan S

    Thank you so much for this how-to.
    This solved my problem with my Microsoft Hyper-V 2012 Server and my Ubuntu guest VM.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *