Using a virtual machine — perhaps VMware Fusion or Parallels Desktop — can result in way-too-large backups. Here’s one way to make those backups more manageable.
If you’re using a product such as VMware Fusion or Parallels Desktop to run another operating system on your Mac (perhaps Windows or Linux), then you may have noticed that your backups are now taking a long time. I documented one approach to solving this problem in an earlier article. Now here’s a different approach, originally suggested by Chris Ryder (thanks Chris).
First, here’s a recap of the problem. It’s written in terms of VMware Fusion but should be equally valid for other VM engines such as Parallels Desktop. If you’ve already read the previous article then you might want to skip to the meat of this article.
When you’ve been using Fusion’s virtual machine (in my case, to run Windows), you will find that Time Machine’s backup takes longer than expected — sometimes much longer.
This is because Fusion stores its virtual machines’ disks as a bunch of large files. When you run your virtual machine using Fusion (or Parallels Desktop), the contents of the VM’s virtual disk changes, and even if you haven’t made many explicit changes to files, all sorts of small changes happen to the virtual disk’s contents.
Incremental can still be too much
Time Machine performs incremental backups. That is, it copies only files that have changed since the last backup. Unfortunately those large files that Fusion uses to store the virtual disk’s contents? They’ve probably all changed, at least a little.
So, instead of your incremental being a few megabytes and taking a few tens of seconds, it’s ten gigabytes, takes ages, and rapidly fills your backup disk. (Which causes its own problems: described here.)
One solution: back up the VM in another way
One solution is to keep all your precious files in the Mac file-store, tell Time Machine to avoid backing up your virtual machine(s), and then back them up some other way. This results in the smallest backups and is useful if you don’t need sophisticated incremental backups of your virtual machines.
If this sounds like you, then I’ve shown how this can be achieved in an earlier article.
An alternative solution: use a sparse bundle
If you need proper incremental backups of your VMs, then one approach is to use a sparse bundle. This is a disk image which is stored as a collection of small files (typically 8MB), so when Time Machine backs up the disk image, it only needs to copy the files that have changed.
This approach still isn’t perfect — when (for example) Windows does anything, it tends to scatter its writes over the disk, so incremental backups are still large, but they’re not as large as when Time Machine backs up the VM directly. Typically, your incrementals may be a few hundred megabytes with no VMs, a few gigabytes with a VM stored on a sparse bundle (for Windows. Linux may be better behaved), and a few tens of gigabytes with the same VM stored in the standard way.
First lets create a new disk image based on a sparse bundle and move our VM onto it. We’ll need to know how large to make the VM, so go to Documents and look in Virtual Machines. In there is one folder per virtual machine and you can find the VM’s size by clicking on the corresponding folder and hitting cmd+I:
Create the disk image
Now create the sparse bundle. The point-and-click way of doing this is to use Disk Utility, so start that up (I use spotlight to do so):
and click on New Image:
Then fill in the details. I made my sparse bundle file-system for the Windows XP VM twice as large as the space it currently occupies, to allow for future expansion — so 50GB in my case (don’t worry: it only uses as much real disk as is needed to store the actual content). Here’s all the fields you need to change:
- The Save As is the filename for the sparse bundle whereas the Volume Name is the name the disk will have when mounted — I made them the same;
- I saved my sparse bundle in Documents->Virtual Machines;
- Image Format needs to be sparse bundle disk image, as that’s the whole point of the exercise.
Now click on Create, and
a few seconds later you have a sparse bundle file-system image.
Now double-click that file (mine’s called VM disk.sparsebundle).
Mac OS will mount it…
and the new file system will appear on the desktop.
Move the VM into the new disk image
Next, drag the folder(s) corresponding to the VM(s) you’d like backed up by Time Machine onto the new disk. Hold down cmd as you drag and drop, so that you move the folders (rather than copying them):
The .sparsebundle file needs to be mounted every time you log in, so that the file-store is available. To do that, go into System Preferences->Accounts, click on your username and then on Login items. Now drag your sparsebundle file into the list of login items:
Using your newly-homed VM(s)
To use your new VM(s), just double-click on the corresponding folder — perhaps put an alias to it on your desktop or in the dock. When you next use it you’ll get a message:
Just click on I moved it and you’re sorted.
As with any method of backup which relies on backing up the virtual machine’s disk image using the host operating system, your backup may not be of any use if it’s made whilst the VM is running, so I suggest you make sure that Fusion/Parallels is not running when Time Machine is backing up your data. If you don’t always manage to do so then some of your backups may not be valid.
Because if you backup the files that Fusion (or Parallels) is using for a disk image, then you’re backing up what’s on disk, but not what’s in memory, in disk buffers, etc. So when you come to restore from backup, you may find that the disk image is corrupted. In the worst case scenario you won’t be able to start up the VM’s operating system successfully at all, or restore any files contained within the VM’s file-store.
By backing up when the VM isn’t running, you ensure that all data is on disk in a safe, consistent state.
Windows Vista prompts for you password every time it comes out of sleep / hibernation. If you’d rather it didn’t then here’s how to disable that behaviour.
If you have a Windows Vista machine in a secure (enough ) environment then you may not want it to prompt for a password every time it comes out of standby. With previous versions of Windows it was pretty obvious how to choose this behaviour (in XP it’s under the Advanced tab of the current power scheme in Power options for example — in fact, it’s still there in Vista but it’s buried deep).
Under Vista it’s far less obvious, but the setting is there if you know where to look for it.
First, go to Power options in the control panel. I find it easiest to do this kind of thing by bringing up the Start menu and then typing (in this case) power, and then selecting Power Options:
Next, in the Power Options window, don’t click on change plan settings as it’s somewhat buried in there nowadays. Instead, select the Require a password on wakeup link that’s lurking in the top-left of the window:
You will then be presented with a window which looks useful, but in fact the Don’t require a password option you’ve been looking for is greyed out — you can’t select it! This is because you first need to click on Change settings that are currently unavailable:
And finally you’re in a position to select the option:
It’s worth repeating that you should only set this option if you’re happy that someone with no knowledge of your login details can walk up to your suspended Vista session, wake it up, and start doing stuff as you.
The Open Source Community and Microsoft do have something in common after all.
I was trying to figure out why firefox doesn’t sit as well on Mac OS as I’d expect — why it feels slightly alien on there (as does thunderbird), and then it occurred to me: firefox, thunderbird, et. al. are, in some ways, more akin to Windows than Mac OS.
I’ll explain (I think I’d better ).
Mac OS is pretty complete out of the box. If you’d like to burn an ISO image onto CD, or browse that ISO image, or ssh to another host, or use VNC, or… then it’s all already there, well integrated and working from the start.
Windows isn’t like that — the basic OS lacks a lot of functionality. If you’re going to burn an ISO, or browse one then you’ll need something like Nero. If you’d like to ssh to another machine then you download putty, if you’re going to connect to another machine using VNC then you’ll need that, and so on.
What you end up with is a whole host of extra software, all pretty much working, but all pulling in slightly different directions and all clearly written by different companies with different ideas about the user interface, and differing levels of integration with the whole.
Firefox and friends are also a little like that. The basic functionality is in the application, but all the extra frills are plugins, written by many different people. Many of the plugins are a little quirky, and they all tend to pull in slightly different directions — sometimes interacting badly with each other. It works, but it’s not elegant.
Microsoft and the Open Source Community do this for very different reasons. Microsoft does it to spread their programming effort as thinly as possible (I guess they’d say as efficiently as possible), always concentrating on ‘value’, and never on quality. The Open Source Community do it out of necessity: not everyone can be hacking the central code all the time, it’s just not practical, and the plugin approach enables a huge number of people to work on additional functionality whilst keeping the project manageable.
The world would be a much poorer place without open source software, but there is a price to pay. The plugin approach that open source development engenders leads to some great software (I wouldn’t give up my Squeezeboxes for the world for example, and my squeezeserver is bristling with plugins), but those systems do sometimes feel like they’re all elbows and knees — rather awkward, and somewhat less than elegant.
Free music — yes, really.
Face the music
Spotify is a source of music that seems too good to be true, but it’s there, it’s legit, and it allows you to listen to pretty much any music you like for free.
The player runs on both PC and Mac (and even Linux under Wine), and it would seem to have an extensive catalogue. The Enemy, for example, is recent and not exactly mainstream pop, but they’re there to be listened to. (They’re good — why not check them out?)
Spotify also has a radio tab, where you can specify which genres you’re interested in, and which decades and the player feeds you relevant music (interspersed with adverts but hey, what did you expect?).
Spotify has announced that they’re allowing UK users to join without the need for an invitation — so if you’re based in the UK then the rest of this article is no longer relevant to you — you can simply visit www.spotify.com and sign up.
Sorry — no invitations left
I’ve handed out all my invitations now I’m afraid — sorry. This article used to say:
If you’re outside of the UK then Spotify is free by invitation only (if at all), and I have some invitations to give away. If you’d like an invitation then drop a comment at the end of this article and I’ll send you one, while stocks last
I’m not connected with the guys at spotify in any way, but such a worthy app deserves to be heard.
Once you’re invited
There will be a link in the email — follow that link, download the app, and you’re there.
Some differences between Windows and MAc OS X can be dangerous…
Having just moved my world from Windows (XP and Vista) to Mac OS X, I thought I’d share some of the differences I’ve come across which can cause irritation or even data loss for the unwary.
Does the output from your Epson R800, R1800, R900, R1900 look faint? Are you printing from Mac OS but hosting the printer from Windows? Here’s the fix.
[ I guess this will also be true of other Epson inkjet printers such as the newer R900 and R1900 —Mark ]
I have an Epson R1800 (the A3 variant of the R800) plugged into a PC running Windows and shared on the home network.
The other day I set up my MacBook Pro to print to that printer share and all was well until I collected the output — it was really faint, we’re talking about something like 50% opacity — only half there!
To cut a long story short: if you want top-quality output, with full control over the gloss etc. then you’re going to have to plug the printer into your Mac, but you can get close with the printer hosted on a Windows machine. The answer to the faint-print problem is that you need a newer version of the Gutenprint drivers for Mac OS X. The old versions supplied with Mac OS leopard are seriously broken (although they do save on ink .