error with using option -register

Discussions about using Windows guests in VirtualBox.
Post Reply
wmessing
Posts: 1
Joined: 12. Jan 2011, 23:12
Primary OS: Debian Lenny
VBox Version: OSE other
Guest OSses: Windows 7

error with using option -register

Post by wmessing »

Hi all,

I have installed Linux (lenny) and Windows 7 on the same hard disk (/dev/sda).
I want to start this Windows 7 as a guest from my Linux host with the newest virtualbox version 4.0.

I did the following steps:

1.) dd if=/dev/sda of=/home/wm/.Virtualbox/20110110.mbr bs=512 count=1
wm@wm-lap:~/.VirtualBox$ ls -al *.mbr
-rw-r--r-- 1 wm wm 512 10. Jan 21:18 20110110.mbr

2.) I added the group disk to my OS user, because all /dev/sda* devices belong to this group with the command
usermod -a -G disk wm
ls -ald /dev/sda*
brw-rw---- 1 root disk 8, 0 12. Jan 2011 /dev/sda
brw-rw---- 1 root disk 8, 1 12. Jan 2011 /dev/sda1
brw-rw---- 1 root disk 8, 10 12. Jan 2011 /dev/sda10
brw-rw---- 1 root disk 8, 11 12. Jan 2011 /dev/sda11
brw-rw---- 1 root disk 8, 12 12. Jan 2011 /dev/sda12
brw-rw---- 1 root disk 8, 2 12. Jan 2011 /dev/sda2
brw-rw---- 1 root disk 8, 3 12. Jan 2011 /dev/sda3
brw-rw---- 1 root disk 8, 4 12. Jan 2011 /dev/sda4
brw-rw---- 1 root disk 8, 5 12. Jan 2011 /dev/sda5
brw-rw---- 1 root disk 8, 6 12. Jan 2011 /dev/sda6
brw-rw---- 1 root disk 8, 7 12. Jan 2011 /dev/sda7
brw-rw---- 1 root disk 8, 8 12. Jan 2011 /dev/sda8
brw-rw---- 1 root disk 8, 9 12. Jan 2011 /dev/sda9

3.) VBoxManage internalcommands listpartitions -rawdisk /de
v/sda
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 24900 206848
4 0x83 1023/254/63 1023/254/63 58602 51202048
5 0x83 1023/254/63 1023/254/63 34999 171227136
6 0x83 1023/254/63 1023/254/63 28607 242907136
7 0x83 1023/254/63 1023/254/63 9538 301496320
8 0x83 1023/254/63 1023/254/63 4767 321032192
9 0x83 1023/254/63 1023/254/63 1905 330797056
10 0x83 1023/254/63 1023/254/63 28607 334700544
11 0x82 1023/254/63 1023/254/63 956 393289728
12 0x0b 1023/254/63 1023/254/63 20000 395249664

4.) wm@wm-lap:~/.VirtualBox$ VBoxManage internalcommands createrawvmdk -filename /ho
me/wm/.VirtualBox/win7.vmdk -rawdisk /dev/sda -partitions 1,2,12 -mbr ./20110110
.mbr -relative -register
Oracle VM VirtualBox Command Line Management Interface Version 4.0.0
(C) 2005-2010 Oracle Corporation
All rights reserved.

Usage: VBoxManage internalcommands <command> [command arguments]

Commands:

createrawvmdk -filename <filename> -rawdisk <diskname>
[-partitions <list of partition numbers> [-mbr <filename>] ]
[-relative]
Creates a new VMDK image which gives access to an entite host disk (if
the parameter -partitions is not specified) or some partitions of a
host disk. If access to individual partitions is granted, then the
parameter -mbr can be used to specify an alternative MBR to be used
(the partitioning information in the MBR file is ignored).
The diskname is on Linux e.g. /dev/sda, and on Windows e.g.
\\.\PhysicalDrive0).
On Linux host the parameter -relative causes a VMDK file to be created
which refers to individual partitions instead to the entire disk.
The necessary partition numbers can be queried with
VBoxManage internalcommands listpartitions

WARNING: This is a development tool and shall only be used to analyse
problems. It is completely unsupported and will change in
incompatible ways without warning.

Syntax error: Invalid parameter '-register'

However the 4.0 user manual describes the -register is a valid option in chapter 9.6.1

5.) without the option -register all works fine

wm@wm-lap:~/.VirtualBox$ VBoxManage internalcommands createrawvmdk -filename /ho
me/wm/.VirtualBox/win7.vmdk -rawdisk /dev/sda -partitions 1,2,12 -mbr ./20110110
.mbr -relative
RAW host disk access VMDK file /home/wm/.VirtualBox/win7.vmdk created successfully.

So how can I register.
If I cannot use -register what can I dow the the generated vmdk file?
wm@wm-lap:~/.VirtualBox$ ll win7*
-rw------- 1 wm wm 290304 12. Jan 21:45 win7-pt.vmdk
-rw------- 1 wm wm 1173 12. Jan 21:45 win7.vmdk


Thanks in advance
Wolfgang
Post Reply