VMware Cloud Community
sbranchfbfs
Enthusiast
Enthusiast
Jump to solution

How do you restore vm images from snapshot?

I'm new to the concept of snapshotting. But I understand the basics. I am a little unclear on how I would restore a VM image from a VCB backup, however.

VCB creates snapshots of the VM that is being backed up. I have noticed in testing that the snapshots do not appear to be the same size as my actual live vmdk. How would I be able to restore the VM image if the snapshot is not the same size? If my vmdk is 10 GB and my snapshot is only 3GB, isn't data missing? Won't my restored VM have a hard drive size of only 3GB when it was originally 10GB?

0 Kudos
1 Solution

Accepted Solutions
depping
Leadership
Leadership
Jump to solution

Well VMware technically it's not a snapshot. It's a sort of thin provisioned disk image. VCB dumps only occupied diskspace. so in other words if you have a 10GB disk but it just contains 3GB, only the 3GB will be dumped with VCB.

You can easily restore them with VMware Converter, start it up and chose "backup / disk image"

Duncan

My virtualisation blog:

View solution in original post

0 Kudos
7 Replies
chandlm
Expert
Expert
Jump to solution

Obviously the restore process depends on the environment but in general here's how I restore:

1. Restore the entire image backup from tape/disk to the VCB proxy server

2. Fire up Converter, point it to the .vmx file in the restore

3. Tell Converter to create the new 'restored' VM to Virtual Center

I think VCB will backup only the used space on the .vmdk file but I could be wrong. Maybe that's why you see the size difference. You could run through the process once and see what you end up with as a test.

depping
Leadership
Leadership
Jump to solution

Well VMware technically it's not a snapshot. It's a sort of thin provisioned disk image. VCB dumps only occupied diskspace. so in other words if you have a 10GB disk but it just contains 3GB, only the 3GB will be dumped with VCB.

You can easily restore them with VMware Converter, start it up and chose "backup / disk image"

Duncan

My virtualisation blog:

0 Kudos
espi3030
Expert
Expert
Jump to solution

I use a backup script that creates snapshots, and I can restore them with vcbRestore -h <esxhost> -u <username> -p <password> -s /vmfs/volumes/<snapshotlocation>/<vmname>/ to restore backup (Must be performed from host that backed up VM). This works for me, try this in a test environment and see if it works for you as well.

0 Kudos
fejf
Expert
Expert
Jump to solution

What do you mean by your "snapshot is only 3GB" ? Do you mean the created -s0000.vmdk files or what gets backuped? The snapshots work on a copy-on-write basis: if you snapshot a VM your orginal vmdk doesn't get modified anymore. Instead every future change is recorded in an addional file - so your snapshots only contain blocks/bytes which were modified since you made the snapshot and that's why the -s0000*.vmdk files are smaller than the harddisk (try google for details on copy-on-write).

For restoring you normally use VMware Converter (imho supported since ESX 3.0.2).

--

There are 10 types of people. Those who understand binary and the rest and those who understand gray-code.

-- There are 10 types of people. Those who understand binary and the rest. And those who understand gray-code.
0 Kudos
sbranchfbfs
Enthusiast
Enthusiast
Jump to solution

Okay, that makes sense. Now, when I use VMConverter to restore the image, would I just instruct it at that time to increase the size of the disk during the conversion setup to the desired disk size (in this case, back to the 10GB size)?

And so that I understand the snapshot process, please confirm if I am correct:

1. Snapshot creates a s0001.vmdk that will contain any changes to the disk that occur.

2. The bask disk can be backed up. Once the snapshot is removed the changes that occured on s0001.vmdk are written back to the base disk.

0 Kudos
chandlm
Expert
Expert
Jump to solution

Correct, but you shouldn't have to resize the disk with converter, I believe it will have the correct size already.

depping
Leadership
Leadership
Jump to solution

It will get the correct size automatically.

Duncan

My virtualisation blog:

0 Kudos