how to backup and restore only disk with no VM

Morgan    Nov 19 5:50PM 2017

Due to a weird set of circumstances, we have a few vmdk disks on one server that we want to backup so we can move them to another machine (as part of a crash recovery). However, there is currently no virtual machine associated.

I could go through the rigamarole of creating one, but it seems like maybe there should be a way of doing that with vertical backup, without having to create a fake virtual machine?


Morgan    Nov 19 8:04PM 2017

Well, I created a dummy VM on the source machine, and that seems to be working fine. But it would be nice to have this option at some point.

gchen    Nov 20 8:27AM 2017

It is possible to fake a VM, but that requires you to replace /bin/vim-cmd to a script like this:


import sys

if sys.argv[1] == "vmsvc/getallvm":
    print '''Vmid      Name                         File                             Guest OS           Version   Annotation
1      vm-ubuntu    [datastore1] vm-ubuntu/vm-ubuntu.vmx         ubuntu64Guest             vmx-08              
elif sys.argv[1] == "vmsvc/power.getstate":
    print "Powered off"

And then create a file /vmfs/volumes/datastore1/vm-ubuntu/vm-ubuntu.vmx that has the following line (assuming vm-ubuntu.vmdk is the stand-alone vmdk disk you want to back up) :

scsi0:0.fileName = "vm-ubuntu.vmdk"

This is basically what we did to run Vertical Backup on non-esxi test machines. That being said, this is perhaps more complicated than just creating a dummy VM.

Log in to comment
Copyright © Acrosync LLC 2017