Mac


[Update] Someone going under the name ‘longhorn’ just posted a comment that the method described here is dangerous and has led to problems with his image. And although I have used this myself with no problems so far, I do believe that it’s better to be safe than sorry. Apparently, there is a better tool to manage vmware images, called diskTool (typically found under /Applications/VMware Fusion.app/Contents/MacOS). A quick test to grow an image failed with a malloc error, but I will look into this and update this post. And the golden rule to always make a backup before you try stuff like this, still applies of course (I *do* mention this in the post)…

 

I’m probably not the only VMware user who has underestimated the amount of disk space he needs, only to find out a couple of months later, that the disk is filling up faster than expected. Fortunately, this is (relatively) easy to fix. That is, if you have enough ‘real’ HD space of course!

Warning: always backup your data before doing things like changing partitions etc…!  

First, download a copy of vdiskmanager-GUI (oh, I forgot to mention: I will explain how to do this on a Mac). I could only find it here (technically speaking you don’t need this, as it is just a wrapper around the VMware provided vmware-vdiskmanager command-line tool). Open this tool, and select the ‘Expand’ tab. Choose the vmdk (virtual disk image) you want to expand, and enter its desired size (6Gb in my case):

If you click ‘Go’, the vmdk file will expand to the desired size.

 For those of you that don’t have a mac: you really should 🙂 No, you can easily accomplish the same thing: on the bottom of the screen you can see the command that will be executed if you click ‘Go’. So just locate vmware-vdiskmanager (it is probably somewhere in your c:\program files\vmware directory, and run it with -x <desired size> <path_to_vmdk>. This should do the trick.  Or even better,  just download the VMware-diskmanager GUI for PC here.

  When you reboot the VM, you might be surprised to see that you hard disk in your guest OS (say, Windows XP in this case), is still at its original size! Although it might sound confusing, it is actually perfectly logical, as we haven’t changed the partition, we only changed the ‘hard disk’ the partition is residing on. One way of ‘fixing’ this is doing a complete reinstall of the system, thereby repartitioning the disk. Although it works, it’s certainly not something most of us will look forward to (as it erases all of your current apps and data).

Luckily for us, there is a much simpler way. Just download a copy of a gparted live-cd (ie a cd that is bootable). gparted is the Gnome Partition Editor, which is a linux tool to, you probably guessed it, edit partitions. Although it is linux tool, it does support ntfs, which should be the Windows filesystem you’re using (a list of the supported filesystems). And even better: since it is a live-cd, you don’t even have to install anything. Just download the iso file, and connect the CD player of your VM to this ISO:

 vmware-connect-iso-image.jpg

Now the tricky part: in order to run gparted, you have to start your VM, but force it to boot from this CD instead of your HD. The traditional way of doing this, is to press F2 to enter the BIOS setup. However, under VMware, this is a trail-and-error process, as you have to be really fast to press F2 or it will just boot from the HD.

 

Fortunately, there is a work-around. In your .vmx file, just add  

bios.forceSetupOnce = “TRUE”

This forces VMware to enter the BIOS setup on the next boot (this setting is automatically set to FALSE). In the BIOS, make sure that your CD drive is above your hard drive, exit the BIOS and restart the VM.  

Now you should see linux booting, and gparted will automatically start-up (I selected the default setting on the first list, then just pick your keyboard and language settings from the list). 

If the disk you want to expand, is not already selected, use the drop-down to select it. Then, click ‘Resize/Move’ and either visually resize the partition, or just enter its new size:

gparted-in-action.jpg   

Close the dialog  (‘Resize/Move’) and click ‘Apply’ to actually perform the partition change. After this is done, exit gparted and disconnect the iso from the CD. If necessary, change the boot order in the BIOS setup, and restart into your guest OS. In Windows, this will typically bring up the chkdsk utility. This will check your partition (which is probably a good thing). After that is done: you can start to use that newly added disk space! 

For the last couple of months, I’ve been using VMware Fusion on my (new) iMac, and I have to admit: I love it!First, I used VMware converter to create a ‘virtual’ copy of my work laptop, which runs Vista by the way (that took a few hours, but it works brilliantly). Then, I setup a few profiles in SyncBack to synchronize my ‘working’ directories (home dir, current project, …) to my external HD. After each working day, I run these profiles, so I have an up-to-date backup of my work. Now, whenever I work from home, I just use this backup to bring my virtual machine (ie copy of my laptop) up to date, and I work from within VMware Fusion. What surprised me the most, is that working this way from within Fusion, is actually more comfortable than working on my laptop! This is of course partially due to the big screen (24″ on my iMac compared to 15″ on my laptop), but I’ve also noticed that the speed is better as well (even though I gave my virtual machine only 1.5Gb of memory, while my laptop has 2Gb). And this is under Vista, so I can only assume that it’s even better under XP (performance-wise, that is).

While I was downloading the latest version of XCode on my home machine (an old Mac Cube), I ran out of disk space. As I didn’t feel like upgrading the disk (even if I would, no stores are open at this time), I decided I’d better hunt for those files that were taking up all that diskspace. On my PC, I normally use JDiskReport from JGoodies for that, but for some reason, it didn’t want to scan my disk. However, Google found a mac specific app that seems to do the trick: Disk Inventory X. A few minutes after installing it, I’ve already managed to remove 2.5Gb of old data…

Ibank2 Icon-1

If you want to track your personal finances and are using a Mac, I suggest you take a look at iBank. It’s a nice looking app which clearly is not just one of those quick-and-dirty Windows to Mac ports. And the author is really helpful: a few weeks ago when I was still using the demo version, I had a problem with one of the accounts I made, so I sent him a mail. He responded almost immediately and helped me fix the problem. Great attitude! Only downside is that the speed could be a bit better, but that might be just me, as I am running this on an 5-year old Cube.