Hyper-V machine failed to change state (Solved)

If you are using Hyper-V supervisor to create and manage virtual machines, it is likely to come across this error sooner or later: “Machine failed to change state”. It sometimes appear as “Failed to start”.

The full error message:

The application encountered an error while attempting to change the state of the machine A.

The machine A failed to change state.

Machine failed to change state

Are you receiving “The unsigned image’s hash is not allowed (DB)” error while using Hyper-V? Here is how to fix it.

How to solve “machine failed to change state” error

There are a few possible causes of this issue:

  • There is not enough disk space to start the machine
  • The network adapter of the machine has an issue (Source)
  • An antivirus software is blocking access to VM files (Source)

In order to determine the root cause:

  1. Go to Event Viewer
  2. Expand “Applications and Services Logs > Microsoft > Windows > Hyper-V-Worker”
  3. Click “Admin”. Then, check the events marked as “Error”

In my case, the issue was the disk space.

Event ID 3326:

The Virtual Machine ‘Windows Server 2016 Standard (Base Copy)’ failed to start because there is not enough disk space. The system was unable to create the memory contents file on ‘C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines\ABC.VMRS’ with the size of 4096 MB. Set the path to a disk with more storage space or delete unnecessary files from the disk and try again.

Event ID 12030:

‘Windows Server 2016 Standard (Base Copy)’ failed to start. (Virtual machine ID ABC)

Event ID 3050:

The description for Event ID 3050 from source Microsoft-Windows-Hyper-V-Worker cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: Windows Server 2016 Standard (Base Copy)
0x80070070

The locale specific resource for the desired message is not present

Machine failed to change state (Event Viewer)

If you have an error with the event ID 3326, freeing some space in your system should solve the problem. Additionally, you can remove the saved state to free up some space.

Machine failed to change state (saved state)
Delete the saved state of the virtual machine

Looking for ways to clone your Hyper-V virtual machines? Check this post out!

How to clone a virtual machine in Hyper-V?

If you are using virtualization, you might have asked this question at some point in your journey: How to clone a virtual machine in Hyper-V? Cloning a virtual machine in Hyper-V is slightly different than cloning them in VMware or VirtualBox. It is technically possible but you need to use a detour. There is no “Clone” button you can click on.

Virtual machines help us saving time and reducing costs especially in enterprise companies where hundreds of servers and client machines are required to run daily operations. In order to create a farm with numerous virtual machines, you need to find an easy way to create them in bulk which is where cloning comes in the picture.

Some hypervisors such as VMware and VirtualBox provides a cloning feature out-of-box. In general, you can clone a machine by right clicking on it and selecting “clone”. The approach is a little different in Hyper-V but it is still possible to clone virtual machines.

Clone a virtual machine in Hyper-V

There are two ways to clone a virtual machine in Hyper-V:

  1. Export/import a virtual machine
  2. Copy the virtual disk and create a new machine with the copied disk

Follow the steps below to clone a virtual machine by the ways mentioned above.

Export/import a virtual machine

  1. Right click the virtual machine. Select “Export”.
  2. Specify a folder to export virtual disk and configuration files. Click “Export”.
  3. In Hyper-V Manager, select “Import Virtual Machine”
  4. Follow the wizard to import the machine you have exported in the first step.
  5. Select “Copy the virtual machine (create a new unique ID)” in “Choose Import Type” window.
  6. In “Choose Folders to Store Virtual Hard Disks” window, select a folder that is different than the folder in which your original virtual machine. Hyper-V doesn’t allow storing both source and copied virtual machines in the same folder.
Clone virtual machine in Hyper-V
Cloned machine should be in a different folder than the source machine

Copy the virtual disk and create a new machine

  1. Go to the folder that Hyper-V stores the virtual machines (by default: C:\Users\Public\Documents\Hyper-V\Virtual hard disks).
  2. Copy and paste the virtual disk that is used by the virtual machine you want to clone.
  3. In Hyper-V Manager, select “New -> Virtual Machine”.
  4. In “Connect Virtual Hard Disk” window, select “Use an existing virtual hard disk” and specify the folder of the virtual disk you copied in step 2.
  5. Complete the wizard by following the instructions.
    Are you getting “The unsigned image’s hash is not allowed (DB)” error message while creating a new virtual machine? Check this post out.
Clone virtual machine in Hyper-V
Use an existing virtual hard disk to create a new virtual machine

Note: If you want to add the cloned virtual machines to the same Active Directory domain as source virtual machine, make sure to use Sysprep.exe. It changes the unique identifiers of the virtual machine such as SID, computer name, and IP address.

Thanks Tech Journey for this comprehensive post.

Solved: “The unsigned image’s hash is not allowed (DB)”

In this post, we will go through steps to fix “The unsigned image’s hash is not allowed” error that shows up in certain situations while using Hyper-V.

Virtualization enables IT professionals to easily build and scale client and server environments. The software called “hypervisor” is used to create and manage virtual machines. Hyper-V (formerly known as Windows Server Virtualization) is one of the most popular and robust hypervisors.

Once you create a virtual machine (VM), you will need to install an operating system (OS) in order to use it for any business or personal purpose. Operating systems can be installed in virtual machines via network, ISO file or DVD drive.

When I tried to install Windows Server 2008 R2 into an Hyper-V virtual machine via an ISO file, I received the following error message in booting screen.

3. SCSI DVD (0,1) The unsigned image’s hash is not allowed (DB)

Hyper-V error: The unsigned image's hash is not allowed. Solve "unsigned image's hash is not allowed" error
Hyper-V error: “The unsigned image’s hash is not allowed”

The solution for “The unsigned image’s hash is not allowed” error

The reason Hyper-V doesn’t allow you to use the selected ISO is that it doesn’t trust this file. In order to prevent the system being hijacked at boot time, Hyper-V allows using only the authorized images (ISOs).

Good news! Even though your ISO is not authorized, you can still use it. You need to disable “Secure Boot” by following the steps below.

  1. In Hyper-V Manager, make sure the virtual machine is turned off
  2. Select the virtual machine. Right click and select “Settings”
  3. Go to “Security”
  4. Uncheck “Enable Secure Boot”
  5. Restart the machine and try to boot from the ISO file
"Enable Secure Boot" option. Solve "unsigned image's hash is not allowed" error
“Enable Secure Boot” option

After successfully installing OS, I would recommend enabling the “Secure Boot” back.

Trying to downgrade OS or disable “Secure Boot” in UEFI? Check this post out.

Thank you for this StackExchange post.