VMware {code} Community
nudicles
Contributor
Contributor

Snapshot Deltas Manipulation

I'm automating a process that will yield the creation of alot of VM's that have all been derived from a single base VM image. I'm wondering, in order to save storage space as well as bandwidth, if it's possible to only copy snapshot files from a VM. For example:

Say we have a team of 5. They would all have the same Baseline VMware Image. On a server somewhere, I'm running the automation tool to install software builds on that Baseline VMware Image and then take a snapshot, and have them available for the team. The original plan was for each team member to copy the entire VM Image folder over to their local machine so that they could test the software. What I would like to know is, is there a subset of those files (deltas?) that, if copied to each team member's local Baseline VMware Image folder, would allow the VM to function just as the original Image that resides on the server?

Thanks! sorry if that's confusing...

0 Kudos
5 Replies
admin
Immortal
Immortal

Are the team VMs exact copies of the baseline VM? Or can they diverge over time?

If they're exact copies, you could use rsync to copy the entire VM master image. (VMX files, vmdk files, etc). Rsync is efficient for synchronization because it only sends the diffs, not the entire file.

If they diverge, then copying the snapshot file will probably do the wrong thing, if that approach works at all.

For enterprise patch management capabilities, this white paper might be helpful:

http://www.vmware.com/pdf/ace_custom_patch.pdf

0 Kudos
nudicles
Contributor
Contributor

Well, I guess that's part of my question. When someone starts with a VM Image, they use it and install things and change things, are all of those changes recorded into a delta file(s), or do all the files change?

I had assumed that there are files that sort of become "untouched" by VMware after you take a snapshot. Since you can revert/Goto particular snapshots, there must be a way to differentiate a Parent snapshot from its Child snapshot. I was hoping that, given a VMimage containing a Parent snapshot, one could simply copy over files that contained the Child snapshot into the VMimage's folder.

To answer your question, everyone will be getting the exact same image, which contains a single snapshot of the baseline. But since they will be working on the images (obviously) I assume their individually images will change. However[/i], before copying over the child snapshot/delta files, they would of course revert to the Baseline snapshot.

0 Kudos
admin
Immortal
Immortal

Before I go into detail here, I should mention a couple of things:

1. VMware has a product that manages all this and more. It's called LabManager, and it creates a dev/test environment (based in the ESX Server platform) with very efficient managment of a VM library, with fast cloning and management of families of deltas of VMs, etc.

2. You can make this work, but if you go moving parts of snapshot chains around, and something somehow gets out of synch, you can corrupt your VMs. Beware.

OK, with that said:

When you create a snapshot, WS freezes the base disk, and puts all subsequent writes into one (or more) delta disks.

So, you could create a base image, with a large virtual disk file, containing the overall test environment, with OS, etc. Then create a snapshot, which will make a new delta disk, as a home for subsequent installs of the software to be tested. You could then distribute this pre-snapshotted VM amongst your test machines only once.

Then, on the master image, when you install SW to be tested, all the new writes will go into the delta disk for the snapshot.

To update all the VMs, in principle, you should just need to distribute the smaller delta disk with the new SW installed. Again, though, if you images get out of synch, this will fall apart.

Another way that you could do this, which is more in the intended spirit of the VIX API:

  • Distribute the VM once, with OS installed and a snapshot of the clean image.

  • Then, if your SW to be tested can run an unattended install, you can just use the VIX API to revert to this snapshot, copy your SW into the test VM, and install it. You can also use it to run a program in the guest.

Simple, easy, no VM images to copy around, and no hacking of virtual disk images at all!

0 Kudos
nudicles
Contributor
Contributor

Thanks for the reply Matt.

I will definitely look into LabManager, it sounds like it might be what we're looking for.

It sounds like it may be possible to do it the way you suggested, though it sounds much more like a hack, as u suggested. Not an ideal test environment I suppose.

As per your last suggestion, that's not something I had thought of before. I had planned to run the VIX tool on some kind of server, to create VMs that would be distributed... I had never thought of distributing the VIX tool itself. May be a good point. The only issue is, it becomes more difficult to manage, should something go wrong.

0 Kudos
HuongAmanda
Contributor
Contributor

Hi There,

I am interested in doing the same thing but not VMWare Image. It is on a regular laptop and server.

I initially create a fresh baseline image with US Regional and Language Options. I made a backup. I then like to make the change of the image to be UK Regional and Language Options. I like to take a delta of it. What utility allows me to do that, please? I am using Installshield Repackage utility. However this only takes snapshot of to non OS applications, such as Microsoft OutLook, Oracle, and what have you.

YOur help is greatly appreciated!

Thanks!!!!

0 Kudos