VBoxManage modifyhd resize issues on large volumes.

Discussions about using Windows guests in VirtualBox.
Post Reply
badadmin
Posts: 4
Joined: 10. Mar 2011, 05:03
Primary OS: OpenSolaris other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2

VBoxManage modifyhd resize issues on large volumes.

Post by badadmin »

Wow, this is going to take a while to explain...

I currently have Windows Server 2008 R2 running as a guest on a SunOS matrix 5.11 oi_148 i86pc i386 i86pc Solaris host running virtualbox 4.0.4

I'm dealing with some crazy big VDI images attached to the guest. One for example:

Code: Select all

root@matrix:~# VBoxManage showhdinfo /tank/vm/crypt0.vdi
UUID:                 f2123231-e494-44b9-a960-66132658ee77
Accessible:           yes
Logical size:         2359296 MBytes
Current size on disk: 2359178 MBytes
Type:                 normal (base)
Storage format:       VDI
Format variant:       dynamic default
In use by VMs:        windows.server (UUID: 249961ae-2cf5-40ce-aca5-6b7b60e4352b)
Location:             /tank/vm/crypt0.vdi
I would love to be able to issue the command VBoxManage modifyhd /tank/vm/crypt0.vdi --resize 3735552, and expand the dynamic volume within the guest. The problem shows up that after doing so that I can no longer access the data on the original volume inside the guest. To add another fun layer to the mix the dynamic volume is RAW for use by truecrypt within the guest. Now the guest is perfectly happy before the resize with the volume mountable with truecrypt. After issuing the resize and booting the guest the volume can no longer be mounted. I should note here that I hadn't made any changes inside the guest yet in regards to expansion, only checking to see if the volume could be accessed again with its original size. I've rolled back from a zfs snapshot created before the resize and reproduced this behavior.

I'm curious as to what is stepping on what. The original crypt0.vdi was initialized with GPT and converted to a dynamic volume before formatting with truecrypt inside the guest. I'd rather it be a misconfiguration on my part then a bug or limitation, but hey, who knows?

Code: Select all

root@matrix:~# VBoxManage showvminfo windows.server
Name:            windows.server
Guest OS:        Windows 2008 (64 bit)
UUID:            249961ae-2cf5-40ce-aca5-6b7b60e4352b
Config file:     /root/VirtualBox VMs/windows.server/windows.server.vbox
Snapshot folder: /root/VirtualBox VMs/windows.server/Snapshots
Log folder:      /root/VirtualBox VMs/windows.server/Logs
Hardware UUID:   249961ae-2cf5-40ce-aca5-6b7b60e4352b
Memory size:     4096MB
Page Fusion:     off
VRAM size:       8MB
HPET:            on
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  2
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): HardDisk
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
PAE:             on
Time offset:     0 ms
RTC:             local time
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging:   on
Large Pages:     on
VT-x VPID:       on
State:           powered off (since 2011-03-10T11:20:08.000000000)
Monitor count:   1
3D Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Storage Controller Name (0):            windows.server.controller
Storage Controller Type (0):            IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  30
Storage Controller Port Count (0):      30
Storage Controller Bootable (0):        on
Storage Controller Name (1):            big_controller
Storage Controller Type (1):            unknown
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  8
Storage Controller Port Count (1):      8
Storage Controller Bootable (1):        on
windows.server.controller (0, 0): /tank/vm/windows.server.vdi (UUID: 4c287099-1ea1-463b-8e81-a65f06895cc1)
big_controller (0, 0): /tank/vm/crypt0.vdi (UUID: f2123231-e494-44b9-a960-66132658ee77)
NIC 1:           MAC: 08002748FAE4, Attachment: Bridged Interface 'yge0', Cable connected: on, Trace: off (file: none), Type: virtio, Reported speed: 0 Mbps, Boot priority: 0
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
Audio:           disabled
Clipboard Mode:  Bidirectional
VRDE:            enabled (Address 127.0.0.1, Ports 9002, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
Video redirection: disabled
VRDE property: TCP/Ports  = "9002"
VRDE property: TCP/Address = "127.0.0.1"
VRDE property: VideoChannel/Enabled = <not set>
VRDE property: VideoChannel/Quality = <not set>
VRDE property: Client/DisableDisplay = <not set>
VRDE property: Client/DisableInput = <not set>
VRDE property: Client/DisableAudio = <not set>
VRDE property: Client/DisableUSB = <not set>
VRDE property: Client/DisableClipboard = <not set>
VRDE property: Client/DisableUpstreamAudio = <not set>
USB:             disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Shared folders:

Name: 'containers', Host path: '/tank/tc' (machine mapping), writable

VRDE Connection:    not active
Clients so far:     0

Guest:

OS type:                             Windows2008_64
Additions run level:                 0
Configured memory balloon size:      0 MB

vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: VBoxManage modifyhd resize issues on large volumes.

Post by vbox4me2 »

I don't think a resize will work outside truecrypt, if TC is not running the VDI looks like garbage, ea:
http://www.google.nl/search?hl=nl&sourc ... =&aql=&oq=
badadmin
Posts: 4
Joined: 10. Mar 2011, 05:03
Primary OS: OpenSolaris other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2

Re: VBoxManage modifyhd resize issues on large volumes.

Post by badadmin »

That would be taken care of the third party tool http://sourceforge.net/projects/extcv/, which does support this. But irregardless, why would the partition be inaccessible after a resize from the outside of a VDI. If it was operating properly, shouldn't the volume simply be left intact and have unallocated space beyond it? Something is getting changed along the way to make even that not function correctly.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: VBoxManage modifyhd resize issues on large volumes.

Post by vbox4me2 »

Nice to see that tc resize tool, but a VDI holds a bit more then just the raw harddisk and maybe thats where things go wrong.
badadmin
Posts: 4
Joined: 10. Mar 2011, 05:03
Primary OS: OpenSolaris other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2

Re: VBoxManage modifyhd resize issues on large volumes.

Post by badadmin »

Is there a recommended way of tracking changes between the two to compare where it gets squashed? I'm planning on expanding across several vdi's otherwise as needed, but if it is a bug and/or limitation I wouldn't mind helping document it.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: VBoxManage modifyhd resize issues on large volumes.

Post by vbox4me2 »

rdiff? there are some binary compare tools out there. Maybe mpack can jump in here :D
Post Reply