VMware Cloud Community
NomadsGMan
Contributor
Contributor
Jump to solution

Copy a VMDK of a running server to a NAS share

Hi all

I have the following setup:

1 VM with 4 VMDKs (1 for OS, 3 for different Data)

I cannot shut down the VM to do what I have to do, else it would be a no-brainer.

I need to copy VMDK 2-4 to a NAS share, if possible while the VM is up and running.

I am using Veeam for backup, replicating doesn't work, already tried that, and Veeam support told me, they don't support this kind of feature. Taking a backup isn't the solution that I am looking for either, as I need the VMDK in its .VMDK format on the NAS share.

I saw a program VMPro would do exactly this, but this went EOL in 2016. I contacted the supplier, can't even get me an old license as it's EOL 2 years ago.

What other way is there to achieve this?

1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

What may be an option is to create a snapshot, copy the base disks (.vmdk files) to the NAS share, and then delete the snapshot.

With the snapshot in place, writes will go to the delta files, so that the base disk will not be modified while copying it.

To copy the disks to the NAS share run s.th. like:

vmkfstools -i /vmfs/volumes/sourceDS/vmname/disk_1.vmdk /vmfs/volumes/NasDS/vmname/disk_1.vmdk

Note that the folder on the target datastore has to be created manually prior to copying the virtual disks.

André

View solution in original post

9 Replies
daphnissov
Immortal
Immortal
Jump to solution

Is this NAS share an NFS mount which is accessible from an ESXi host?

0 Kudos
Rsahi
Enthusiast
Enthusiast
Jump to solution

There is option to do so , when you are doing storage vmotion, at the time of select data-store, there is advanced setting. which allows you to choose each individual disk settings

Steps, right click the vm> migrate > storage only> choose datastore

on this page there is advanced click that and then you should be able to move selective vmdks

0 Kudos
NomadsGMan
Contributor
Contributor
Jump to solution

Yes, standard NFS share, visible to the ESXi host.

0 Kudos
NomadsGMan
Contributor
Contributor
Jump to solution

But I don't want to move them, just create a copy on the NAS NFS share.

0 Kudos
BerndtSchumann
Enthusiast
Enthusiast
Jump to solution

Access your ESXi server using the web browser (e.g. https://192.168.13.182/folder ), browse to your VM folder and download the required VMDK files.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

What may be an option is to create a snapshot, copy the base disks (.vmdk files) to the NAS share, and then delete the snapshot.

With the snapshot in place, writes will go to the delta files, so that the base disk will not be modified while copying it.

To copy the disks to the NAS share run s.th. like:

vmkfstools -i /vmfs/volumes/sourceDS/vmname/disk_1.vmdk /vmfs/volumes/NasDS/vmname/disk_1.vmdk

Note that the folder on the target datastore has to be created manually prior to copying the virtual disks.

André

daphnissov
Immortal
Immortal
Jump to solution

This is exactly what I was going to recommend, but André beat me to it Smiley Happy

0 Kudos
continuum
Immortal
Immortal
Jump to solution

Actually it is indeed possible to copy a vmdk while it is in use - but the procedure to do that is really ugly and requires a lot of work.
And the results are dirty - so you really dont want to do this.
I recommend to use the approach that Andre has explained.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

NomadsGMan
Contributor
Contributor
Jump to solution

Awesome.

Thanks Andre Smiley Happy

0 Kudos