Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2009 15:16:51 +0400
From:      Vladimir Grebenschikov <vova@fbsd.ru>
To:        Andriy Gapon <avg@icyb.net.ua>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: virtualbox wishlist [already :-)]
Message-ID:  <1243336611.2384.31.camel@localhost>
In-Reply-To: <4A15882B.7030805@icyb.net.ua>
References:  <4A15882B.7030805@icyb.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2009-05-21 at 19:58 +0300, Andriy Gapon wrote:
> I tried the experimental virtualbox port on stable/7 amd64 and I must say I am
> impressed! Thank you very much!
> 
> And already a small wishlist:
> 
> 1. It seems that currently it is impossible to use raw devices with virtualbox - I
> tried something that I googled up and it didn't work:
> VBoxManage internalcommands createrawvmdk -filename test.vmdk -rawdisk
> /dev/zvol/tank/test -register
> [...]
> Detected size of raw disk '/dev/zvol/tank/fbsd7_q64' is <NULL>, an invalid value
> The raw disk vmdk file was not created

I've managed to get this work. Looks like problem is in fact that
VBoxManage tries to get size of raw disk with just stat (it returns 0,
of course).

I've workaround it with creating small file with beginning of my HDD
(10Mb).
and create link ad0 -> /dev/ad0 in .VirtualBox/HardDisks
Then call 
VBoxManage internalcommands createrawvmdk -filename /home/vova/.VirtualBox/HardDisks/Disk.vmdk -rawdisk ad0 -register
ad0 is file in current directory.

Then I've edit .vmdk file (change path to /dev/ad0, size of volume and
disk geometry).

If you use other disk partitions you need to allow simultaneous write
access to both slice and whole disk (DANGEROUS!) with:
sysctl kern.geom.debugflags=0x10

After that volume was added successfully and even mounted to XP after
boot.

At the end .vmdk file looks like:

# Disk DescriptorFile
version=1
CID=5ea344ed
parentCID=ffffffff
createType="fullDevice"

# Extent description
RW 390716865 FLAT "/dev/ad0"

# The disk Data Base 
#DDB

ddb.virtualHWVersion = "4"
ddb.adapterType="ide"
ddb.geometry.cylinders="387621"
ddb.geometry.heads="16"
ddb.geometry.sectors="63"
ddb.uuid.image="0f139cb7-a6de-42b2-8c21-e28f23507d45"
ddb.uuid.parent="00000000-0000-0000-0000-000000000000"
ddb.uuid.modification="3b33feab-fb1d-4d62-ad74-dd73f18be5e0"
ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000"
ddb.geometry.biosCylinders="387621"
ddb.geometry.biosHeads="16"
ddb.geometry.biosSectors="63"

Looks like such file may be created by hands of by simple script
instead.

But I've failed to make proper "partitioned" image
(-partitions switch).


> 2. it would be nice if VBoxGuestAdditions.iso was included (perhaps as a port option)
> 
> 3. not sure if it is a feature of virtualbox in general or a porting artifact - my
> (Intel) 64-bit CPU doesn't support VT-x and as a result  can execute only 32-bit
> guests. There doesn't seem to be any fallback strategy for 64-bit guests. BTW in
> System/Acceleration tab "Enable VT-x/AMD-V" is shown as greyed out but checked -
> this was confusing.
> 
> 4. Minor annoyance - in VirtualBox GUI some text fields get partially "blacked
> out" after mouse click in them.
> 
-- 
Vladimir B. Grebenschikov
vova@fbsd.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1243336611.2384.31.camel>