Thought I would add this here for my own reference as well as others as just spent a bit of time googling around the place to figure out how to do this (I am running Windows 7 as my host system). Long story short you need to use the VBoxManage command.
1) Open a command prompt and browse to the VirtualBox directory, in my case it is C:\Program Files\Oracle\VirtualBox> but it may be different if you installed VirtualBox somewhere else.
2) Type VBoxManage.exe then add the path and file name to the hard disk file that you want to expand and then add -- (note that there are 2 dashes there) resize and then the size that you want the disk to expand to. If you dont know the path to the hard disk file open virtualbox and click on file / virtual media manager then click on the disk you wish to grow and the path will be in the details windows at the bottom.
A properly formatted command might look like this:
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "C:\Users\MyUser\VirutalBox Machines\Vista.vdi" --resize 20000
This would expand the hard disk of the virtual machine named Vista.vdi to 20 gigs. NB: Note the speech marks around the path to the .vdi file...you need these if there is a space in the name of the path to the file location.
3) Now boot your Vista or Windows 7 machine. Press Windows button and R to open the run command and type diskmgmt.msc
This will open the disk management console. Right click on the disk you wish to grow and choose extend volume. Follow the prompts through and hey presto your disk has grown.
NB: You can extend the system volume (typically C: drive) of a Windows Vista, 7 or server 2008 machine natively but if you are trying it with XP you have to use third party tools.
Hope this helps someone.
No comments:
Post a Comment