Including, Excluding Virtual Machines from Time Machine

| How-To

Both Parallels Desktop and VMware Fusion create a virtual machine (VM) file on your hard disk. These files can become quite large, and users need to decide if they should be included in the hourly Time Machine (TM) backup. This how-to describes options for properly backing up these VMs and avoiding wasted disk space.

When you install a guest OS on your Mac with Parallels Desktop (PD), VMWare Fusion, a disk image file is created. I won't discuss VirtualBox from Sun, but I believe it works the same way. With Parallels Desktop, the files are in /Users/username/Documents/Parallels. With VMware Fusion, the files are in /Users/username/Documents/VirtualMachines. These files can become quite large: perhaps tens of gigabytes after a time. My Vista VM is 26 GB, not something I want to have multiple copies of within the Time Machine archive.

Accordingly, if you use the VM often, they'll be backed up every time Time Machine kicks in, and that'll chew up gobs of space on your Time Machine volume. Depending on how big your TM volume is, you may or may not want that.

Parallels Desktop. PD gives you the option to designate your VMs as candidates to be backed up. Here's how to do it.  In your list of VMs:

List of VMs

A List of PD VMs

Right click the VM name and select "Configure...," and make sure you're on the General tab.

 

Configure: General

General Tab

At the bottom you can designate whether this VM will be backed up. You won't have to do anything with Time Machine settings because the the file is "marked" in the metadata to not be backed up. Also, if you elect to let TM do backups and you're using the Parallels VM when Time Machine kicks in, Parallels can't guarantee the validity of the backed up file. This is discussed in the Parallels Desktop 5 User's Guide, page 210. So before you launch your VM, you should turn off Time Machine until you're finished using it.

VMWare Fusion. Fusion 3 doesn't offer a setting within the application. Instead, VMware recommends that you go into Time Machine and exclude Fusion VMs from being backed up. Their knowledge base article is # 1014046 dated 19 November, 2009 describes the procedure.

TM Exclusions

TM Exclusions in Options

Just as with Parallels, VMware says, "When Time Machine attempts to backup a virtual machine while it is running, it does not create a proper backup." So, once again, you'll want to turn off Time Machine backups while you're using the VM.

Finder Copy Backups

If you've elected to exclude VMs from Time Machine backups, you'll need to develop an alternative backup strategy. There are are some techniques that are outside the scope of this how-to, so I'll simply recommend that you designate another drive on your system, internal or external, as a place to copy your VMs. How often you do this is up to you. For example, if you use a VM all day, you may want to develop an end of day check list:

  1. Shut down the VM
  2. Quit Desktop or Fusion
  3. Copy the VM to its designated place, somewhere not backed up by TM
  4. Turn Time Machine back on

Note that if you've taken snapshots within the VM, these will remain valid the next time you launch your VM.

Following this procedure will ensure that your Time Machine volume doesn't become cluttered with gigabytes of VM files, and you'll still have backed up VM files whose integrity you can trust.

Sign Up for the Newsletter

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday.

Comments

John Martellaro

The seed of this article was, of course, when I realized i wasn’t paying enough attention to how my VMs were being backed up.  Now I am!

Rich

Thanks for introducing this topic.  However, I thought that the Time Machine would only copy the portions of the large container files that were actually changed.  Is that not the case?

WetcoastBob

I gather that TM does an incremental back-up.  If this is so then it will regard VM as one file and if you open it, it is changed.  Therefore the entire bundle gets backed-up.  However I have noticed that it does not treat the Aperture bundle as one file.  A bit confusing.

Also I have configured TM to only back-up my user account.  Nothing else is that unique that you cannot restore it in a total catastrophic disc failure.

geoduck

Thanks for the article. I have several VMs and this will cyt some Gb from my backups.

FWIW in VirtualBox the disk image files are located at

USER/Library/VirtualBox/

Voice

The Aperture ‘bundle’ is, like any other typical OS X app, simply a directory which contain multiple files.  The VM images, are simply *files* which contain virtual disks containing file system images.

Expecting TM to back up only the changed parts of your VM is akin to expecting it to back up only the changed parts of your photograph.

Log-in to comment