VMware vSphere

  • 1.  Copy a VMDK of a running server to a NAS share

    Posted May 21, 2018 11:33 PM

    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?



  • 2.  RE: Copy a VMDK of a running server to a NAS share

    Posted May 22, 2018 12:30 AM

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



  • 3.  RE: Copy a VMDK of a running server to a NAS share

    Posted May 22, 2018 03:53 AM

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



  • 4.  RE: Copy a VMDK of a running server to a NAS share

    Posted May 22, 2018 02:09 AM

    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



  • 5.  RE: Copy a VMDK of a running server to a NAS share

    Posted May 22, 2018 03:54 AM

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



  • 6.  RE: Copy a VMDK of a running server to a NAS share

    Posted May 22, 2018 10:29 AM

    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.



  • 7.  RE: Copy a VMDK of a running server to a NAS share
    Best Answer

    Posted May 22, 2018 06:23 PM

    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é



  • 8.  RE: Copy a VMDK of a running server to a NAS share

    Posted May 22, 2018 06:32 PM

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



  • 9.  RE: Copy a VMDK of a running server to a NAS share

    Posted May 22, 2018 07:42 PM

    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.



  • 10.  RE: Copy a VMDK of a running server to a NAS share

    Posted May 22, 2018 11:33 PM

    Awesome.

    Thanks Andre :smileyhappy: