Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 854
  • Last Modified:

Moving hyper v vm storage

I have a vm that needs its virtual hard disks moved to a new partition. I took a snapshot several weeks ago, after first creating the vm ,and I can see in the vm settings that the "myvmD" partition of the vm is using a .avhd file  
I started the migration this morning. I first deleted the snapshot in hyper v manager.  Then shut it down the vm. I am now copying the VHd files to the new partition.
Do I still need the avhd files, or did the data merge when I deleted the snapshot?

To summarize, source files on the host server are:
E:\myvmC.vhd
E:\myvmC-333444-ddffff-10ddsg.avhd
E:\myvmD.vhd
E:\myvmD-46ffeee-41ccd-cd123.avhd

And I am moving them to the C:\ partition on the host server.

After moving the data, I will point the hard drive in the vm settings to the moved VHd or avhd file.
0
AE_JB
Asked:
AE_JB
  • 3
  • 3
3 Solutions
 
Svet PaperovIT ManagerCommented:
Sorry for the news, but I am afraid you may not be able to move those machines.

First, after deleting a snapshot the AVHD should merge itself into the VHD file and disappear. If you still have AVHD files that means the merge has not been completed. This could happen if there is no enough free disk space on the host.

Second, the path to VHD is hard codded in the AVHD file and you cannot just move them from one location to another.

Third, the supported method of moving a VM from one host to another is by using Export and Import functions of Hyper-V Manager.

The way of moving a VDH file from one location to another on the same host and then changing the settings of the VM works if there is no snapshots.

I would try that:
1. Export the VM: if it still has a valid snapshot it will export both VHD and AVHD files.
2. Rename the original VM.
3. Make sure you have corrected the default location for the VHD files
4. Re-Import the VM and select the checkbox to copy all data files while importing, otherwise the wizard will not move the VHD and AVHD files into the proper location on the host.
5. Power up the imported VM. Optionally, disconnect the Virtual NIC from the virtual switch, especially if you are dealing with domain members.
Next step will depends on the result of the last power up.
0
 
AE_JBAuthor Commented:
Ok. The vm that needs to be moved is the DC, and every time I take the DC offline for more than an hour, I loose connection to the host server in hyper v manager. It says "cannot connect to the RPC service on the computer VMHOST. Make sure your RPC service is running".
Is this going to cause issues during the export?
0
 
AE_JBAuthor Commented:
Update. The hyper v manager now shows that the VHd is the source for the data drive. So the snapshot removal was successful. I have copied the VHds to the correct partition.
For redundancy, can I use a new virtual machine, attach the two partitions, and then start that vm?  I will not power on the source vm, I would want to leave that unchanged if possible.

A plain English explanation of how I got into this mess is that I did a PtoV migration last week and left the VHd files of the two partitions on the external storage because I did not have 4 hours to transfer the data to the host server. I took a snapshot of the system after setup was done.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Svet PaperovIT ManagerCommented:
If you login locally on the Hyper-V server with a local admin account, you should not have that issue.

I would recommend that you promote a physical server as DC if you want to keep the Hyper-V server part of the domain.
0
 
Svet PaperovIT ManagerCommented:
Update:  This is good news. No, I wouldn’t do it because it is DC. Attach the new VHD to the VM instead but disconnect the NIC.
0
 
AE_JBAuthor Commented:
I created a new vm before I heard back from you and now have a new issue, perhaps you can be of assistance,
http://www.experts-exchange.com/Software/Microsoft_Applications/Virtual_Server/Q_28400764.html
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now