VMware Cloud Community
greggap
Contributor
Contributor

Moving .vmdk files and restoring them

Hi,

We are running Vmware 3.5, I need to blow away the datastore to redo the partitions, my boss wants to have one big

partition and the block size was originally set incorrectly. My plan is to use winscp to back all the vm directories to

an external usb drive shared out on another machine, redo the storage and then copy the vm's back

and fire them up. Is this the correct way to do this?

Thanks,

Greg

0 Kudos
2 Replies
IB_IT
Expert
Expert

i would use the vmkfstools -i command to move vmdk files around...this will copy the vmdk and flat files.

0 Kudos
rshondell
Contributor
Contributor

You certainly can use scp to copy the files and they will work fine when you put them back, so no worries there.

vmkfstools is the recommended way for moving your vmdks around and it has a few advantages over a vanilla cp or scp (some of which may not apply to your situation). A few that stand out in my mind are

- You can do things like using the "-d 2gbsparse" option on export to change your vmdks to 2GB files instead of one or more massive files. This probably doesn't matter much in this specific case, but if you had a file size or space limit or wanted to use other non-ESX VMware products with these disks, this could help.

- When you put the vmdk files back, using vmkfstools will allocate the space all at once, then move the data into it. A regular cp or scp will expand the size of the file as it copies the file over. This can cause some IO issues if you have other VMs using that lun.

So in general, either will work, but vmkfstools has some advantages that might warrant looking into.

0 Kudos