I recently got an error saying failed to change state with error code 32788 on Hyper-V while attempting to power on a particular virtual machine. This could be one of the random issues you may face while managing the Hyper-V environment for a long time. There are several reasons for this problem, let’s analyze each of them.
Below is the screenshot of the error related to this case. It appeared when I tried to power on a virtual machine. With this error, we can’t switch on and use the VM.
Reasons For Error Code 32788 on Hyper-V
The main cause is basically related to the conflict in the virtual machine configuration/settings. Something has changed or missing from the configuration settings which leads to the ‘Hyper-V VM failed to change state’ error. Here are the potential settings you must check for the particular virtual machine that is not powering on.
- The network configuration of the VM
- The ISO file attached to VM
- Low disk space on the volume the VM is stored
- The virtual machine management service is not properly working (or needs restart) on the host computer.
In my example, it was related to the network settings (Virtual switch) conflict. I recently changed the name of the virtual switch on the host server but missed updating this particular virtual machine settings.
How to Fix Failed to Change State Error on Hyper-V?
1) Virtual Machine Network Configuration Error
Open the settings of the virtual machine from the Hyper-V console or cluster.
Go to the Network Adapter settings and verify it is in a good state. You may see the Configuration Error as shown below if this is causing the VM to change the state.
Mismatch or nonexistence of the correct virtual switch name will prevent the virtual machine to start with the Failed to Change State error in Hyper-V. Selecting the correct virtual switch from the drop-down will solve the issue. Make sure you are attaching the right virtual switch on the host server and save the settings. Power on the VM now to see how it works.
2) ISO File Mounted on the VM is Not Available
There could be a possibility that the ISO file mounted to the VM/guest OS is not available at the correct location now. This may prevent the VM to power on and showing failed to change the state error. You might have moved or deleted the ISO file from the original location. In other cases, you might have migrated this VM from a different host where the ISO file path is different.
Since the actual error doesn’t give clear details about it, we need to check the DVD Drive settings of the VM.
Open the virtual machine settings, and click on DVD Drive. You can see the path of the ISO file here.
If you need the ISO file inside the virtual machine, you need to attach the correct file from the correct location. If you don’t want, select the ‘None’ option to boot the VM without an ISO file. The VM should power on without any issues now.
3) Disk Space Issue
The volume/partition which is hosting the VM should have enough disk space. Snapshots, dynamically expanding disk type and maintenance tasks consume space on the Hyper-V host regularly. It is always better to check the disk space immediately when you get an error in starting the virtual machine.
If it is a cluster environment, you can see the disk warning and usage easily. If it is hosted on local disks or partitions, the Windows explorer will give a clear idea of the disk space usage. Either you need to free up some space or extent the volume (increase the disk size) before powering on the Virtual Machine.
4) Check the Virtual Machine Management Service
If none of the above 3 steps helps in solving failed to change state error with code 32788 in Hyper-V, try this 4th step. If the other virtual machines work fine and you can connect them from Hyper-V manager or Cluster manager, probably the Virtual Machine Management (VMM) service is running fine on the host server. But in our case, we can try restarting the service to see whether it helps.
Open the Services console on the server and restart the below service.
NOTE: Restarting the Hyper-V Virtual Machine Management service in the production environment while VMs are working may interrupt the Hyper-V services on the particular host. You must take all precautions while doing the service restart.
Reboot the Hyper-V host server, if the service restart doesn’t help.
We believe one of the solutions will work in solving this issue and start the virtual machine in Hyper-V.