Raw partion reporting wrong size

Discussions related to using VirtualBox on Windows hosts.
Post Reply
nathan
Posts: 4
Joined: 2. Oct 2008, 06:09

Raw partion reporting wrong size

Post 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.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Why not boot from a LiveCD with your VMDK attached and do a fdisk -l plus a R/O file system check?
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
vkov_tinsky
Volunteer
Posts: 218
Joined: 5. Apr 2008, 20:18

Post 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
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Yup, but (77824+73232+6000)/1024 = 153.375 not 152.74. That's what got me puzzled.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
vkov_tinsky
Volunteer
Posts: 218
Joined: 5. Apr 2008, 20:18

Post 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
nathan
Posts: 4
Joined: 2. Oct 2008, 06:09

Thanks!

Post by nathan »

Thanks guys, it seems to work fine! =)
Post Reply