VirtualBox

Opened 13 years ago

Last modified 7 years ago

#9103 reopened defect

modifyvm --resize doesn't work — at Version 9

Reported by: jonsiddle Owned by:
Component: virtual disk Version: VirtualBox 4.0.8
Keywords: modifyhd resize Cc:
Guest type: other Host type: Linux

Description (last modified by Frank Mehnert)

I have a 20GB dynamic .vdi which I want to resize to 40GB so I issue:

VBoxManage modifyhd /full/path/to/hd.vdi --resize 40960

and it responds (instantly) with:

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Running VBoxManage showhdinfo on the image tells me:

... Logical size: 40960 MBytes Current size on disk: 18464 MBytes Type: normal (base) Storage format: VDI Format variant: dynamic default ...

and also reports the same logical size for the snapshot files.

The problem is that gparted reports that the drive is still 20G (not the partition; the whole drive).

Windows disk management also sees the drive as 20G.

It looks like while VirtualBox can see the new logical size, it's not reporting it to the guest correctly.

Change History (9)

comment:1 by long, 13 years ago

So I ran into this same problem and the reason it doesn't work is because you have snapshots. I hope you have a backup of your .vdi before you resized it because you will need it. Basically you will need to fall back to the original .vdi and then delete all of your snapshots before trying to resize it. It seems to me that modifyhd shouldn't let you resize a .vdi that has snapshots associated with it.

comment:2 by Klaus Espenlaub, 13 years ago

Resolution: invalid
Status: newclosed

Sorry, the answer by the previous user is not correct.

You can resize a VM which has snapshots, but you must resize the right thing.

Resizing the first snapshot (more accurately the base image) only affects that one. It doesn't magically change anything else.

So what you need to do is to identify the diff image which is associated with "Current State", i.e. what is attached to the VM. This image needs to be resized.

This is working correctly, so I'm closing this ticket.

comment:3 by thierrybo, 13 years ago

Please explain what you mean by "identify the diff image which is associated with "Current State", i.e. what is attached to the VM. "?

I look for my HOME .VirtualBox folder and only found the base vdi and snapshots. Where is the Current State?

comment:4 by Frank Mehnert, 13 years ago

Have a look at VBoxManage showvminfo VM_NAME. The status text contains the current hard disks which is attached to the VM. If the VM has a snapshot, the information will show the current differential image.

comment:5 by thierrybo, 13 years ago

OK, but I just see snapshots I can already see in the GUI, but not further "current state". IF I run:

VBoxManage modifyhd "~/.VirtualBox/Machines/XPPRO/Snapshots/{6a9489b3-3d02-4492-b0f4-00b4027a1925}.vdi" --resize 25000

on the last snapshot I get: Progress state: VBOX_E_NOT_SUPPORTED VBoxManage: error: Resize hard disk operation for this format is not implemented yet!

but it works on the base vdi

comment:6 by Ivan, 12 years ago

I'm having exactly the same problem as thierrobo wrote. Using VB 4.1.22

I've run the resize action on my primary vdi file, it completed successfully. I run VBoxManage showvminfo on my machine, looked at what UUID is associated with my current state HDD snapshot, run showhdinfo on that, it shows the new, resized logical size. But the guest OS still sees the old size. modifyhd on the UUID of the snapshot throws VBOX_E_NOT_SUPPORTED.

Oracle folks, please explain the steps that we need to do for the guest OS to see the updated size.

Thanks

comment:7 by Ivan, 12 years ago

Resolution: invalid
Status: closedreopened

comment:8 by JSW, 12 years ago

I am seeing the same not supported message using VirtualBox 4.2.4

VBoxManage modifyhd \{5f4afe34-8165-4f90-b3b5-1e9d88716cad\}.vdi --resize 40960
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize hard disk operation for this format is not implemented yet!

Please advise ASAP

comment:9 by Frank Mehnert, 12 years ago

Description: modified (diff)

Resizing of differential images is not supported. To resize the hard disk you have to merge the differential images with the base image (delete all snapshots) and then resize the base image. And resizing does only work if you increase the size, decreasing is not implemented.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy