Joakim Koed Oct 19 2:40PM 2017
So I just purchased a one year subscription because why not..
Trying to see what will happen when/if my main SSD dies (both VM + ESXi boot drive) I have everything backed up to NFS datastore and it works perfectly.
Now to restore: ./vertical restore /vmfs/volumes/datastore1 --restore-from testvm@ryzen -r 1
This results in 3 files being downloaded.. testvm.vmdk + testvm-flat.vmdk in /vmfs/volumes/datastore1/vmfs/volumes/datastore1/testvm (yes, that is not a mistake on my part, it extracts it to this path) ... + testvm.vmx in /vmfs/volumes/datastore1/
Why is this happening?
I want all the files to be in /vmfs/volumes/datastore1/testvm.
If I move them manually (which I'm fine doing, this is only like a worth case situation) then the disk is not thin provisioned any more :(
Can you please try to help a happy customer?
Thank you very much!
Joakim Koed Oct 19 3:01PM 2017
Okay, I feel a bit stupid now. I used cp instead of mv to move from /vmfs/volumes/datastore1/vmfs/volumes/datastore1/testvm to /vmfs/volumes/datastore1 ..
Now thin provisioning is working..
But I still don't understand why the 3 files are placed a these locations?
gchen Oct 19 7:11PM 2017
If you pass the virtual machine name instead of the directory to the restore command it should work:
./vertical restore testvm -r 1
When you specify the directory, or if the original datastore isn't available, it will try to restore the files to new locations by treating the original absolute path as a relative path.
Joakim Koed Oct 20 2:20AM 2017
Thank you for your reply.
I don't think "./vertical restore testvm -r 1" will work, if I have a complete disk failure.. I' m just preparing for what will happen, IF that happens.
But I guess I can live with having to move the files in that situation. Thanks anyway :)
email@example.com May 12 1:20PM 2018
So please, if I had a disk failure or an accidental data loss ora error canceling of a WM, which is the correct sequence of commands to restore a VM if the VM files and the VM directory doens't exist anymore? Maybe this issue (disaster recovery) could be inserted in the guide, being a common issue. Thanks Massimo
gchen May 13 9:05PM 2018
If the VM directory doesn't exist, you can specify the restore location together with the --restore-from option to restore the specified vm to any location:
./vertical restore /path/to/restore/location --restore-from vmname -r revision
If this command is to be run on a new ESXi host that has been initialized by the init command with a new host id, then you need to specify the original host id:
./vertical restore /path/to/restore/location --restore-from vmname@original_host_id -r revision
After yor restore the vm to the specified location, you can create a new vm using the disk files just restored.