Ticket #9959 (closed defect: invalid)

Opened 7 years ago

Last modified 23 months ago

createrawvmdk -partitions still grants full disk access

Reported by: FernandoMiguel Owned by:
Priority: major Component: virtual disk
Version: VirtualBox 4.1.6 Keywords: raw access
Cc: Guest type: Windows
Host type: Linux

Description (last modified by klaus) (diff)

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

comment:1 follow-up: ↓ 2 Changed 7 years ago by aeichner

You have to add the --relative parameter which is described here:

comment:2 in reply to: ↑ 1 Changed 7 years ago by FernandoMiguel

Replying to aeichner:

You have to add the --relative parameter which is described here:

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 Changed 6 years ago by Charly


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 6 years ago by Charly (previous) (diff)

comment:4 Changed 5 years ago by Virus_7

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 Changed 3 years ago by klaus

  • 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 Changed 23 months ago by aeichner

  • Status changed from new to closed
  • Resolution set to invalid

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.
ContactPrivacy policyTerms of Use