Page 1 of 1

Raw partion reporting wrong size

Posted: 2. Oct 2008, 06:22
by nathan
This is my setup:

I have a 160GB system drive that is split into three partitions:
75 GB : Windows Vista 64
75 GB : Ubuntu 7.04 64
10 GB : swap for Ubuntu

I'm in the process of trying to configure Vista as my host OS while virtualizing the Ubuntu installed on the second partition. I have followed the direction in the User Manual using the following commands:

Code: Select all

C:\Users\nbales\.VirtualBox\Machines\Bagheera>"C:\Program Files\Sun\xVM VirtualBox\VBoxManage" internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
VirtualBox Command Line Management Interface Version 2.0.2
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
1       0x07  0   /32 /33  1023/254/63         77824         2048
2       0x83  1023/254/63  1023/254/63         73233    159396930
3       0x82  1023/254/63  1023/254/63          6000    309379770

C:\Users\nbales\.VirtualBox\Machines\Bagheera>"C:\Program Files\Sun\xVM VirtualBox\VBoxManage" internalcommands createrawvmdk -filename Bagheera.vmdk -rawdisk \\.\PhysicalDrive0 -partitions 2,3
VirtualBox Command Line Management Interface Version 2.0.2
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

RAW host disk access VMDK file Bagheera.vmdk created successfully.
This part seems to work just fine.

I then open the VirtualBox GUI and access the Virtual Disk Manager. I use 'Add' to add my newly created .vmdk file. I choose the file and an entry appears in the HardDisk listbox.

Name: Bagheera.vmdk
Virtual Size: 152.74
Actual Size: 703B

Should not the virtual size equal the size of the partition? I am hesitant to try to start this VM because I am worried it may write on my other partitions.

Posted: 2. Oct 2008, 12:55
by TerryE
Why not boot from a LiveCD with your VMDK attached and do a fdisk -l plus a R/O file system check?

Posted: 2. Oct 2008, 15:40
by vkov_tinsky
nathan wrote:Should not the virtual size equal the size of the partition? I am hesitant to try to start this VM because I am worried it may write on my other partitions.
No, that's fine (this also stumped me the first time I tried it). Virtual size is always shown as that of the whole disk but the guest OS will obviously only be able to read from / write to the partitions you've chosen.

Regards,
VT

Posted: 2. Oct 2008, 16:10
by TerryE
Yup, but (77824+73232+6000)/1024 = 153.375 not 152.74. That's what got me puzzled.

Posted: 2. Oct 2008, 19:45
by vkov_tinsky
TerryE wrote:Yup, but (77824+73232+6000)/1024 = 153.375 not 152.74. That's what got me puzzled.
Doesn't say anywhere his partitions are taking up the whole disk. If I do the same sum for one of my own disks it matches since I don't have any unpartitioned space.

Regards,
VT

Thanks!

Posted: 3. Oct 2008, 17:45
by nathan
Thanks guys, it seems to work fine! =)