Daniel's Tech Blog

Cloud Computing, Cloud Native & Kubernetes

Windows Server TP2 Build 10074 – VM import fails

Today I experienced an odd behavior of the Windows Server Technical Preview 2 Build 10074. Because of my storage capacity I am running some of my VMs on local data HDDs in my Hyper-V hosts. After a complete new installation of the Hyper-V hosts with Technical Preview 2 I was unable to import my VMs residing on the local data HDDs. VMs running in HA mode on the Hyper-V Failover Cluster were not affected.

IMP01

I got the following error message when I tried to import the VM.

An unexpected error occurred: The media is write protected. (0x80070013)

I checked the local data HDDs with diskpart and I checked the permissions. Everything was fine. After some research on the internet and no outcome I tried a workaround. First rename the original folder of the VM. My VM is called MIG-01. So I renamed the folder to MIG-01-old and then created a new VM via Hyper-V Manager with the same name without VHDs. You have not to define anything else except the VM generation.

IMP02IMP03

In the next step I copied the GUID of the new created VM and renamed my original files as you can see in the screenshots. Then I copied the renamed files into the folder of the new created VM and replaced them with the original ones.

IMP04

Afterwards I copied the VHD files into the subfolder of the new VM. Next step is to restart the Hyper-V Virtual Machine Management service.

IMP05

Now I can check my VM settings and fix them like the network configuration or the path to the VHDs.

IMP06

Afterwards the VM can be started. If you are running into the same error message as myself then you have to set the permissions on the VHDs with icacls.

IMP07IMP08

The workaround is some handcraft but the VMs will run afterwards.

If you have experienced the same behavior with TP2  please leave me a message on Twitter (@neumanndaniel). I’m currently not aware of if this is a bug or had something to do with my configuration files.

WordPress Cookie Notice by Real Cookie Banner