VMware Cloud Community
xilex
Contributor
Contributor
Jump to solution

How to migrate to larger datastore (only one SATA port) (on ESXi 6.7)

Hello, I am running ESXi on a machine with only one SATA port. I would like to upgrade the current datastore SSD to a larger size. Is the only way to copy everything off, then copy back on? Would I have to unregister every VM, remove old drive, connect new drive, then reregister the VMs once they are on the new SSD?

As an aside, if the only option is to copy everything to a temporary location then copy it back over, I am currently mounting the datastore drive with vmfs6-tools so I can read it in Linux and copy everything off. What is the best way to copy from this temporary location to the new datastore? Can I use SSH and use something like rsync to copy?

Thank you.

0 Kudos
1 Solution

Accepted Solutions
SureshKumarMuth
Commander
Commander
Jump to solution

Once you mount the nfs data store, you can do a regular file copy using cp command inside ESXi (using CLI) as both data stores are accessible from ESXi, No need of copy over ssh. Also you will have additional commands in ESXi to clone vm/disks which is more reliable than cp command. You can search for articles in google for steps to clone vm using ESXi cli.

Regards,
Suresh
https://vconnectit.wordpress.com/

View solution in original post

5 Replies
SureshKumarMuth
Commander
Commander
Jump to solution

Is it a standalone ESXi node without vCenter server ?

If the ESXi is part of vCenter server, then you can try the following

Instead of using vmfs6 tools on linux and copying data at Linux level, check if you can export a mountpoint from the Linux machine as NFS share and mount the NFS share as a datastore in ESXi. You can do a storage vMotion at the datastore level. Once you create new Datastore using SSD, you can just move the VMs back in same way.

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos
xilex
Contributor
Contributor
Jump to solution

Hi Suresh, this is a standalone ESXi node, so I do not have vMotion.

Based on your advice, I can export a mountpoint as NFS share as one option. But it sounds like I can also just copy all the VM folders over SSH (to the datastore folder), too?

0 Kudos
SureshKumarMuth
Commander
Commander
Jump to solution

Once you mount the nfs data store, you can do a regular file copy using cp command inside ESXi (using CLI) as both data stores are accessible from ESXi, No need of copy over ssh. Also you will have additional commands in ESXi to clone vm/disks which is more reliable than cp command. You can search for articles in google for steps to clone vm using ESXi cli.

Regards,
Suresh
https://vconnectit.wordpress.com/
xilex
Contributor
Contributor
Jump to solution

Thanks, Suresh. I could not find a straightforward way to expose as NFS mount (I am working through WSL).

I am just copying it over, and it works well so far. I will hold on to the original drive as backup for now.

You mentioned using esxcli to copy VM is more reliable than cp/scp, do you mind explaining why? Thanks.

0 Kudos
SureshKumarMuth
Commander
Commander
Jump to solution

I was mentioning about a tool available in ESXi called vmkfstools which is a native tool developed by VMware for disk/storage/FS related activities on ESXi. For disk cloning you have to use option "i" (ie. vmkfstools -i ). It is always better to use this tool over regular cp command as it has its own advantages . I could not find the doc which explains the difference between vmkfstools vs cp 🙂 However, found this very old thread talks about the difference 

https://communities.vmware.com/t5/VI-VMware-ESX-3-5-Documents/How-is-quot-vmkfstools-i-old-vmdk-new-....

 

https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-storage/GUID-A5D85C33-A510-4A3E-8FC7-93E6BA0A0...

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos