Page 1 of 1

No longer able to make raw disk vmdk

Posted: 1. Sep 2009, 18:19
by SockPants
Hi all,

Yesterday I installed Ubuntu alongside my Windows Vista and NTFS data partitions, and successfully made a raw disk VMDK file to access the data partition in VirtualBox. I then however deleted one of my two Data partitions and resized the leftover one, which broke grub, and because it was fast anyway I decided to just wipe the linux partitions and reinstall Ubuntu again. Now I'm trying to create a similar raw disk VMDK file again but I get a VERR_INVALID_PARAMETER error.

Can someone help me? Here's the output of some commands:

jeroen@s098908:~$ sudo VBoxManage internalcommands listpartitions -rawdisk /dev/sda

Code: Select all

VirtualBox Command Line Management Interface Version 3.0.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
1       0x07  0   /32 /33  1022/254/63         76801         2048
2       0x07  1022/0  /2   1022/254/63         76802    157292416
7       0x83  1023/254/63  1023/254/63           109    314584956
6       0x83  1023/254/63  1023/254/63         81250    314825868
5       0x82  1023/254/63  1023/254/63          3498    481227138
jeroen@s098908:~$ sudo VBoxManage internalcommands createrawvmdk -filename /home/jeroen/vbox-data-part.vmdk -rawdisk /dev/sda -partitions 2 -relative

Code: Select all

VirtualBox Command Line Management Interface Version 3.0.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Error while creating the raw disk VMDK: VERR_INVALID_PARAMETER
The raw disk vmdk file was not created
jeroen@s098908:~$ sudo fdisk -l

Code: Select all

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x6fdee39a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9791    78645183+   7  HPFS/NTFS
/dev/sda2            9792       19582    78646207    7  HPFS/NTFS
/dev/sda3           19583       30401    86903617+   5  Extended
/dev/sda5           29956       30401     3582463+  82  Linux swap / Solaris
/dev/sda6           19598       29955    83200603+  83  Linux
/dev/sda7           19583       19596      112392   83  Linux

Partition table entries are not in disk order

Re: No longer able to make raw disk vmdk

Posted: 10. Sep 2009, 07:27
by geoff_c
I encountered the exact same error a few minutes ago, and played around with the parameters until something worked. This did the trick:

Code: Select all

VBoxManage internalcommands createrawvmdk -filename winHD.vmdk -rawdisk /dev/sda1
I haven't read any tutorials for this that are specific to version 3.0.4, so I'm assuming something changed with the update. Then again, maybe I got lucky and magic happened. Right now I'm getting a GRUB error 18 after my boot menu; if this works for you, I'd be interested to know if you have the same problem.