[Solved] Increasing the disk size of a VM
-
- Posts: 100
- Joined: 11. Jan 2017, 17:33
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: MS Windows XP, Linux Mint
- Location: Stockholm
[Solved] Increasing the disk size of a VM
I have Windows 10 Home as host and Linux Mint as guest and the VBox version is 5.2.12r 122591. The system says that the VM drive has only 817 mb left of the given 20 gb. Is there, for a beginner, a simple and easy way to expand the drive in order to solve this problem. I can easily double the size for the Linux guest system.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Increasing the disk size of a VM
IMHO on Windows hosts the simplest way is to use CloneVDI. Keep the source and destination VDI files the same, select "Compact", "Keep old UUID", "Increase virtual drive ..." and "Increase partition size". The new VDI should be a plug in replacement.
Caveats: make sure you have enough host disk space for a copy of the current VDI. Don't bother trying any of this if you have snapshots.
Caveats: make sure you have enough host disk space for a copy of the current VDI. Don't bother trying any of this if you have snapshots.
-
- Posts: 100
- Joined: 11. Jan 2017, 17:33
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: MS Windows XP, Linux Mint
- Location: Stockholm
Re: Increasing the disk size of a VM
Well I have done this now but when I take a look under Storage, the only vdi-file I can see there is the original one. Can that file be deleted? But in the User´s folder in windows, there is a folder named Clone of Linux Mint, which is around 15 gb compared to the original file which is around 20 gb. I wanted to increase the file to 40 gb.
Later on, I have found that the system is still warning me that there is limited space for the guest system 817 gb. I have 1 snapshot, since earlier should I have deleted it?
Later on, I have found that the system is still warning me that there is limited space for the guest system 817 gb. I have 1 snapshot, since earlier should I have deleted it?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Increasing the disk size of a VM
I covered most of your questions in my previous post, however it doesn't seem like you read it properly.
I'm going to stop there so you can re-read my previous post.
Then you must have changed the destination path in the "destination" field, otherwise the clone VDI would have ended up in the same folder as the source. For usage instructions see the "readme.txt" file which came with the software.Jiger wrote:when I take a look under Storage, the only vdi-file I can see there is the original one.
It can be deleted if you're done with it. If you followed the instructions I gave in my previous post then you'd be done, but you didn't, so you're not.Jiger wrote:Can that [original] file be deleted?
The logical size of the hard disk has little to do with the size of a physical dynamic VDI file. I guess you missed the part where I said to increase the partition size, and not bother if you have snapshots.Jiger wrote:which is around 15 gb compared to the original file which is around 20 gb. I wanted to increase the file to 40 gb.
I'm going to stop there so you can re-read my previous post.
-
- Posts: 100
- Joined: 11. Jan 2017, 17:33
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: MS Windows XP, Linux Mint
- Location: Stockholm
Re: Increasing the disk size of a VM
Thanks for your attention. I have read your instructions and consequently in the settings of CloneVDI, I made the following settings:
I kept the suggested original destination
I enabled: Keep old UUID, Increase virtual drive size to 40 gb, Increase partition size and Compact drive while copying.
Then I clicked proceed.
In the instructions you write: If you cloned a source VDI to a dest VDI with the same name, same UUID, and in the same folder
then you don't need to do anything else - from now on VirtualBox uses the new VDI in all
VMs which used the original VDI.
Maybe I missed "the same name" because in the VM folder in Windows the new file has the suggested name Clone of Linux Mint.vdi instead of just Linux Mint.vdi
I was able to add this file under storage in VBox and it got the name NewVirtualDisk1.vdi, but this didn´t change anything.
What should I do? Delete the newly mounted file in VB and in Windows rename Clone of Linux Mint to just Linux Mint?
I kept the suggested original destination
I enabled: Keep old UUID, Increase virtual drive size to 40 gb, Increase partition size and Compact drive while copying.
Then I clicked proceed.
In the instructions you write: If you cloned a source VDI to a dest VDI with the same name, same UUID, and in the same folder
then you don't need to do anything else - from now on VirtualBox uses the new VDI in all
VMs which used the original VDI.
Maybe I missed "the same name" because in the VM folder in Windows the new file has the suggested name Clone of Linux Mint.vdi instead of just Linux Mint.vdi
I was able to add this file under storage in VBox and it got the name NewVirtualDisk1.vdi, but this didn´t change anything.
What should I do? Delete the newly mounted file in VB and in Windows rename Clone of Linux Mint to just Linux Mint?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Increasing the disk size of a VM
If you got that name then you did not add an existing VDI to the controller, instead you created a new VDI. I seriously hope you have not ignored what I said about not doing any of this if you have snapshots, as some of what you are doing would kill the VM.Jiger wrote: I was able to add this file under storage in VBox and it got the name NewVirtualDisk1.vdi, but this didn´t change anything.
-
- Posts: 100
- Joined: 11. Jan 2017, 17:33
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: MS Windows XP, Linux Mint
- Location: Stockholm
Re: Increasing the disk size of a VM
There was no problem to delete the NewVirtualDisk1.vdi under Storage in VB and the VM works fine with the old VDI-file. I have only one (1) snapshot. Can I delete that and start everything from the beginning? Should I name the file exactly as the original one (Linux Mint.vdi)?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Increasing the disk size of a VM
If the number of snapshots is >0, you have a problem. Specifically, the snapshot VDI was previously mounted in the disk controller of the VM. You replaced that with the base VDI. If you did that then the VM can't be working fine, you will have lost all data added since the snapshot was created.
Try this, and please pay attention to every detail.
Try this, and please pay attention to every detail.
- Make a backup of the VM folder as it is now, unless you did this already.
- Use CloneVDI to clone the snapshot VDI in the Snapshots subfolder (NOT THE BASE VDI). You should use the same settings as last time (particularly "Keep UUID"), including the size increase, except this time let it use the default "Clone of ..." name for the clone.
- When CloneVDI is done, run VirtualBox and delete the snapshot. Verify that your VM now consists of a single VDI with nothing in the "Snapshots" subfolder.
- Replace the single remaining VDI with the clone you made in step 2. Copy and rename the VDI using your Windows host while VirtualBox is shut down.
-
- Posts: 100
- Joined: 11. Jan 2017, 17:33
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: MS Windows XP, Linux Mint
- Location: Stockholm
Re: Increasing the disk size of a VM
After having done exactly as you suggest, when starting Linux Mint VM, I get a warning message that this computer has only about 800 mb left. But when looking under Storage in the VB settings, I can see that the single VDI (Linux Mint) has a virtual size of 40 gb (as was intended) and the actual size is 18,35 gb. Details: Dynamically allocated storage.
How should I understand the warning?
How should I understand the warning?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Increasing the disk size of a VM
You should understand it as the partition needing to be resized. The guest OS has data structures which manage the disk space, and those are not affected by finding themselves on a larger disk. You need to run gparted or similar to manage guest OS partitions.
I did not notice that you had a Linux guest. In that case the partition resize feature of CloneVDI is only partially functional, i.e. it will move secondary partitions aside to make room, but it can't actually resize an ExtX partition. It should however make gparted's task easier.
I did not notice that you had a Linux guest. In that case the partition resize feature of CloneVDI is only partially functional, i.e. it will move secondary partitions aside to make room, but it can't actually resize an ExtX partition. It should however make gparted's task easier.
-
- Posts: 100
- Joined: 11. Jan 2017, 17:33
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: MS Windows XP, Linux Mint
- Location: Stockholm
Re: Increasing the disk size of a VM
Thank you very much for all your attention, gparted solved the final problem.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Increasing the disk size of a VM
Good, thanks for reporting back.
-
- Posts: 100
- Joined: 11. Jan 2017, 17:33
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: MS Windows XP, Linux Mint
- Location: Stockholm
Re: [Solved] Increasing the disk size of a VM
Now, I have the same problem with a Windows XP VM. I can see that there is no vdi-file in that folder but a vmdk-file. Can I use the same procedure (using CloneVdi) as with the vdi-files in Linus concerning eliminating the (only one) snapshot and increasing the disk somewhat?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: [Solved] Increasing the disk size of a VM
If it has no snapshots then yes, however the file created by CloneVDI is always a VDI, even if the input is a VMDK.
Also, since XP uses the NTFS filesystem then CloneVDI can increase the filesystem capacity too if you wish (no need to run GParted after). Just make sure that "Increase virtual drive size" and "increase partition size" are both ticked.
Also, since XP uses the NTFS filesystem then CloneVDI can increase the filesystem capacity too if you wish (no need to run GParted after). Just make sure that "Increase virtual drive size" and "increase partition size" are both ticked.
-
- Posts: 100
- Joined: 11. Jan 2017, 17:33
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: MS Windows XP, Linux Mint
- Location: Stockholm
Re: [Solved] Increasing the disk size of a VM
As I said, the XP VM has one (1) snapshot that I want to get rid of in a decent way at the same time as I want to increase the disk somewhat. To put it shortly: How can I create the same result as earlier with Linux, when we have to do with a VM containing Windows XP with one snapshot and no vdi-file but instead a vmdk-file?
Last edited by Jiger on 5. Aug 2018, 18:33, edited 1 time in total.