Subversion hosting, CVS hosting, Trac hosting, Bugzilla hosting and software collaboration Providing hosted Subversion, CVS, Trac and Bugzilla repositories

February 20, 2008

Pssst… Hey Kid, Wanna Free Hard Drive?

Filed under: Misc — Tags: , — Greg Larkin @ 8:17 pm

Hi everyone,

Here’s a little trick I’ve been using for quick deployment of additional virtual disk space to the VMware VMs that comprise the service. The VMware Server installation includes the vmware-vdiskmanager tool for creating, renaming, expanding and generally messing about with virtual hard drives.

However, I don’t like running this tool to create a new 50Gb virtual disk in the middle of the day because it just slams the disk I/O channel. To get around the problem, I’ve created several disks of different sizes during off-hours and compressed them down for easy storage. Then when I need to provision a disk, I expand it, rename it and hook it to the virtual machine in Virtual Center:

VirtualCenter Add Hardware Wizard

So here are some compressed disk images for you (SCSI format):

  • 10Gb (8391 byte download)
  • 20Gb (16415 byte download)
  • 50Gb (40373 byte download)
  • 100Gb (80373 byte download)

Once downloaded, extract them as follows:

nice -19 bzcat xxxGb.tar.bz2 | tar xvfB -

CAUTION: The resulting extracted files will be the actual size represented in the filename. They compress down so well because they are mostly empty space until they are hooked to a VM and a filesystem is created.

After I extract the files, I typically rename the virtual disk to something more meaningful, like the name of the mount point in my VM. This way, I can easily tell which virtual disk is used for what without consulting the VM config file. The disk rename command looks like this:

# vmware-vdiskmanager -n 10GbDisk.vmdk UsrSrc.vmdk
Using log file /tmp/vmware-root/vdiskmanager.log
Renaming completed successfully.
# ls *.vmdk
UsrSrc-f001.vmdk  UsrSrc-f003.vmdk  UsrSrc-f005.vmdk  UsrSrc.vmdk
UsrSrc-f002.vmdk  UsrSrc-f004.vmdk  UsrSrc-f006.vmdk


Bookmark and Share

Keep in touch,
Greg, LLC

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Call me - Greg Larkin: error

Powered by WordPress