Blog from Saravanan Arumugam

Let us talk about Technologies

Monthly Archives: September 2011

The process cannot access the file because it is being accessed by another process


When I tried to create a virtual machine in Hyper-V with Windows 7, I received this message when I pressed Action –> Start.

Exception

[Window Title]
Virtual Machine Connection

[Main Instruction]
Capturing the drive failed.

[Content]
Failed to add device ‘Microsoft Virtual CD/DVD Disk’.

Failed to open attachment ‘D:’. Error: ‘The process cannot access the file because it is being used by another process.’

[Expanded Information]
‘Windows Server 2’ failed to add device ‘Microsoft Virtual CD/DVD Disk’. (Virtual machine ID 534773DB-D548-44E0-8C5F-5094801065A8)

‘Windows Server 2’: Failed to open attachment ‘D:’. Error: ‘The process cannot access the file because it is being used by another process.’ (0x80070020). (Virtual machine ID 534773DB-D548-44E0-8C5F-5094801065A8)

[^] Hide details  [Close]

This message didn’t allow me to install windows 7 with the DVD.

Solution

I used DVD drive to install windows server 2008 in a different virtual machine. So the DVD drive was captured by the other virtual machine. So I connected to the Windows Server 2008 virtual machine. Selected Media Menu –> DVD drive –> Uncapture D:.

This action released the DVD drive.

Now I went back to the virtual machine of Windows 7. Selected Media –> DVD drive –> Capture D:.

This action captured the DVD drive for this virtual machine and started the installation of Windows 7.