VMware Cloud Community
tecboy
Contributor
Contributor
Jump to solution

ESXi 5.5 - Move primary VMDK file only to different datastore?

ESXi 5.5 installed on Dell R720(2 mirrored hard drives which is Data Store1) and connected to Dell 3220 Storage cabinet which is listed as 3220 in data stores. I recently converted a physical 2003 server to virtual (2003Server). I noticed that the 2003Server VM folder was created on Dell3220 data store and contained everything except the vmdk file which was in a folder called 2003server in DataStore1. There is one snapshot that was created during the conversion process. This snapshot should be able to be removed. What is the proper way to move the vmdk file to the 2003Server vm folder on the 3220 datastore? Below is what i think the correct way to do this but i want to be sure as this is a production server

1. power off VM

2. Delete/Remove all snapshots

3. Copy or move the 2003server.vmdk file from Datastore1 to 3220 datastore

4. Edit settings and add another hard disk...pointing to the correct datastore/folder/2003server.vmdk file

5. Click ok

6. Edit settings and remove Hard disk 1 and choose option of remove from virtual machine.

7. Click OK

8. Power on VM

9. Done

0 Kudos
1 Solution

Accepted Solutions
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

As you have only ESXi host (No vCenter):

Steps that you are planning makes sense.

I am assuming :

-You have a VM with 2 VMDKs : one VMDK on DS1 & another VM on DS2. Now you want to all VM files (both VMDKs + vmx etc)

1. Power off the VM.

2. Delete snapshots

3. Go to datastore where VMDK to be moved is there.

4. Right click the VMDK & click MOVE ( Copy may not work across datastores from VI client)

5. select the other datastore where you want to keep that VMDK. Wait till the VMDK is migrated.

6. Edit seetings>>>Click on VMDK that was moved (it will have earlier VMDK PATH, hence now VM may not power on)>>Remove that VMDK

7. Again edit settings >>Click add>> hard disk >>select existing virtual disk >>select the VMDK that was moved earlier. >>OK

8. Now you should be able to power on the VM.

Note: It should work with primary VMDK as well.

Let me know if you have any question


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

View solution in original post

0 Kudos
10 Replies
ramprabhusekar
Contributor
Contributor
Jump to solution

Hi,

I faced the same issue.  Firtst migrate the virtual machine to another datastore. Then you will get all the files in datastore and you can able to acces the vm.

dont try with consolidate snapshot now.

0 Kudos
tecboy
Contributor
Contributor
Jump to solution

Everything except the vmdk file is on the correct datastore. I just need to move the vmdk file from one data store to another...both data stores attached to same ESXi host...

0 Kudos
ramprabhusekar
Contributor
Contributor
Jump to solution

yes it will be like that.  You just do storage migration to new datastore apart from these two datastores.  Now it will move all the files to single datastore. I did that successfully earlier.

0 Kudos
tecboy
Contributor
Contributor
Jump to solution

I only have the free /stand-alone version of esxi...i can browse datastores and move files that way...is that what you are referring to with storage migration? I know how to get the file in the correct place...just looking for correct procedure for the vm to know t he new location of the vmdk file..

0 Kudos
ramprabhusekar
Contributor
Contributor
Jump to solution

i got it, i gave solution for in cluster having multiple hosts.  let me check and get back to you

0 Kudos
vfk
Expert
Expert
Jump to solution

You can perform storage vmotion (sVomtion) and when you get to stage where you select your destination datastore, click the Advanced button, from here you will be able to specify datastore for each vmdk without having to switch off the VM and everything is online, no customer impact.

--- If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points. vfk Systems Manager / Technical Architect VCP5-DCV, VCAP5-DCA, vExpert, ITILv3, CCNA, MCP
0 Kudos
tecboy
Contributor
Contributor
Jump to solution

I only have the free /stand-alone version of esxi...this is a single standalone ESXi host....with 2 data stores attached...

I have no problem powering the VM off to do this process..

0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

As you have only ESXi host (No vCenter):

Steps that you are planning makes sense.

I am assuming :

-You have a VM with 2 VMDKs : one VMDK on DS1 & another VM on DS2. Now you want to all VM files (both VMDKs + vmx etc)

1. Power off the VM.

2. Delete snapshots

3. Go to datastore where VMDK to be moved is there.

4. Right click the VMDK & click MOVE ( Copy may not work across datastores from VI client)

5. select the other datastore where you want to keep that VMDK. Wait till the VMDK is migrated.

6. Edit seetings>>>Click on VMDK that was moved (it will have earlier VMDK PATH, hence now VM may not power on)>>Remove that VMDK

7. Again edit settings >>Click add>> hard disk >>select existing virtual disk >>select the VMDK that was moved earlier. >>OK

8. Now you should be able to power on the VM.

Note: It should work with primary VMDK as well.

Let me know if you have any question


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

0 Kudos
tecboy
Contributor
Contributor
Jump to solution

thanks...i will try steps as soon as i can power VM down....the vm has only one vmkd file (the primary disk drive) that i want to move from one datastore to another...

0 Kudos
tecboy
Contributor
Contributor
Jump to solution

worked flawlessly...thanks for the help

0 Kudos