How to Resize a Windows VirtualBox VM hosted on Mac OS X
HTML-код
- Опубликовано: 25 июн 2024
- This video shows you how to resize a Windows VirtualBox VM where the host system is a Mac. The instructions for the terminal are from this great webpage: osxdaily.com/2015/04/07/how-to...
The trick I show is really to just use DiskMgmt.msc in Windows to tell windows to use the new space you added using the VirtualBox tool. I take my time so anyone should be able to follow along even if they're new to the Mac. DiskMgmt.msc should be present on Win7 and higher, or maybe Vista, but I doubt it exists on XP. If that bit of info fixes your problem without watching the video, please give the video a like ;).
If you have an problems, especially with using the command line in this video, please check out my additional video which addresses problems other viewers have had when trying to follow this video:
• User question response...
Thanks. Don't forget to like and subscribe.
Eric, thank you for this wonderful post. I know it’s an old post BUT it worked perfectly for me first time.
Wow didn't realize it was this easy. Thank you for thorough and simple tutorial!
Fantastic! This saved me in a moment of desperation.
Thank you so much for posting this video! I needed to expand my Windows Vista OS disk size and this was a life saver (never done it before). Successfully increased it from 25 to 40GB! :)
Glad it helped. Sure beat re-installing everything!
Thank you very much I really checked everywhere. Your new video was also very helpful. Very helpful.
Extremely helpful. Thanks Eric!
I have taken these steps in Ubuntu VirtualBox to resize Windows 10 hard drive. The terminal is exactly the same. Thanks!
Thanks was up until 3 am trying install vs 2015 community on my Mac vm and space was hurting my efforts for win 7 vm..This was a great video. I watched the updated one you did also, which helped also. keep the vids coming! Great content.
Thanks!
Thanks for your tutorial
Ronald
Very helpful video! Works fine for me.
Thanks
Thank you last step helped big time.
THANK YOU! Very helpful video!
Thank you very much, both your tutorial help me resize my c drive,hurray
Cool. the video's getting old and I'm glad its still useful!
Great, super useful. Thanks Eric.
Hey, thanks for your video. It was really helpful ando workef fine for my MACOSx.
Thanks for commenting! I think you're the second comment ever. It's nice to know someone got something out of this.
Excellent. It solved the disk issue. Thanks.
Great! Thanks for the comment.
Helped a lot, thanks!
Thank you, Mr. Eric! You saved the day! ^_^
Thank you so much!! Your video is super helpful!
Thanks!
thank you for the help, also for the problem video I had them too and solved them!!! :)
Very useful, Thank you very much!
Big help. After removing snapshots!
thank you!!! good solution... Salute from Colombian
Thank you, glad it helped!
Thank you so much for your help!
you can change the allocated space in "Virtual Media Manager" (version 5.2.20) instead of going in the terminal, but you still have to go in disk management to expand to the new allocated space
very true indeed
i just did it and it works XD
Thank you ! Great video
Thank you. Glad it was useful!
Thank you! You got me through it. :)
Awesome! Glad it helped.
Thank you very much!
thnx a lot m8 really helped
Worked!
Alright! Good job.
If anyone is having problem using the command line tool VBoxManage, I did another video which goes into it in depth here: ruclips.net/video/LxAxcK2-Qc8/видео.html
thank you!
Nice video
Thanks!
Thank you!
thank you SO much!!!
Thanks! Glad this video is still helping people. This isn't easy stuff so good job to you.
THANK YOU
you're welcome.
Thank You!
Thank you! Glad it helped.
Legend
can you please provide the steps(in Macbook pro) for windows 10 using virtual box resize setup
thanks man! gonna sub if this works
Haha. Good luck. It's definitely an easy-if-you-know-how kind of thing!
Hi Eric, Thanks for great video. I am getting following error messages though "VBOX_E_NOT_SUPPORTED.Failed to resize medium. Resizing to new size 31457280000 is not yet supported for medium '/Users/Ratan/VirtualBox VMs/Windows 7/Windows 7.vdi' I am not sure if it is related to 'Format variant: fixed default'. Appreciate any pointers. Thanks. Ratan
Perfectly!
thank you
You're welcome.
Anyone having problem with "syntax error " should check out his new video.
Thanks for the reply. I'm glad it helped. Here's a link to the video for anyone else stuck with this error: ruclips.net/video/LxAxcK2-Qc8/видео.html
thx buddy!
You're welcome.
I tried to replicate the pathway to my virtual box in terminal to no avail. Always error messages. Finally, I just simply substituted the .vid's UUID number for the pathway and it worked perfectly! The UUID can replace the pathway in the command.
When you have problems with the actual path of the .vdi file, it is likely that you have spaces in the path. To insert a space in the terminal line, simply use a backslash and than a free space. E.g. /VirtualBox VMs/ --> /VirtualBox\ VMs/ ;)
Thanks for the comment. In addition, on the Mac terminal, if you are navigating into the Virtualbox VMs folder and start typing ./Vir and then hit TAB, the "\ " will automatically be insert for you by autocomplete.
That would have been really useful for me... I literally changed the name of each of the folders involving the path, by taking away the spaces, resize the disk, it worked and then when I ran the VB I modified again the names adding back the spaces and it worked but it certainly took more effort.
VBoxManage modifyhd --resize 10240 ~/VirtualBox\ VMs/Windows7/Windows\ 7.vdi
10240 is 10 GB, insert your own size
As mentioned already /VirtualBox VMs/ in Terminal needs to be /VirtualBox\ VMs/ where "\ "represents 'space' in your folder naming
Eric nice informative upload, I know this is old but Im having trouble using the tilde command and locating the vdi file in terminal that described in the video. I am getting nothing but file error messages. I even tried going away from tilde in using drive/users/ etc etc.. with still no luck. Its kind of frustrating since I located the vdi file in finder.
So the tilde is just a shortcut to your current user directory. So if I type "cd" by itself it will send you straight to your current user's directory. If you then type the tilde by itself, it will print /Users/(your name here). So make sure those are working. Using the tilde should work no matter where you are, so no matter where you are ~/Desktop should take you to the desktop.
Now that I think about it, other people had problems so I did another video posted in the first comment which is @ which goes over the command line in more detail. That may be useful to you. It sounds like a great next step.
@@ericrosko Tilde and cd are working, I am only getting trouble when I am using the showhdinfo command, tilde, then file where vdi is located and still getting nothing. Also pressing the tab key is not registering autocompletion of parameters
@@Realist250 It's hard for me to know what is going wrong, but try checking out my other video which is pinned as the first comment. You might try replacing the tilde with the full path, as the tilde is just a shortcut to the user directory. if you can navigate in the directory of the vid file just type pwd to print the present working directory.
@@ericrosko The second video solved it for me; the double quotes was the solution. I appreciate your videos and your effort in replies. Just a suggestion I would give is that other video is hard to find( wasn't exactly pinned), I would put the link in the description. Keep up the good work!!
@@Realist250 Hey thanks for the suggestion. I have added the additional video link in the description. I didn't think of that, and it should help people.
Can you do a video on how to increase the Video memory as well? I can't figure out the command to do it but, I know that there is a command to raise it from 128 to 256. I'd really appreciate it if you could make a video about it
You can do that in the Settings for the VM. Make sure your VM is off, then in VirtualBox click the VM you want to 'add' memory too. Then click the Settings button in the top toolbar, or just right-click and choose Settings. The dialog box for Settings will have a toolbar, and select 'System', the second button from the left. Under the Motherboard tab you will see a slider so just drag it to the right for more memory. I keep mine at 4096MB for my Win8 VM and it runs great. The amount of virtual memory you can add depends on how much real ram your computer has. My laptop has a crazy 16GB so giving 4GB to the VM doesn't hurt it. If I had just 8GB I'd keep it at 2GB or 3GB. It's easy to experiment to find the sweet spot. Let me know if this helps. I suppose I could do a video on the settings.
One thing. the new version of virtual box uses VBoxManage modifymedium. (its in their help doc but it does the same thing)
Another thing... if you did a recent windows upgrade, you may have a recovery partition you need to get rid of before you can extend the drive into the new empty partition. this link was helpful.
www.windows10forums.com/threads/recovery-partition-getting-in-the-way-of-extending-c-partition.7777/
How do you do this on Linux VM
Great video. I tried your technique, but received this error. "VBOX_E_NOT_SUPPORTED". Any ideas?
So the first thing to do is always google the error you received. It looks like in this case you probably have a vdi in a fixed-disk format and not a dynamic format. I'm going to assume this is the case. When I use the showhdinfo command line tool to examine my vdi, I get a bunch of info including one line called Format variant. This _probably_ is the one which will tell you if its fixed or dynamic.
MyMachine:VirtualBoxVMs erosko$ vboxmanage showhdinfo ./win8-64.vdi
// deleted stuff
Format variant: dynamic default
//deleted stuff
So if the vdi wasn't originally created as dynamic, you won't be able to resize it. It's been a few years, but I think when I had a fixed-sized vdi, I was able to fix this by duplicating the fixed-size vdi EXCEPT when I duplicated it I added the switch to make the new copy with the dynamic format instead of the fixed-size format. Which makes sense. Then you can resize your new vdi, and then create a brand new VirtualBox virtual machine to use the new vdi. It'll have the same info as the old one. Don't forget to merge all your snapshots before duplicating.
I just opened virtual box 5.2.8, and noticed there is a brand new button in the upper right called Global Tools which lets you use the GUI to resize your dynamic disks. That should make things easier. I prefer doing this on the command line though for two reasons: 1) I can put all my steps in a text file, including the commands I used, so I can refer to them later and 2) If I ever need to write a script to automate the process, the script will need the command line versions of everything since the script can't click the mouse in the GUI.
i still cant find the directory should i send a screenshot of terminal and you can see what i am doing wrong
If you are not sure of the path to the Virtual Disk Image, or where the associated files are stored, you will be able to look in the Settings for that OS install in the Virtual Box UI. All of the paths are in there, you just have to hunt for a bit. You might even be able to find the path, copy it to your clipboard, then paste it into the terminal with cd . You'll never have to guess where something was placed, the paths will all be somewhere in the settings if you just hunt for a bit. Good luck.
help me it says
(Oracle VM VirtualBox Command Line Management Interface Version 5.1.14
(C) 2005-2017 Oracle Corporation
All rights reserved.
Usage:
VBoxManage modifymedium [disk|dvd|floppy]
[--type normal|writethrough|immutable|shareable|
readonly|multiattach]
[--autoreset on|off]
[--property ]
[--compact]
[--resize |--resizebyte ]
[--move ]
Syntax error: Invalid parameter 'Windows.vdi')
after i did the command.
So let's look at the error, which says "Windows.vdi" is an invalid parameter. It is possible that you are not giving the full path to the vdi file. To be on the safe side give the path from your user directory, i.e. ~/your/path/Windows.vdi. If you are in the folder with the vid, you may need to a ./ in front of the file name. If you're not sure what I mean, just google using ./ in the command line. The other option is that you are giving the parameters in the wrong order. It's easy to get them mixed up so hopefully a bit more experimenting will help.
You probably should have included the statement you were actually trying to run besides the usage statement. Hope this helps.
Thanks, I tried but I keep getting this error:
VBoxManage: error: Could not find file for the medium '/Users/Steve/Users/Steve/VirtualBox VMs/windows/Windows10.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file VBoxManageDisk.cpp
I dragged the .vdi file into terminal, so I know the pathname is probably correct. I don't really understand what I am doing wrong.
I typed this:
VBoxManage modifyhd --resize 1000000 ~/Users/Steve/VirtualBox\ VMs/windows/Windows10.vdi
Would you know whats wrong?
What can I do bro?
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize medium operation for this format is not implemented yet!
Thanks!
yes it is an VDI
Well, I googled that error code, which is step #1. It looks like you are probably trying to resize a fixed size virtual drive, which is impossible since a fixed size drive is meant to no be changeable. When you create a drive it gives you an option to make it fixed size or dynamic. It looks like the solution is to clone your fixed size drive using VirtualBox's software except when you do so specify you want the new copy to be a dynamically resizing drive. So then you have a perfect copy, except your new clone will have a dynamic format. Then you can alter the size of the new dynamic drive, and once that is successful you can safely delete your original fixed size drive. Keep your original fixed size drive around until you are sure the new drive is successful.
So its really just a step by step process. Once you resize your drive you'll either have to create a new VB using it, or you can probably just copy it where the original VDI existed and hopefully all will be ok when you boot up.
yet it 2024 its still useful
im using win7 theres no diskmgmt app that i can find??
ok, found another way - www.lifewire.com/how-to-open-disk-management-2626080
I don't have a Win7 machine to check on, but I think you have to use DiskPart, which is a command line tool which frankly is pretty confusing. I think it was the replacement for fdisk, which was simpler but I'm sure doesn't have all the features of DiskPart. Sorry!
Syntax error: Invalid parameter '30000'
I keep getting this error
Well, it looks like the program doesn't understand the value you are passing in. It's possible the value needs a parameter name to go before it, so it knows 30000 is for a specific parameter value. Sometimes the order of the parameters matter. If they don't matter, values are often proceeded by parameters names like "--size" or some other piece of text to indicate the next thing after it is the value of that parameter. I would recommend checking out my other video I made on using VBoxManage which may help, and the link is in the description.
What is OS ex?
It's just they way the Mac operating system is pronounced. It's currently on version ten, but instead of saying 'OS 10', you pronounce the roman numeral ten (X) and say Oh-ess ex since all the marketing says "OS X".
Im on Virtualbox6 and had to run cmd
VBoxManage modifymedium /FILEPATH.vdi --resize 120000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Ok so for some odd reason i keep getting the following error below: (note i even cloned the vdi from OFFICE.vdi to dynamicOFFICE.vdi; Running Windows7)
phobos:MacOS khurram$ VBoxManage modifymedium --resize 10240 /Users/khurram/VirtualBox\ VMs/OFFICE/dynamicOFFICE.vdi
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize medium operation for this format is not implemented yet!
phobos:MacOS khurram$
FYI:
phobos:MacOS khurram$ VBoxManage showmediuminfo /Users/khurram/VirtualBox\ VMs/OFFICE/dynamicOFFICE.vdi
UUID: d1d2211f-647a-4400-a980-76ad937e50f3
Parent UUID: base
State: created
Type: normal (base)
Location: /Users/khurram/VirtualBox VMs/OFFICE/dynamicOFFICE.vdi
Storage format: VDI
Format variant: dynamic default
Capacity: 51200 MBytes
Size on disk: 51080 MBytes
Encryption: disabled
phobos:MacOS khurram$
Ready to pull my hair, What am i doing wrong?? :(
It looks like your current vdi disk size is 51 gigabytes (51200MB). You are trying to resize it to 10 gigabytes (1024MB) which would shrink it and it doesn't look like shrinking is supported, only making it bigger is supported. Which makes sense because it wouldn't know what files to get rid of to fit in the smaller size. Maybe you meant to double the size which would be 100240, but you could probably get by with 65000MB and resize again later if you need more room.
I dont know why i didn't think of this before! Thank you so much it worked out perfectly. I wish they had some sort of a switch to add additional space on top of existing...
Great! Glad you got it working.
It worked but it says to install windows again
oh never mind I deleted the vdi file
Glad you found the problem. It can be a bit tricky the first time.
@@user-yk6dr2py6q lmfaoooo
thank you!
You're welcome!