It has been almost 10 months since I started running Gentoo inside VMWare on my Windows desktop. It made coding at work (mostly application server related) much more bearable. I have since upgraded to VMWare Server, keeping my Gentoo installation in sync and the uptime of my Gentoo VM usually out-lives the uptime of my Windows host, if I remember to pause it before I reboot Windows due to various updates. I am pretty happy.
Then last month I decided to make some change to my Linux partition. First of all, I have decided to ditch ReiserFS for XFS as it has lower CPU utilisation. It’s pretty much a small single-user installation so I don’t need the speed I can get from ReiserFS, and since it runs on my notebook I want save battery when I am away from the mains.
I would like to pre-allocate the entire disk image. After a while the
vmdk file gets a bit fragmented on NTFS and that really kills the performance. So I decided to just allocate the lot when I change the file system type at the same time.
Also VMWare Server recommended to use SCSI instead of IDE virtual drives. Well, the underlying physical drive is still that slow 4,200RPM 2.5inch notebook drive, but I can imaging that there’s more flexibility in emulating a SCSI bus than an IDE equivalent.
Now talking about changing hard drives, I can imagine how much work it is require to do on a physical server. Backing up the files, shutting down, installing the new drive into the physical server, rebooting, re-partitioning the drive, copying files over, doing the power cycle again to take the old drive out, etc. This kind of thing is almost too trivial on VMWare.
- Press that Red Button to shutdown your VM.
- Attach a newly created virtual SCSI disk.
- Attach a virtual CD-ROM drive that points to my rescue disc ISO.
- Power up VM, and boot into rescue disc.
- Mount both drives.
(cd /mnt/hda1; tar cf - .) | (cd /mnt/sda1; tar xvpf -)
lilo -r /mnt/sda1.
- Unmount both drives, and shutdown the VM again.
- Detach the old IDE drive. Detach CD-ROM as well as I probably don’t need it again.
- Boot up my VM — and all my files are now on this new “hard drive”!
And best of all, you can do all the above without a screw driver. Don’t I love VMWare?
I have found some interesting VMWare images at VirtualAppliances.net recently. They are tiny Linux images that can run on Xen or VMWare, and each image provides a single functionality. For example, you can grab a VM with PostgreSQL pre-installed at only 14Mb download.
Maybe that’s what the future appliances is. Instead of buying small gadgets that do well on one thing, you buy a beefy server, and then drop in many small “virtual gadgets”. Need an extra MySQL server? Just deploy another one using VMWare. Need a Firebird server? No problem. Too much load? Real-time migration of virtual appliances to another beefy server with minimum downtime.
There’s plenty of market on virtualization technology, and there’s plenty of market on those gadgets that utilise virtualization.