Friday, May 17, 2024
27
rated 0 times [  27] [ 0]  / answers: 1 / hits: 65700  / 2 Years ago, sat, october 22, 2022, 4:37:26

I see here How do I increase the hard disk size of the virtual machine.



It should work with a command like



VBoxManage modifyhd xp.vdi --resize 2000


When the VDI has a fixed size you can get this error:



~/VirtualBox VMs/xp$ VBoxManage modifyhd xp.vdi --resize 2000
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize hard disk operation for this format is not implemented yet!


The discusion and solution to that is here.



But I get that error while my VDI is dynamic



~/VirtualBox VMs/xp$ VBoxManage showhdinfo xp.vdi
UUID: 8880dc58-cd0c-4ffb-a583-f8dd50eda98e
Parent UUID: base
State: created
Type: normal (base)
Location: /home/cip/VirtualBox VMs/xp/xp.vdi
Storage format: VDI
Format variant: dynamic default
Capacity: 8192 MBytes
Size on disk: 4693 MBytes
In use by VMs: xp (UUID: e2b70963-3c26-41cf-88f6-4e03ca721e2d)


Why is that?


More From » partitioning

 Answers
6

To use VBoxManage modifyhd we have the following caveats:




  • Drives need to be in .VDI or .VHD format.

  • Drives must be in dynamic format, not fixed (a fixed disk can be converted to dynamic by creating a clone).

  • Drive size will only affect the logical size, not the physical size.

  • Shrinking a drive to equal or below its physical size is not possible.

  • For shrinking the physical size we have to fill unused drive space with 0.

  • A Windows VDI may have to be defragmented before shrinking its physical size.



In the example above it was tried to resize a dynamic disk with a physical size of 4693 MB to 2000 MB, which is not possible. Hence the error.


[#22737] Sunday, October 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
laiuct

Total Points: 44
Total Questions: 105
Total Answers: 107

Location: Seychelles
Member since Mon, Feb 15, 2021
3 Years ago
laiuct questions
;