Solved

Moving hyper v vm storage

Posted on 2014-03-29
6
836 Views
Last Modified: 2014-11-12
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
Comment
Question by:AE_JB
  • 3
  • 3
6 Comments
 
LVL 20

Assisted Solution

by:Svet Paperov
Svet Paperov earned 500 total points
ID: 39963861
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
 

Author Comment

by:AE_JB
ID: 39963952
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
 

Author Comment

by:AE_JB
ID: 39964029
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 20

Assisted Solution

by:Svet Paperov
Svet Paperov earned 500 total points
ID: 39964035
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
 
LVL 20

Accepted Solution

by:
Svet Paperov earned 500 total points
ID: 39964041
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
 

Author Comment

by:AE_JB
ID: 39964887
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It Is not possible to enable LLDP in vSwitch(at least is not supported by VMware), so in this article we will enable this, and also go trough how to enabled CDP and how to get this information in vSwitches and also in vDS.
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question