‘Unnamed VM’ could not initialize… The security ID structure is invalid (0x80070539)

While working on a system recently, I imported an old virtual machine – which then failed to start with this error message: What to do?  Well – thankfully the solution is already documented here: http://support.microsoft.com/kb/2927313/en-us But how did this happen?  And what is going on? Well, Hyper-V allows you to grant access to the virtual… Read more

How to get the best disk performance with Linux on Hyper-V

I was recently reading our documented Best Practices for running Linux on Hyper-V and noticed this section: Use I/O scheduler NOOP for better disk I/O performance. The Linux kernel has four different I/O schedulers to reorder requests with different algorithms. NOOP is a first-in first-out queue that passes the schedule decision to be made by… Read more

What version of Linux Supports what in Hyper-V?

We have been doing a lot of work to increase the functionality of Linux on top of Hyper-V, and we have been contributing the necessary changes directly to the main Linux source.  While this is all good – it has caused confusion for some people as they are trying to figure out which versions of… Read more

Programmatically Detecting when a VM Changes State

Every now and then I get asked how to detect whenever a virtual machine changes state.  Usually, people who ask about this have written some code that periodically queries Hyper-V to see what state different virtual machines are in (stopped, running, etc.).  What they find is that this is not efficient – and it sometimes… Read more

Setting up non-administrative control of Hyper-V through PowerShell–Updated

Yesterday, I told you about how it was now easier to allow a non-administrative user to control Hyper-V.  This is nice – but it does mean that this script that I blogged about 4 years ago no longer works.  Here is a new one: $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent() $myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)   # Get the security principal for the… Read more

Allowing non-Administrators to control Hyper-V–Updated

A long time ago, I did a post about how to allow non-Administrative users to control Hyper-V.  Then I did a post that showed you how to script this whole configuration.  Finally, I did a post that showed you how to setup a “Hyper-V Administrators” group to make the whole process easier. Well, time has… Read more

Looking for Wasted Space inside Virtual Machines

Recently, I tried to update the operating system installed inside of one of my virtual machines.  I quickly received an error message stating that I did not have enough free space available to perform the upgrade.  My immediate thought was that I would need to expand the size of the virtual hard disk – but… Read more

Ubuntu 14.04 in a Generation 2 VM

Recently, Canonical released Ubuntu 14.04.  This is the first Linux release to support running inside of a Generation 2 virtual machine.  To get this working in your environment, you need to have Windows 8.1 or Windows Server 2012 R2 installed.  Then you need to download an installation ISO from http://www.ubuntu.com/download. You can download the Desktop… Read more

Gathering Recent Events for a Specific VM

Imagine this scenario: you login to one of your Hyper-V servers and find that something has gone wrong with a virtual machine.  Maybe the guest operating system is not responding, maybe it is running slower than expected, maybe something else has gone wrong. As you are triaging the problem – you are likely to want… Read more

Listing all the IP Addresses used by VMs

Here is a neat little snippet of PowerShell: Get-VM | ?{$_.State -eq "Running"} |  Get-VMNetworkAdapter | Select VMName, IPAddresses If you run this on a Hyper-V Server it will give you a listing of all the IP addresses that are assigned to running virtual machines: This works whether you are using DHCP or Static IP… Read more