Wednesday Oct 15, 2008

Growing a VMWare Fusion Disk

This is probably the most common operations users will want to perform on existing VMs. On the Hard Disk settings page for the VM, you can find a nice little slider for the disk size. Simple enough you think. Change it, apply, and wait while it chugs for a long while. Reboot your VM, and find that to your surprise the VM still sees the old smaller disk size.

This makes sense when you understand what changing the disk size in the Hard Disk settings page for Fusion really does. It changes the disk size, but it doesn't update the partition table for guest OS. Hardly what the average user expects.

If you Google on this topic, you'll find lots of information about using archaic VMWare command line tools for this purpose. Most of the threads suggest the creating a new VM and reinstalling the guest OS is the easiest option (!!!), Luckily there's a better solution. Download gpartd, a Linux partition manager that understands NTFS as well. Get the live CD (iso), and configure VMWare to boot from it. You need to tell your guest OS to boot from the CD. Do this by quickly pressing F2 before it boots, and changing the boot device order. gpartd has a fairly nice GUI with an obvious "resize" option.

As I mentioned earlier, this is not what the average user expected from Fusion's uber-high level settings GUI. The grow disk option should either be removed (from the GUI), or it should do the obvious (grow + re-partition to use all the added space). If the user wants to do something different like create multiple partitions, let them use the command line utilities. There's not many reasons to do anything other than use all the space in a single partition.

Friday Jun 06, 2008

Importing / Exporting Virtual Disk Images with Virtual Box

Virtual Box is amazing for an open source project. It comes close to VMWare in usability. Where it falls short is importing and exporting images. There's no support in the user interface for this. If you feel comfortable using the command line, you can export and import a disk image. Here's how,

To export:

  1. Shut down the VM
  2. Use the "VBoxManager clonevdi ..." CLI to copy the disk image. On my Mac this was at /usr/bin/vboxmanage

To import:

  1. Register the disk image: File>Virtual Disk Manager>Add
  2. Create a new VM, and use the disk image you added in step 1

The obvious problem is that the .vdi file is just a disk image. It doesn't capture the virtual machine. You must know the correct parameters to use when you create the VM in the import process or the disk image won't be able to run. It also doesn't capture the state of the virtual machine. 

Vbox has a very nice snapshot feature. If one could import / export snapshots it would be perfect.

About

jtb

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today