hi all,
After having "backup" a vmdk via VixDiskLib_Read() + write all the retrieved sectors into a local file, how can i "restore" that particular vmdk?
i know that if have an existing vmdk file (even if it is a blank disk), i can use VixDiskLib_Write() to write back all the bytes into the disk (in hosted mode). But my question is what if i don't have that vmdk file beforehand? The "design backup solution for vsphere" document seems to suggest that i have to create the vmdk file myself (i.e. create a blank virtual disk).
But how can i create it with proper DiskType? (by proper i mean the disktype is same as the original disk) I can't find any API (vddk, vix,vsphere web service) that provides the disk type of a given vmdk file.
( i assume that a "restored" vmdk should be the same as the original, from "size" to "adapter type" to "disk type" to "HW version", etc. )
Thx in advance!
py
Hi Py,
The solution is not quite intuitive - when you restore, you create a VM with the same hardware configuration as the original VM. This creates disks. Now you can open each of these disks and write to them with the backed up content. There is documentation which explains this, but it talks about VI web services api which you should be able to extrapolate to the server api.
Hope that helps and thanks for using VDDK,
Sudarsan
Have you looked at vdisk-manager?
Thx for response!
i would like to clarify a bit about: does vdisk manager refer to the vmware-vdiskmanager command? or the VirtualDiskManager property in ServiceContent (via vshpere web service)?
honestly, i am doing a backup/restore solution, so a standalone command doesn't seem to be a good approach (at least my boss would think so, i believe). but i am reading the pdf of it, hope can get some hint from there...
if it however refers to VirtualDiskManager, then sadly i don't have that object during runtime bcos i am connecting to a vmware server 2.0. i read from one post of this forum that vmware server 2.0 doesn't have the VirtualDiskManager. using the mob web page i have double confirmed that the VirtualDiskManager is NULL during runtime.
so, any further hint?
Thx again!
I was referring to the vmware-vdiskmanager.
You can get the disk type from the disk descriptor file, or its embedded inside the first 1000 bytes of the actual VMDK.
Take a look here for the Server 2.0 backup utility ( this app also has a utility to look at the descriptor)
I thought that VDDK did have a method to create a disk...
Hi Py,
The solution is not quite intuitive - when you restore, you create a VM with the same hardware configuration as the original VM. This creates disks. Now you can open each of these disks and write to them with the backed up content. There is documentation which explains this, but it talks about VI web services api which you should be able to extrapolate to the server api.
Hope that helps and thanks for using VDDK,
Sudarsan
Hi Sudarsan,
When you say "create a VM with the same hardware configuration as the original VM", what all configuration should be captured/restored during backup/restore? The VI API provides access to so many VM config parameters. Should all of these be restored?
Thanks.
hi, sorry for late reply, i was "switched" to another task and now switched back...
will definitely take a look on the backup tool, and thx for pointing out the file descriptor, will also take a look on it
MANY THX again for answering my question!
The solution is not quite intuitive - when you restore, you create a VM with the same hardware configuration as the original VM.
This creates disks. Now you can open each of these disks and write to them with the backed up content. There is documentation
which explains this, but it talks about VI web services api which you should be able to extrapolate to the server api.
ic. hmmm, that sounds like quite some work, but will give a try. oh, it's time for reading...
anyway, thx a lot!