Page 1 of 1
Difficulty increasing virtual storage
Posted: 12. Nov 2015, 21:03
by Kessa
Hi,
I'm currently running VirtualBox on a Win 8 machine, with Ubuntu x64 as the virtual environment, and I'd like to increase the amount of storage available for the VM.
I've tried following the instructions here:
http://www.howtogeek.com/124622/how-to- ... or-vmware/
I got as far as this bit (obviously replacing the relevant bits in the path, etc with my own path/size requirements:
Code: Select all
VBoxManage modifyhd “C:\Users\Chris\VirtualBox VMs\Windows 7\Windows 7.vdi” --resize 81920
Command line seemed to indicate it was successful, and viewing the Virt Env in VirtualBox also seemed to indicate it had been successful (i.e. it was showing the new GB amount)
However, when I tried to complete the rest of the process using GParted I hit a snag in that GParted didn't show the newly allocated (or should I say unallocated) space.
I checked Disk Manager in Win 8 and that also didn't show any unallocated space so I'm unsure what to do now. (I've had a look around but messing with portioning is outside my comfort area so I don't think it's a good time for me to use the trial and error route

)
Does anyone know why both Win 8 and GParted are not showing any unallocated space? Is there a step missing?
Thanks
Kessa
Re: Difficulty increasing virtual storage
Posted: 12. Nov 2015, 21:14
by Perryg
Are you using snapshots?
See
viewtopic.php?f=24&t=50661
Re: Difficulty increasing virtual storage
Posted: 12. Nov 2015, 21:21
by Kessa
Ah fab, thx. Yes I am using snapshots so I'll check that out. Thx for pointing me in that direction

Re: Difficulty increasing virtual storage
Posted: 12. Nov 2015, 21:54
by Kessa
Hmmm... have tried to do the 2nd part of those instructions but I get the following error:
Code: Select all
C:\Program Files\Oracle\VirtualBox>VBoxManage clonehd "C:\Users\MyUsername\VirtualBox
VMs\Ubuntu x64\Snapshots\{f2538bab-ea89-4fe5-be75-438009ba4d84}.vdi" "C:\Users\
MyUsername\VirtualBox VMs\Ubuntu x64\Snapshots\"C:\Users\MyUsername\VirtualBox VMs\Ubuntu
x64\Snapshots\KTNewVirtualHD.vdi" --format VDI --variant Standard
0%...
Progress state: VBOX_E_IPRT_ERROR
VBoxManage.exe: error: Failed to clone hard disk
VBoxManage.exe: error: Could not create the directory 'C:\Users\MyUsername\VirtualBox
VMs\Ubuntu x64\Snapshots"C:\Users\MyUsername\VirtualBox VMs\Ubuntu x64\Snapshots' (V
ERR_INVALID_NAME)
VBoxManage.exe: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component V
irtualBox, interface IVirtualBox
VBoxManage.exe: error: Context: "int __cdecl handleCloneHardDisk(struct HandlerA
rg *)" at line 743 of file VBoxManageDisk.cpp
Any ideas?
Re: Difficulty increasing virtual storage
Posted: 12. Nov 2015, 22:02
by Perryg
Why not use the vbox manager and the GUI clone feature?
Re: Difficulty increasing virtual storage
Posted: 12. Nov 2015, 23:11
by Kessa
I was just copying the instructions but can give the GUI a shot.
If I click Snapshots, right click and select clone, and take it back to the very 1st one I did, and clone that, do I want to tick the "reinitialize the mac address" box?
I assume I want to do the "Full clone" option and select "everything" for snapshots on the next screen?
Given it's a clone, I assume I then need to still do this bit:
Code: Select all
VBoxManage clonehd <infilename or UUID> <outfilename> --format VDI --variant Standard
Is so, what is the <infilename> / <outfilename>
Is <infilename> the name of the VM, or the name of the snapshot?
(<outfilename> I assume is just the name I want the new file to be called?)
Sorry for the newbie questions

Re: Difficulty increasing virtual storage
Posted: 12. Nov 2015, 23:28
by Perryg
Go into expert mode and select what is shown in the screen shot below. If the guest is Windows then do not select to Reinitialize MAC addresses as this will trigger a validation check. You can then resize the guest since it will not have snapshots. The name can be anything as long as it does not match the original.

- clone_with_snapshots.png (56.8 KiB) Viewed 1969 times
You can not run the new clone and the original at the same time since they will have the same MAC address.
Re: Difficulty increasing virtual storage
Posted: 13. Nov 2015, 00:18
by Kessa
Many Thanks for your help Perry. That seems to have done the trick.
Very much appreciated - thanks!
Re: Difficulty increasing virtual storage
Posted: 13. Nov 2015, 00:48
by Kessa
Looks like I spoke too soon
I can now get GParted to unlock so I can make the required change, and it says the reallocation has been successful.
However, when I close it down and go back to VirtualBox settings and inspect the storage figures, it still shows the virtual size as being 34GB and the actual size as being just over 7GB.
I've tried a reboot just in case that was the problem but it's still showing the same. Not sure where to go from here. Could it be an issue with GParted (i.e. is it worth trying a different tool) or could it be something else?
Re: Difficulty increasing virtual storage
Posted: 13. Nov 2015, 01:00
by Kessa
Re: Difficulty increasing virtual storage
Posted: 13. Nov 2015, 01:06
by Perryg
Post the results of the following command in the hosts command window.
Code: Select all
VBoxManage showmediuminfo <absolute path> <name+extension>
Note: you must be in the directory that has VBoxManage for it to work.
Then from the guest post the results of the following from the terminal window.
Some other things to think about.
1) you must boot the guest with the Gparted ISO in the guests virtual drive to effect any changes to it.
2) it appears you have formatted the guest in LVM which means you will need to actually adjust the partition size with the LVM utility to actually use any of the new space..
Re: Difficulty increasing virtual storage
Posted: 13. Nov 2015, 01:19
by Kessa
I've gone to:
Code: Select all
C:\Program Files\Oracle\VirtualBox
and entered:
Code: Select all
VBoxManage showmediuminfo <absolute path> <name+extension>
and I get:
Re:
it appears you have formatted the guest in LVM which means you will need to actually adjust the partition size with the LVM utility to actually use any of the new space
TBH that's all Greek to me as I don't have any knowledge of what the various options are. I just installed VirtualBox using the default install, and Ubuntu using a package.
Should it not be using LVM (whatever that is)? If not, what should I change it to?
If it's OK to use LVM, what is the LVM utility? Is it a build in tool in Windows/Ubuntu/VirtualBox?
Re: Difficulty increasing virtual storage
Posted: 13. Nov 2015, 01:29
by Perryg
The <absolute path> means to use the complete absolute path to the file and include the extension. You can't just type <absolute path>
LVM is a format that the guest can use and stands for Logical Volume Management You can not really change it so you need to find out how to use it. Google LVM and or ask the Ubuntu folks how to adjust the partition/s
All that VirtualBox can do is to adjust the container size which you do with VBoxManage. Anything else is really outside of the scope here and I do not want to try to teach you how to use LVM ( here ) because it has nothing to do with VirtualBox.
Here is just one of the many links showing something about LVM
http://www.howtogeek.com/howto/40702/ho ... d=noscript
Re: Difficulty increasing virtual storage
Posted: 13. Nov 2015, 01:34
by Kessa
The <absolute path> means to use the complete absolute path to the file and include the extension. You can't just type <absolute path>
I wondered if that's what you meant but (unless I've missed it) I couldn't see which file you actually wanted me to reference in those
Re VLM - that's fair enough, thanks