Unsolved
This post is more than 5 years old
1 Rookie
•
89 Posts
0
354619
May 25th, 2012 10:00
How to Move a Virtual Machine from One Disk to Another
PowerEdge 2900. Windows Server 2008 Enterprise R2. Hyper-V.
I created a virtual machine from my host system under Hyper-V. The files reside on M: drve (M:\Virtuals\EventsPC). I would like to move the entire VM (all its related files) onto another drive, say N:. I tried copying the entire folder (M:\Virtuals\EventsPC) to a folder on the N: drive, stopping the VM, going into settings and changing the hard drive and snapshot file locations to point to this folder (and the vhd file within). I then restarted the VM and it came up fine. BUT when I tried to delete the old folder on M: it said the folder was open and could not be deleted. I tried stopping the Hyper-V service and then deleting theold folder and the delete took. But when I restarted the Hyper-V service the EventsPC VM showed as broken.
So now you know how I have fumbled and bumbled. Can anyone tell me theproper sequence of steps to take to move a VM from one disk to another? Thanks for any help.



Daniel My
10 Elder
•
6.2K Posts
0
May 25th, 2012 11:00
Hello Doug
I would recommend using the import/export functions to accomplish the VM move. I found a nice article that explains in detail how to do it.
http://www.petri.co.il/importing-and-exporting-your-virtual-machines.htm
Thanks
Chaplain Doug
1 Rookie
•
89 Posts
0
May 25th, 2012 17:00
I did the export/import (By the way, the article talks about moving a VM from one host to another. I am not trying to do that. I simply want to move it from one DISK to another on the same host). When importing, I am not given any options as to where to place the VM. It is automatically placed on the C: drive, which is not my objective at all. I want to put it on another drive, not the C: drive. When you create a VM using the wizard, you are given the choice of where to store the VM info and where to make the virtual disk. With export/import you are not (as far as I have seen) given a chance to designate where to place the imported VM.
Anyone have an idea of how to accomplish my original post question, namely how to move a VM from one disk to another, not from one host to another?
Daniel My
10 Elder
•
6.2K Posts
0
May 25th, 2012 18:00
If you choose to copy, yes. The export folder that you move to the new location is converted into a normal VM folder, but if you have a copy of the export at the original location then that can be deleted.
Chaplain Doug
1 Rookie
•
89 Posts
0
May 25th, 2012 18:00
When I did the export I created the export folder on the M: drive, yet the import created the VM on the C: drive. What goes here?
Daniel My
10 Elder
•
6.2K Posts
0
May 25th, 2012 18:00
Hello again Doug
The import process is not where you select the location. When you choose to export there is an export folder with the configuration files created. You have to manually move that folder to the new location/DISK that you want it to be. After you move the export folder to the new desired location you can import it.
You can move the VM to another partition, server, or any other data store via this method. I hope that clears it up for you.
Thanks
Chaplain Doug
1 Rookie
•
89 Posts
0
May 25th, 2012 18:00
Can I delete the export folder after the import is complete?
UhimU
1 Message
0
March 12th, 2020 09:00
One of the many benefits of virtualization is portability, meaning that you can easily move selected virtual machines (VMs) from one location to another without experiencing downtime or service disruption.
Portability within a Hyper-V environment is ensured through the Hyper-V Export and Import functionality, which allows you to easily copy and move a Hyper-V VM to a target location and then restore the VM to how it was at the time of export.
So, how does the Hyper-V Export and Import functionality work? When you export a Hyper-V VM, a copy of VM configuration files, VHD files, and VM snapshots can be created.
After that, you should specify whether you want the VM copy to be located within a Hyper-V Host or to move an exported VM across Hyper-V hosts. Finally, the archived VM can later be used in case of hardware failure or data loss in order to restore the VM data.
Hyper-V Export and Import: What, Why, and How