VirtualBox

Opened 5 years ago

Last modified 5 years ago

#18946 new defect

Screenshot is causing the disk size update to fail

Reported by: aanche Owned by:
Component: other Version: VirtualBox 6.0.12
Keywords: disk space snapshot Cc:
Guest type: Linux Host type: Windows

Description

Hi, I am running a host PC Windows 10. Using the virtualbox to launch a Cent OS. I was trying to update my disk size on the CentOS as i had reached 100% utilisation. So i used (as recommended by many sites to update this) below command: {https://stackoverflow.com/questions/8141045/virtualbox-extend-partition /mnt/c/Program\ Files/Oracle/VirtualBox/VBoxManage.exe modifymedium CentOSVD.vdi --resize 120000}

Idea was to increase the vdi size from 60Gb to 120Gb. But after this command, it was not directly reflecting in the Cent OS after restart (also windows restart). The increased volume succeeded on windows side without any errors. But CentOS was not showing this. After a lot of debug i found that i had a snapshot stored somewhere on the PC and this was preventing the additional disk to be shown on the CentOS. {lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 68.3G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 63.2G 0 part } The sda partition was always showing 68.3G. Even though i increased the VDI to 120G, it was not reflecting here. Then i deleted the snapshot and then i saw the correct results. { lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 117.2G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 63.2G 0 part } So somehow the process in the snapshot is preventing the process of disk space update. Please check. Steps to reproduce:

  1. Run Virtual Box on a windows 10 machine.
  2. Install the Cent OS running as guest OS on Virtual Box.
  3. Check the VDI disk size (Virtual and actual size)
  4. Take a snapshot (Ctrl + Shift + T). Notice another VDI file is created in another location
  5. Increase VDI disk size with above command (VBoxManage.exe modifymedium)
  6. Reboot both windows and VBox.
  7. Check the disk space on guest OS (CentOS) it will not show the increase
  8. Delete Snapshot. Newly created VDI file is deleted from Step 4.
  9. Reboot both windows and VBox.
  10. Check the disk space on guest OS (CentOS) it will show the increase

Change History (2)

comment:1 by aanche, 5 years ago

Hi, I am running a host PC Windows 10. Using the virtualbox to launch a Cent OS (guest). I was trying to update my disk size on the CentOS as i had reached 100% utilisation. So i used (as recommended by many sites to update this) below command on windows to transfer some disk from windows to cent OS: https://stackoverflow.com/questions/8141045/virtualbox-extend-partition

C:/Program\ Files/Oracle/VirtualBox/VBoxManage.exe modifymedium CentOSVD.vdi --resize 120000

Idea was to increase the vdi size from 60Gb to 120Gb. But after this command, it was not directly reflecting in the Cent OS after restart (also windows restart). The increased volume succeeded on windows side without any errors. But CentOS was not showing this. After a lot of debug i found that i had a snapshot stored somewhere on the PC and this was preventing the additional disk to be shown on the CentOS.

lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 68.3G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 63.2G 0 part 

The sda partition was always showing 68.3G. Even though i increased the VDI to 120G, it was not reflecting here. Then i deleted the snapshot and then i saw the correct results.

lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 117.2G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 63.2G 0 part

So somehow the process in the snapshot is preventing the process of disk space update. Please check.

Steps to reproduce:

  1. Run Virtual Box on a windows 10 machine.
  2. Install the Cent OS running as guest OS on Virtual Box.
  3. Check the VDI disk size (Virtual and actual size)
  4. Take a snapshot (Ctrl + Shift + T). Notice another VDI file is created in another location
  5. Increase VDI disk size with above command (VBoxManage.exe modifymedium)
  6. Reboot both windows and VBox.
  7. Check the disk space on guest OS (CentOS) it will not show the increase
  8. Delete Snapshot. Newly created VDI file is deleted from Step 4.
  9. Reboot both windows and VBox.
  10. Check the disk space on guest OS (CentOS) it will show the increase

in reply to:  description comment:2 by Socratis, 5 years ago

I almost never quote the whole message, but your formatting made it quite impossible to read it properly...


Replying to aanche:

Hi, I am running a host PC Windows 10. Using the virtualbox to launch a Cent OS. I was trying to update my disk size on the CentOS as i had reached 100% utilisation. So i used (as recommended by many sites to update this) below command: https://stackoverflow.com/questions/8141045/virtualbox-extend-partition

/mnt/c/Program\ Files/Oracle/VirtualBox/VBoxManage.exe modifymedium CentOSVD.vdi --resize 120000

Idea was to increase the vdi size from 60Gb to 120Gb. But after this command, it was not directly reflecting in the Cent OS after restart (also windows restart). The increased volume succeeded on windows side without any errors. But CentOS was not showing this. After a lot of debug i found that i had a snapshot stored somewhere on the PC and this was preventing the additional disk to be shown on the CentOS.

NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda               8:0    0  68.3G  0 disk 
├─sda1            8:1    0     1G  0 part /boot
└─sda2            8:2    0  63.2G  0 part 

The sda partition was always showing 68.3G. Even though i increased the VDI to 120G, it was not reflecting here. Then i deleted the snapshot and then i saw the correct results.

NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda               8:0    0 117.2G  0 disk 
├─sda1            8:1    0     1G  0 part /boot
└─sda2            8:2    0  63.2G  0 part

So somehow the process in the snapshot is preventing the process of disk space update. Please check.

Steps to reproduce:

  1. Run Virtual Box on a windows 10 machine.
  2. Install the Cent OS running as guest OS on Virtual Box.
  3. Check the VDI disk size (Virtual and actual size)
  4. Take a snapshot (Ctrl + Shift + T). Notice another VDI file is created in another location
  5. Increase VDI disk size with above command (VBoxManage.exe modifymedium)
  6. Reboot both windows and VBox.
  7. Check the disk space on guest OS (CentOS) it will not show the increase
  8. Delete Snapshot. Newly created VDI file is deleted from Step 4.
  9. Reboot both windows and VBox.
  10. Check the disk space on guest OS (CentOS) it will show the increase

I'm sorry, but you misunderstood how snapshots work. This is how it's supposed to work. This is not a bug, this is a feature, this is by design. Failure to understand how a feature works, doesn't make it a bug.

BTW, as a general rule of thumb, you don't need to wonder around in random sites and quote questions from a year ago. Things change in a year. This one fortunately did not change, it's been like that since "Snapshots" were invented.

And your primary source for all-questions-VirtualBox should be the VirtualBox forums, a lot more eyes there. More than 95% of the issues are resolved in the forums, which keeps the developers focusing on the bug fixes and enhancements, and there is no need for another ticket to keep track of.

For example if you had come to the forums, I would have pointed you to Board index » Howtos and Tutorials » Generic Advice » How to resize a Virtual Drive. Pay close attention to "What if my VM uses Snapshots?".

This ticket should be closed as [Invalid].

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use