VirtualBox

Ticket #9959 (new defect)

Opened 2 years ago

Last modified 5 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

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 2 years ago by aeichner

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

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

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

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

comment:4 Changed 5 months 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
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use