Welcome to OUR GLOBAL IT COMMUNITY.

Bringing together top IT experts, IT professionals and you to find solutions to today's biggest IT challenges. Ask for expert advice, post a solution and surround yourself with IT knowledge.

MEET THE EXPERTS

Brian Milne
Brian Milne
Daniel Petri
Daniel Petri
Debra Shinder
Debra Shinder
Lawrence Abrams
Lawrence Abrams
Lowell Heddings
Lowell Heddings
Jenny Stout
Jenny Stout

CHALLENGE

Resize a disk image used with VirtualBox in Ubuntu?

Asked by Danny, Nipomo, California - November 9, 2009

I represent a small business, with a single computer running Ubuntu and several virtual machines. I have set up a virtual machine on my Ubuntu box running WinXP, and joined it to my domain. Sadly, I only allotted 6GB of space for the image, and now I am running out of space. Is there a way to resize the disk image that wouldn't take longer than simply reinstalling the OS in a new virtual machine?

Topics: Infrastructure Management , Virtualization

Was this helpful?

+16

Yes
  • Unfortunately I only know how to do this in vmware which I shared here.
  • Hi,
    Are you aware that a new version of Virtual Box is now available? The new version seems to have some cool and new features, so you may want to try it and see if it fits your needs.
    HTH
  • Danny,

    In hopes of breathing this challenge back to life with a few more suggestions, we posed your question to the Experts Exchange community.

    Here's ccreamer_22's suggestion on www.Experts-Exchange.com:

    "The only way I can find on how to do this with SP3 is with Acronis. SP2 and earlier you can use Ghost, diskpart or Partition Magic. You create a larger separate disk in virtual box. Then clone it over. Then shut down the VM and set the new disk as the primary disk.

    Quote:
    The VDI files reside on the host system and are seen by the guest systems as hard disks of a certain geometry. When creating an image, its size has to be specified which determines this fixed geometry. It is therefore not possible to change the size of the virtual hard disk later."

    Here's the thread if you want to follow the conversation:

    http://www.experts-exchange.com/viewQuestion.js...
  • The answer to this question depends on the virtual machine software you are using. If you are using Virtual Box, then there is no way to resize VDIs, or virtual disks. One option is to create a larger second hard drive, mount it and then boot the virtual machine using some clone software like Acronis and clone the disk to the larger drive, but this may not be worth the time and effort. Another option is to create a second disk and just use that disk to install any programs and save your data. That frees your original partition for just the operating system. A third option is to create a second hard drive, mount it, and then use Sysinternals Junction tool to mount the root of the new virtual disks partition as a folder on the first hard drive. This will significantly increase the space available on that drive and will be transparent to the operating system

    For those who see this challenge and are running Vmware, then you can use the vmware-vdiskmanager command line tool within a Ubunto shell to extend the virtual disk. Information about this tool can be found here. Then start the Windows XP guest and extend the partition using the Windows Disk Manager.
blog comments powered by Disqus