VirtualBox

Opened 13 years ago

Closed 8 years ago

#9959 closed defect (invalid)

createrawvmdk -partitions still grants full disk access

Reported by: Fernando Miguuel Owned by:
Component: virtual disk Version: VirtualBox 4.1.6
Keywords: raw access Cc:
Guest type: Windows Host type: Linux

Description (last modified by Klaus Espenlaub)

created a raw access volume to access only one partition of the disk. booting Windows8 devel (with host ubuntu 12.04 64bits) still grants W8 full access to the disk

$ VBoxManage internalcommands listpartitions -rawdisk /dev/sda Number Type StartCHS EndCHS Size (MiB) Start (Sect) 1 0x83 0 /32 /33 261 /53 /48 2048 2048 5 0x83 529 /45 /29 1023/254/63 28454 8501248 8 0x07 1023/254/63 1023/254/63 26247 66777088 7 0x83 1023/254/63 1023/254/63 1099 120532992 6 0x83 1023/254/63 1023/254/63 1100 122785792

$ sudo VBoxManage internalcommands createrawvmdk -filename /home/fernando/VirtualBox\ VMs/part8.vmdk -rawdisk /dev/disk/by-id/ -partitions 8

Change History (6)

comment:1 by aeichner, 13 years ago

You have to add the --relative parameter which is described here: https://www.virtualbox.org/manual/ch09.html#rawdisk

in reply to:  1 comment:2 by Fernando Miguuel, 13 years ago

Replying to aeichner:

You have to add the --relative parameter which is described here: https://www.virtualbox.org/manual/ch09.html#rawdisk

thanks for the quick reply. I tried adding that parameter but the VM Guest still has full disk access.

$ sudo VBoxManage internalcommands createrawvmdk -filename /home/fernando/VirtualBox\ VMs/w8.1.vmdk -rawdisk /dev/sda -partitions 8 -relative RAW host disk access VMDK file /home/fernando/VirtualBox VMs/w8.1.vmdk created successfully.

thanks in advance

comment:3 by Charly, 12 years ago

Hi,

i have exactly the same problem with VBOX v4.1.14r7740 on Windows 7 Enterprise as Host.

I use the following command to create a hardisk based on a physical partition:

VBoxManage internalcommands createrawvmdk -filename d:\TestVBox\test.vmdk -rawdisk
.\PhysicalDrive1 -partitions 2

The second disk in my computer contains 2 partitions and only the second one should be available for VBOX, but i always see both partitions in my XP based guest-system and not only the second one.

When you fill fix this problem?

Regards Charly

Last edited 12 years ago by Charly (previous) (diff)

comment:4 by Virus_7, 11 years ago

The issue is still reproducible on version 4.2.18 r88780 on Windows 7 64-bit.

See creating RAW partition access on Windows host:

C:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
1       0x07  0   /32 /33  12  /223/19           100         2048
2       0x07  12  /223/20  1023/254/63         99897       206848
3       0x07  1023/254/63  1023/254/63        311406    204795904
4       0x07  1023/254/63  1023/254/63         65533    842555392

C:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands createrawvmdk -filename D:\VirtualBox\sda4.vmdk -rawdisk \\.\PhysicalDrive0 -partitions 4
RAW host disk access VMDK file D:\VirtualBox\sda4.vmdk created successfully.

See visibility on Linux guest:

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe477188b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sdc2          206848   204795903   102294528    7  HPFS/NTFS/exFAT
/dev/sdc3       204795904   842555391   318879744    7  HPFS/NTFS/exFAT
/dev/sdc4       842555392   976766975    67105792    7  HPFS/NTFS/exFAT

comment:5 by Klaus Espenlaub, 9 years ago

Description: modified (diff)

The fact that all partitions are visible is 100% intentional (censoring the partition table makes it even more confusing for users, and unnecessarily hard for VirtualBox itself). It doesn't mean that you can read from or write to them. Reading will produce zeroes, writing will be ignored.

Also, the only way to tell if there is really something wrong with raw disk handling is providing the .vmdk file in addition to the partitioning information.

comment:6 by aeichner, 8 years ago

Resolution: invalid
Status: newclosed

Reopen if this is still an issue with a recent VirtualBox release and you provided requested information.

Note: See TracTickets for help on using tickets.

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