Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to keep a tree of VM snapshots up to date with Windows Update?

For testing our product's installer, I maintain a tree of virtual machine snapshots with different previous versions installed. It is a tedious task to do Windows Update, re-snapshot, delete parent snapshot on each VM.

Is there an automated solution for keeping a group of VMs up-to-date? I use VirtualBox but have access to VMware Workstation and would switch if maintenance would improve.

like image 688
Aidan Ryan Avatar asked Jul 22 '09 12:07

Aidan Ryan


People also ask

Does a VM snapshot grow?

The snapshot file cannot exceed the size of the original disk file, and it requires some overhead disk space. Snapshots will grow rapidly with high disk-write activity volume. Most snapshots are deleted within an hour and VMware recommends deleting snapshots within 24 hours.

How long should you keep VM snapshots?

Do not use a single snapshot for more than 72 hours. The snapshot file continues to grow in size when it is retained for a longer period. This can cause the snapshot storage location to run out of space and impact the system performance.


1 Answers

We keep a baseline of VMs in a library of sorts. They're are about 20-odd (with mixtures of different versions of Java, DB2, WAS and so on) that the development and test teams can copy out for their own use.

The librarian (developer, doing this part-time) is responsible for keeping them up to date. What they'll do is copy one of the VMs every week or so, boot it and install all updates, then copy the updated VM back over the original. This means it's available for checking out except when the copy operation is being done. Additionally, the number of VMs that need to be updated is minimized by virtue of the fact that they're shared.

That's how we do our snapshots, by copying the directories partially because it's easier to manage but mostly because we're too tight to buy the workstation version :-) We use the player instead.

It's mostly automated since all the VMs grab their updates from our SUS server and we know when they have updates ready to go. The librarian is notified by a script which VMs need to be updated and just has to run another script which copies the VM and starts the copy.

Once the librarian is satisfied the copy is up to date, they shut it down and yet another script copies that VM back into the library and updates its status.

like image 155
paxdiablo Avatar answered Sep 22 '22 08:09

paxdiablo