Windows Server TechCenter >
Windows Server Forums
>
Windows Server 2008 R2 Hyper-V
>
Cannot import R2 virtual machines!
Cannot import R2 virtual machines!
- Our situation:
We have a set of lab virtual machines created and developed on an R2 server, these include 2008 R2 and 2003 R2 virtual machines. We also use shared base VHDs that are stored in C:\BaseVM.
We have exported these VMs and have deleted the base VHD that gets included with each exported VM in the Virtual Hard Disk folder, to save disk space.
Our Issue:
When we go to import these VMs on the same R2 server OR on another R2 server we get the following error:
A server error occurred while attempting to import the virtual machine.
Import failed. Unable to find required file or folder "C:\VMs\LabVM\DCServer\Virtual Hard Disk\W2K8R2Base.vhd."
We have the base VHD (W2K8R2Base.vhd) in C:\BaseVM on the new server, which is the same as the old server.
If I inspect the DCServer.VHD it says the parent disk is C:\BaseVM\W2K8R2Base.vhd and if I look in the config.xml file or the exp files they show C:\BaseVM\W2K8R2Base.vhd as well. It looks like the R2 import virtual machine wizard is insisting that the base VHD be in the exported location.
The only way to import the VMs is to move the base VHD into the Virtual Hard Disk folder, import the VM, move the base VHD out and then inspect the imported VM's VHD and reconnect it to the base in the C:\BaseVM folder.
This worked just fine in Hyper-V R1. Well, we could import the VM anyway, and then we still had to reconnect the VHD to the base. But it would import.
Does anyone know a fix?
Is this an expected behavior in R2?
Thanks in advance!
Thom Foreman MCSE, Security, Exchange
Answers
- Hi Thom,
Yes this is an expected behaviour.
You will not be able to import the VM through UI when you delete the base VHD in the Virtual Hard Disks folder. You can use our new Import API to import this VM pointing to the base VHD on the host.Information about the new APIs:
You can refer to example scripts here on using new APIs:
Serdar Sutay [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.- Proposed As Answer bySerdar Sutay [MSFT]OwnerTuesday, October 27, 2009 8:23 PM
- Marked As Answer byVincent HuMSFT, ModeratorWednesday, October 28, 2009 8:07 AM
All Replies
- Hi Thom,
Yes this is an expected behaviour.
You will not be able to import the VM through UI when you delete the base VHD in the Virtual Hard Disks folder. You can use our new Import API to import this VM pointing to the base VHD on the host.Information about the new APIs:
You can refer to example scripts here on using new APIs:
Serdar Sutay [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.- Proposed As Answer bySerdar Sutay [MSFT]OwnerTuesday, October 27, 2009 8:23 PM
- Marked As Answer byVincent HuMSFT, ModeratorWednesday, October 28, 2009 8:07 AM