Home > Blogs > VMware Fusion Blog > Monthly Archives: November 2008

Monthly Archives: November 2008

VMware Fusion 201: Preallocated Virtual Disks

Last time I covered sparse virtual disks. This time, let’s look at the other option: preallocated virtual disks.

If you recall, the main advantage of sparse disks is that space is not grabbed upfront, but rather as needed. A preallocated disk, on the other hand, is (as you might expect) preallocated. You tell Fusion that the virtual disk should be 10 GB, and Fusion goes off and grabs 10 GB of disk space. Performance may be slightly better with a preallocated disk.

There are fewer problems with fragmentation on a preallocated virtual disk. As you might recall, there are three layers where a sparse virtual disk can get fragmented: the guest filesystem, the .vmdk file, and the host filesystem. A preallocated disk avoids fragmentation at the .vmdk file level, and fragmentation at the host OS filesystem level will not grow worse over time (since Fusion already grabbed all the disk space, there’s no need to get more). For best results, you can defragment the host filesystem before creating a preallocated virtual disk to make sure it’s as contiguous as possible.

Having a preallocated disk doesn’t mean that your virtual machine will always be the same size, however. The most obvious example is that taking a snapshot or using AutoProtect will increase the needed space, and snapshots tend to grow over time.

Personally, I stick with sparse virtual disks. I like the flexibility of having extra space, which lets me keep more virtual machines at the same time than if I had to commit all that space right away. The only downside is that I have to be a little more careful about not running out of space, but I keep enough free that it’s never a problem.

Bonus Tip: Snapshots

People sometimes get confused about how snapshots work and how to use them. While snapshots are incredibly useful for many things, one major misconception is thinking that they are a form of backup – they’re not! If a lightning strike totally fries your computer, a snapshot won’t help if it’s on the same disk (because your snapshot just got fried too). Sure, you’ll probably get lucky – if your computer merely shut down uncleanly, your snapshot may still work. You might not even need to go use the snapshot. But this is not a backup, it’s gambling.

If you want to back up a normal virtual machine, shut down (or suspend) the virtual machine and quit Fusion — you never want to try to read or modify virtual machines when Fusion is working on them. From the Finder, copy the virtual machine to a suitable external drive. Done! If you’re feeling really backup-ful, keep the external drive offsite – this way you’re protected against disasters that affect your entire location (e.g. fire, flood, etc.) A snapshot is better than nothing, but it’s not true backup.

Continue reading