Time machine friendly virtual machine (VirtualBox) image files?
Solution 1:
According to this blog post:
http://blog.matteocorti.ch/?p=331
creating a snapshot will do the trick:
simply create a snapshot of your machine. VirtualBox will then leave your hard disk image untouched and create a separate file with just the changes from the time of the snapshot.
Solution 2:
After some tinkering around, it seems VirtualBox allows you to create the virtual hard drive as VMDK files (native format of VMWare). VMDK files allow you to split the total image into 2GB chunks, so a 30GB hard drive is actually 16 files
- 1x Meta file (text file listing all the actual files) ~few KB
- 15x 2GB VMDK chunk files (the actual virtual disk)
I've yet to hook up Time Machine to see how friendly this makes it, but I think this might actually work.
[Update #1] This is certainly quite useful! I no longer face a full copy of a 30GB image, the backup is about 3-4 GBs (because multiple chunks are updated on each bootup). One change I'd do if I were starting over again, I'd might make each chunk/slice about 200MB each so that (worst case) when any file is updated, 200MB is to be updated instead of 2GB.
[Update #2] I brought this up on the VirtualBox developer forums and it seems that the VMDK spec defined by VMWare (and used by everyone else, including Oracle VirtualBox) is hardcoded at 2GB chunks. So there is absolutely no flexibility to drop chunk size down to 1GB/500MB or 200MB.
Also, unlike the simple bootup tests I had done before, I've since noticed that if I do anything useful inside the Windows 7 VM, Time Machine's backup size goes to 10-15GB! Somehow a LOT more chunks are being hit even if I write little data (I suspect fragmentation of files across many chunks + swap file)