Page 1 of 2

VirtualBox claims I have no free space on my c: drive

Posted: 21. Oct 2015, 20:04
by Chaim
Hello, could someone please help me with this?

I am running Windows 7 through VirtualBox on a Macbook Pro. When I created the Virtual Machine, I created it with the recommended amount of available disc space, and I have since only downloaded two programs: Quickbooks and Google Chrome. This was less than a month ago. Last week, it started telling me that I was running low on disc space, so I uninstalled Chrome, yet now it is telling me that I have no space available, and it won't let me open Quickbooks. It is imperative that I be able to open Quickbooks, and the only way I can do so is through Windows. Can you please guide me through the process of freeing up disc space, or figuring out why I ran out of disc space so quickly? Thank you very much!

Re: VirtualBox claims I have no free space on my c: drive

Posted: 21. Oct 2015, 20:56
by noteirak

Re: VirtualBox claims I have no free space on my c: drive

Posted: 22. Oct 2015, 04:41
by Chaim
noteirak,

Thank you for your reply. I have to admit, this is all quite new to me, and I don't follow the instructions that you gave in order to resize the virtual drive. I apologize, but could you possibly walk me through it a bit? For example, where do I write those commands? How do I know how much space I have and how much I need? etc. Thank you very much for your help!

Chaim

Re: VirtualBox claims I have no free space on my c: drive

Posted: 22. Oct 2015, 13:35
by scottgus1
Not a Mac user here, but you should have a command window or text terminal of some sorts where you can type commands and text comes back from the command. Type the tutorial's Step 1 command there. You have to figure out the parts in <>'s. This will make the Virtualbox disk file's final size setting ready to be bigger.

Since your guest is Windows 7, Step 2 takes place inside the Windows OS while it's running. You right-click My Computer, then Manage. On the Computer Management window that appears, click Disk Management on the left pane. In the middle will soon appear the disk layout of the main drive the guest OS is running on. You will now notice that there is empty space on the end of the drive. Right-click the C: drive partition and choose Extend Volume. Use the wizard to extend C to use the new space.

Re: VirtualBox claims I have no free space on my c: drive

Posted: 22. Oct 2015, 13:42
by mpack
And don't do any of this if snapshots have been used, or if you didn't choose VDI format when you created the VM.

Re: VirtualBox claims I have no free space on my c: drive

Posted: 22. Oct 2015, 19:44
by Chaim
Thanks everyone,

I didn't use snapshots, as I don't even know what that is, and I did choose vdi format. However, how do I know what to put in the <> space? I can see that my system was set up with a base memory of 1500 MB, the video memory is 16MB, and the storage, under SATA Port 0 says: Windows2.vdi (Normal, 25.00 GB).

With that info, could you help me figure out what it is I need to change, and exactly what to write in the command prompt in order to do that? Thank you very much!

Chaim

Re: VirtualBox claims I have no free space on my c: drive

Posted: 22. Oct 2015, 20:04
by scottgus1
There's two <> sections mentioned in the tutorial: <absolute path to file> and <size in MB>

<absolute path to file> is the drive and path your Mac uses to find the .vdi file, in your case Windows2.vdi. Search for that file and copy the drive and path into the command. I don't know what a Mac drive & path looks like.

<size in MB> is how big you want the new drive to be.

So, using the example in the tutorial, taking a 10GB drive to a 20GB drive:

Code: Select all

VBoxManage modifyhd My/Macs/path/to/Windows2.vdi --resize 20480
Also, don't forget to back up first! See "Moving a VM" viewtopic.php?f=35&t=55003 and re-interpret it as "Backing Up a VM".

Re: VirtualBox claims I have no free space on my c: drive

Posted: 22. Oct 2015, 20:10
by noteirak
Since your disk is at 25GB already, I would recommend going up to 35GB, so for the command argument that would be

Code: Select all

VBoxManage modifyhd My/Macs/path/to/Windows2.vdi --resize 35840

Re: VirtualBox claims I have no free space on my c: drive

Posted: 22. Oct 2015, 21:21
by loukingjr
Maybe this will help…
loukingjr wrote:the easy way... first in the terminal type in... VBoxManage modifyhd then drag the .vdi file into the terminal window, then type in the rest... --resize 35840

Re: VirtualBox claims I have no free space on my c: drive

Posted: 17. Nov 2015, 18:24
by Chaim
I'm still having trouble with this. I tried all of the suggestions, but, when I put in the command: VBoxManage modifyhd /Users/chaimzimmerman/VirtualBox\ VMs/Windows2/Windows2.vdi --resize 35840 as directed earlier, I get an error message:

VBoxManage: error: Failed to lock media when compacting '/Users/chaimzimmerman/VirtualBox VMs/Windows2/Windows2.vdi'
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "Resize(cbResize, pProgress.asOutParam())" at line 690 of file VBoxManageDisk.cpp
VBoxManage: error: Failed to resize medium!

Can anyone please help me figure out how to get this fixed? I can't access some very important files right now and don't know what to do! Thanks!

Re: VirtualBox claims I have no free space on my c: drive

Posted: 17. Nov 2015, 18:34
by noteirak
You need the VM to be stopped and no other program using the disk file. Is that the case?

Re: VirtualBox claims I have no free space on my c: drive

Posted: 17. Nov 2015, 18:35
by scottgus1
Per this link viewtopic.php?f=7&t=74462 Perry mentions the " Failed to lock media " error may happen when the guest has a saved state. Start thr guest again then fully shut down the guest using the Windows Start menu Shutdown command.

When the guest is properly shut down, do yourself a really big favor and copy that .vdi to another folder. If anything goes belly up on the resize and ruins the vdi you have a backup to copy back into place.

Now try the resize again after the guest has been fully shut down and the backup has been made. If it works, great! If not, get thee to a Windows PC with a copy of the .vdi on a USB drive and run Mpack's CloneVDI in the Windows Hosts section of the forum. It should easily expand the vdi.

Re: VirtualBox claims I have no free space on my c: drive

Posted: 17. Nov 2015, 18:52
by Chaim
I've tried it with VirtualBox stopped, and the following appears (I'm sorry it's so long. I don't know how to describe it without just copying the entire thing):

[mod edit - removed the command usage]
Syntax error: Invalid command '/Users/chaimzimmerman/VirtualBox VMs/Windows2/Windows2.vdi'

Re: VirtualBox claims I have no free space on my c: drive

Posted: 17. Nov 2015, 18:54
by noteirak
you forgot the middle of the command.
Copy/paste this:

Code: Select all

VBoxManage modifyhd "/Users/chaimzimmerman/VirtualBox VMs/Windows2/Windows2.vdi" --resize 35840

Re: VirtualBox claims I have no free space on my c: drive

Posted: 17. Nov 2015, 19:01
by Chaim
Thank you for your help! I just tried what you showed me, and I got this response:

VBoxManage modifyhd "/Users/chaimzimmerman/VirtualBox VMs/Windows2/Windows2.vdi" --resize 35840
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Does that mean it worked? Is it now ready to go, or do I have more steps to do first?