Solved

Moving hyper v vm storage

Posted on 2014-03-29
6
840 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Does Powershell have you tied up in knots?

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

 
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
A procedure for exporting installed hotfix details of remote computers using powershell
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…
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…

749 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