VMware Cloud Community
flyerguybham
Contributor
Contributor
Jump to solution

How to successfully relocate disk files?

I have some VMs on an ESX server's local disks. I have added shared iSCSI storage to this machine, and now I want to relocate the VMs to the shared storage. What is the procedure? I tried just copying the entire VM directory, deleting the old hard disk, adding a new hard disk using the existing image now in the new location, but then the VM fails to start. Is there something within a settings file I need to update?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
dkfbp
Expert
Expert
Jump to solution

Are you using Virtual Center? If yes, then just right click the server and choose migrate. Then choose the same host but relocate storage. Then point to the iscsi drive for the storage. I do it all

the time.

Best regards Frank Brix Pedersen blog: http://www.vfrank.org

View solution in original post

0 Kudos
9 Replies
Osm3um
Enthusiast
Enthusiast
Jump to solution

There may be a better way, but you could download the trial of ESXPress. This way you backup the VM and restore it to the new location. It MAY require an FTP server to backup to, but you may be able to simply replicate the VM to the ISCSI VMFS, not sure about that.

Bob

0 Kudos
fatih
Enthusiast
Enthusiast
Jump to solution

I have done similar things by "remove from inventory" on the vm itself by rightclicking on it in the VC client and then through the console move the files to the new place and then register the vm either from the console or just by browsing the datastore within the VC client and choose the .vmx file and then rightclick and "add to inventory"

Worked for me.

Regards

0 Kudos
bourkes
Hot Shot
Hot Shot
Jump to solution

Similarly, I have followed the following:

- Unregister the VMs from the host/VC

- using the conosole, copy the whole directory from the local VMFS volume to the shared volume

- use vmware-cmd to register the .vmx with the host/VC (I think it's vmware-cmd -s register <path to vmx>)

- you just need to answer the move/copy question when booting the machine

HTH

0 Kudos
rpartmann
Hot Shot
Hot Shot
Jump to solution

Hi,

1.) unregister the VM with the VI client or with vmware-cmd -s unregister

Why did i use vmkfstools?

I experienced a better performance with vmkfstools.

kind regards,

Reinhard.

ps: Award points if you find answers helpful. Thanks.
dkfbp
Expert
Expert
Jump to solution

Are you using Virtual Center? If yes, then just right click the server and choose migrate. Then choose the same host but relocate storage. Then point to the iscsi drive for the storage. I do it all

the time.

Best regards Frank Brix Pedersen blog: http://www.vfrank.org
0 Kudos
flyerguybham
Contributor
Contributor
Jump to solution

0 Kudos
flyerguybham
Contributor
Contributor
Jump to solution

Correction: it worked fine. I just had to clean up some manual settings

I had tried in the .vmx file in some of my earlier attempts. Thanks for

the tip!!

I am using VC, but that procedure does not work for me. It validates

the move fine, but when it starts the operation, it times out saying

that it cannot communicate with the remote host. On the new

datastore, there is a new directory created for that VM, but the only

contents are a 0 byte .vmx file.

--

Fran Fabrizio

Senior Systems Analyst

Department of Computer and Information Sciences

University of Alabama at Birmingham

http://www.cis.uab.edu/

205.934.0653

0 Kudos
eharvill
Enthusiast
Enthusiast
Jump to solution

When attempting the cold migrate, make sure the source and destination ESX host are the same and then choose the new iSCSI datastore. I've seen that error a lot when trying to migrate from local storage on host1 to shared storage on host2.

0 Kudos
michaelrch
Contributor
Contributor
Jump to solution

Just a note of caution using the conversion method from and to the same host.

I attempted thisand the process was interupted half-way through although this did not become apparent until later.

The host was later taken down and restarted for a hardware ugrade.

Because the new VM had not been fully created but was in the inventory already, it caused a nasty problem when the server restarted. Basically, the hostd process on ESX would get going and then fail when it tried to register the corrupted VM. No hostd, no management meant no service.

I am dong these transfers cold using copies of the files and then re-registering the ID when the VM comes back up for the first time.

0 Kudos