Page 1 of 1

VERR_INVALID_PARAMTER with -partitions option

Posted: 22. Jun 2009, 23:18
by jawadams
Hello,

I have a dual boot setup with Windows XP and Ubuntu 9.04 Jaunty Jackalope.

I wanted to use my current partition as a virtual machine. I was able to create a vmdk file using the following command:

Code: Select all

VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WinXP.vmdk -rawdisk /dev/sda1
However when I try to run the Virtual Machine, I just get a black screen.

I ran "fdisk -l" and get the following output:

Code: Select all

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xaf80af80

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       11594    93128773+   7  HPFS/NTFS
/dev/sda2           11611       11903     2353522+  82  Linux swap / Solaris
/dev/sda3           11921       19457    60540952+  83  Linux
Originally table was messed up and I had to fix it using fdisk. I then had to fix my GRUB bootloader which took quite some time. I finally have the GRUB loader working again, but can not get my raw vmdk to work.

I saw the using an MBR for raw disks can sometimes be the solution so I used this command:

Code: Select all

VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WinXP.vmdk -rawdisk /dev/sda1 -partitions 1 -mbr ~/.VirtualBox/WinXP.mbr
and get this output:

Code: Select all

VirtualBox Command Line Management Interface Version 2.2.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
This happens with or without the -mbr option so it seems to be the -partitions option that does it.

What am I doing wrong? Any searches only turn up overlapping partition fixes, which I have done already.

Re: VERR_INVALID_PARAMTER with -partitions option

Posted: 22. Jun 2009, 23:23
by baf
Try changing

Code: Select all

VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WinXP.vmdk -rawdisk /dev/sda1 -partitions 1 -mbr ~/.VirtualBox/WinXP.mbr
to use sda instead of sda1

Code: Select all

VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WinXP.vmdk -rawdisk /dev/sda -partitions 1
possibly with an existing mbr file.

Re: VERR_INVALID_PARAMTER with -partitions option

Posted: 22. Jun 2009, 23:28
by jawadams
Wow. OK I feel stupid now. That worked perfectly, and the VirtualBox is working.

Thanks so much!