Opened 15 years ago
Last modified 13 years ago
#4703 new defect
VBoxManage creterawvmdk on osx only allows first 4 partitions.
Reported by: | Bengt-Arne Fjellner | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 3.0.4 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | Mac OS X |
Description
VBoxManage creterawvmdk on osx only allows first 4 partitions to be used. Also allows nonexistitng partitions with too high numbers on the commandline without any error message. Example command:
sudo VBoxManage internalcommands createrawvmdk -filename /tmp/foo.vmdk -rawdisk /dev/disk0 -partitions 1,2,3,4,5,6,7,8,9,10,11,12,13
partition table (gpt)
sudo gpt -r show /dev/disk0 Password: gpt show: /dev/disk0: Suspicious MBR at sector 0 start size index contents 0 1 MBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B 409640 26542320 2 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 26951960 262150 27214110 10586832 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 37800942 3 37800945 24659775 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 62460720 455432536 5 GPT part - 48465300-0000-11AA-AA11-00306543ECAC 517893256 95864960 6 GPT part - 48465300-0000-11AA-AA11-00306543ECAC 613758216 262149 614020365 4128705 7 GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F 618149070 6988275 8 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 625137345 5070 625142415 32 Sec GPT table 625142447 1 Sec GPT header
Resulting vmdk file
# Disk DescriptorFile version=1 CID=4dd10ca2 parentCID=ffffffff createType="partitionedDevice" # Extent description RW 1 FLAT "foo-pt.vmdk" RW 409639 FLAT "/dev/disk0s1" RW 26542320 FLAT "/dev/disk0s2" RW 262150 ZERO RW 10586832 FLAT "/dev/disk0s3" RW 3 ZERO RW 24659775 FLAT "/dev/disk0s4" RW 562681728 ZERO snipped from here
Change History (2)
comment:1 by , 15 years ago
comment:2 by , 13 years ago
My vmdk-raw-parts utility can do this: https://github.com/vasi/vmdk-raw-parts
Note:
See TracTickets
for help on using tickets.
I'm not running MacOSX but I have a gpt partition table on my removable harddrive running Linux Kernel 2.6.30 _64 and VB 3.0.4. My problem is not exactly the same but I think they are related. "createrawvmdk -partition" and the "listpartitions" argument does not seem to work correctly on gpt partitions. Pls advise if a new ticket should be opened for this.
I have several partitions on /dev/sda
The listpartition commmand seems not to be able to read the Partition table correctly.
If you attach the rawdisk via createrawvmdk it ignores the -partition arguments completely and gives access to the whole harddrive in the Guest machine.
The output from the .vmdk file secified with -partition 6,7
I was able to give raw access to just one partition by specifying /dev/sda6 without the -partition option.