Today I found my Hyper-V server event log filled with below Error:
The Integration Services Setup Disk image could not be updated: The process cannot access the file because it is being used by another process.
The error is clear related to Hyper-V Integration Component Services (ICS).
What is Hyper-V Integration Services?
As a quick overview, Hyper-V Integration Services is a suite of 6 components designed to enhance the performance of a virtual machine’s (child partition) guest operating system.
The Integration Services are installed as user mode components in the guest OS, and are implemented in the following services:
- Hyper-V Heartbeat Service (vmicheartbeat)
- Hyper-V Guest Shutdown Service (vmicshutdown)
- Hyper-V Data Exchange Service (vmickvpexchange)
- Hyper-V Time Synchronization Service (vmictimesync)
- Hyper-V Remote Desktop Virtualization Service (vmicrdv)
- Hyper-V Volume Shadow-Copy Requestor Service (vmicvss)
In Windows Server 2012 R2, a new integration service has been added, Guest services. Guest services enables the copying of files to a Virtual Machine using WMI APIs or using the new Copy-VMFile PowerShell cmdlet.
For more information please refer to the following article Hyper-V Overview.
Ok, so having this explained, why this error occurred at first?
I remember that I upgraded my Hosts from Hyper-V 2012 to 2012 R2, and then I live migrated different VMs using Cross-Version Live Migration.
Now I upgraded the Integration Services, but I forgot to dismount the ISO image which is located by default on the parent partition under the following path C:\Windows\System32\vmguest.iso
As rule of thumb, after the migration you should upgrade the Integration Services for all Virtual Machines, and by default the latest IC version is shipped with Windows Server 2012 R2 at the moment is V6.3.9600.16384, but I had many VMs running older Operating Systems as well.
Let’s check which VM still has the ISO image attached:
You can use Hyper-V Manager UI and check each VM separately, but it’s a long process…
Our friend is PowerShell that makes our life easier so let’s check which VM still has the ISO mounted:
As you can see, I still have many Virtual Machines with the ISO mounted.
Next, let’s sort only the VMs with their DvdMediaType equal to ISO:
Now it’s time to dismount the ISO…
The command will connect to the VM which has the ISO attached and eject the DVD/ISO from the VM.
And finally view the result again by typing the command Get-VMDvdDrive and confirm the result:
Let’s now see our Event Viewer… and here you go: The Integration Services Setup Disk image was successfully updated now.
Note: According to Microsoft you should remove unused devices such as the CD/DVD-ROM and COM port, or disconnect their media for improving the performance of the guest OS.
Hope this helps if you encounter the same issue.
Enjoy your Weekend!