0

I have a spare Windows 7 license, and would like to set up a small VM for use as a Jenkins slave.

As things can go wrong on build systems, and I'd like to avoid cruft building up in the system, I'd like to occasionally restore to a freshly installed image. Obviously, that means that all updates from WU are also rolled back, and re-downloaded on the next start.

Is there a good way to avoid this?

Ideas so far:

  • disable WU altogether, since the machine will not be exposed to the network
  • have "update mode" with persistent changes but no workload, and "normal mode" where WU is disabled
  • use some Windows feature to roll back
4
  • Have you looked at maybe going the SteadyState route? microsoft.com/en-us/download/details.aspx?id=24373 Commented Mar 30, 2015 at 17:45
  • SteadyState is a horrible choice it has been discontinued and there are some major problems with it that won't be fixed. The simplest solution would be to perform all updates to date. Once you do that clone the virtual machine and keep a working snapshot. When you determine its time to update that snapshot, start the virtual machine, and update the snapshot and clone it again removing the previous versions.
    – Ramhound
    Commented Mar 30, 2015 at 17:52
  • @Ramhound not a literal steadystate (discontiued as mentioned in the link), but you can use in-persistent environment effectively when a VM is not an option (for whatever reason). Commented Mar 30, 2015 at 17:54
  • The system will be running inside a VM in any case -- but since I can't easily see from outside the VM whether updates are available, this means lots of manual intervention. Commented Mar 30, 2015 at 18:07

1 Answer 1

1

Snapshots are your friend here. All virtualization products support them (with the notable exception of VMWare Player), and they were created for the exact purpose you have in mind.

Load up your fresh install in the virtualization product of your choice (with or without updates), do whatever configs you want to the image, and then take a snapshot. You can then do your testing and revert back to the snapshot at will. You can take as many incremental snapshots as you want and use them to serve as checkpoints along a path if you need to test the behavior of your project at different points in time.

You can also "fork" each snapshot into its own tree based on different use case scenarios. It becomes more difficult to manage, but it's not beyond the realm of possibility.

In the case of a snapshot that does not have updates, I would recommend you configure an update policy that notifies you of available updates, but does not automatically download/install them. That way you remain in control of when, how, and which updates to install (and yes, you can take snapshots of various states in those cases too).

If testing auto-updates is part of your equation, and the VM image is domain-joined, then you can place the VM into its own OU within AD and create multiple Group Policies to control it, linking and unlinking them at will between snapshot reversions. If not, you can also create snapshots of different configs for auto-updates too.

Really what I'm saying is that the sky is the limit here (well, actually hard drive space is, but you get my point).

3
  • I just copy the VMware folder of the virtual partition to another disk or partition or folder as a backup. Much easier than snapshots.
    – whs
    Commented Mar 30, 2015 at 18:37
  • Copying VMWare container files back and forth to backup media is easier for you than managing snapshots??
    – Wes Sayeed
    Commented Mar 30, 2015 at 18:41
  • Yeah, it is just 2 clicks.
    – whs
    Commented Mar 31, 2015 at 0:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .