VirtualBox rawdisk problem u OI?

Jedna od naprednih funkcija u VBox-u omogućava korišćenje fizičkog hard diska/particije hosta u virtuelnoj mašini

Na internetu sam pronašao dosta uspešnih primera, ali samo za Linux i windows host…

LM, idem redom:

OI kod mene najnormalnije vidi i disk i particije na drugom , linux hard disku koji želim da prikačim

[email protected]_oi:~# format
Searching for disks…done

c2t1d0: configured with capacity of 232.87GB

AVAILABLE DISK SELECTIONS:
0. c2t0d0
/[email protected],0/pci1043,[email protected]/[email protected],0
1. c2t1d0
/[email protected],0/pci1043,[email protected]/[email protected],0
Specify disk (enter its number): ^C
[email protected]_oi:~#

c2t1d0 disk od 250GB je disk koji meni treba,VBox comanda takođe uredno prepoznaje particije na njemu

[email protected]_oi:~# VBoxManage internalcommands listpartitions -rawdisk /dev/dsk/c2t1d0p0
Number Type StartCHS EndCHS Size (MiB) Start (Sect)
1 0x0b 1 /0 /1 1023/254/63 50320 16065
3 0x83 1023/254/63 1023/254/63 76293 103073040
4 0x83 1023/254/63 1023/254/63 20794 259321856
6 0x83 1023/254/63 1023/254/63 86964 301910016
5 0x82 1023/254/63 1023/254/63 4093 480012288
[email protected]_oi:~#

Međutim, kada pokušam da kreiram .vmdk disk na koji se “kači” fizički, i koji je neophodan za dodavanje u VM, dobijam ćorak

[email protected]_oi:~# VBoxManage internalcommands createrawvmdk -filename /export/home/dragan/linux.vmdk -rawdisk /dev/dsk/c2t1d0p0
VBoxManage: error: Cannot get the size of the raw disk ‘/dev/dsk/c2t1d0p0’: VERR_INVALID_FUNCTION
VBoxManage: error: The raw disk vmdk file was not created
[email protected]_oi:~#

pokušao sam i sa

chmod 777 /dev/dsk/c2t1d0p0

…ali nix…ima li neko možda neku ideju?

https://forums.virtualbox.org/viewtopic.php?p=37076&sid=653fe47beb2be22b631922af20ecfeb7#p37076
:look:

I taj sam gledao sinoć, ali ne uspeva…to je stari opensolaris i vbox 2.0, (2008., pre 5-6 godina) tada je verovatno moglo, a kod mene sada uopšte ne prepoznaje opciju “-register”

[email protected]_oi:~# VBoxManage internalcommands createrawvmdk -filename /export/home/dragan/linux.vmdk -rawdisk /dev/dsk/c2t1d0p0 -partitions 3 -register
Oracle VM VirtualBox Command Line Management Interface Version 4.3.6
© 2005-2013 Oracle Corporation
All rights reserved.

Usage: VBoxManage internalcommands [command arguments]

Commands:

createrawvmdk -filename -rawdisk
[-partitions [-mbr ] ]
[-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 or FreeBSD 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’

Cek, kad opalis komandu da kreira disk, izbaci navedeni error, ali svejedno napravi .vmdk ili ne? :slight_smile:

Ne pravi ništa

EDIT

Bravo za @dvajedan! predložio da probam /dev/rdsk umesto /dev/dsk, i problem rešen :slight_smile:

[email protected]_oi:~# VBoxManage internalcommands createrawvmdk -filename /export/home/dragan/linux.vmdk -rawdisk /dev/rdsk/c2t1d0p0
RAW host disk access VMDK file /export/home/dragan/linux.vmdk created successfully.
[email protected]_oi:~#

Još jednom, bravo i hvala :slight_smile:

^ :good::clapping:

Odlicno je skapirao @21, onaj lik je takoreci isto uradio, samo obrnuto i direktno u .vmdk fajlu… :slight_smile:

I edited the .vmdk file and changed the rdsk to dsk.

Prikačio hard disk za postojeću VM, jedina razlika je što VBox moram da pokrećem kao root, ali to nema veze, bitno je da radi :slight_smile:

Namena operacije je da podatke iz postojeće instalacije linuxa (Mint15) prebacim u OI, formatiram disk i priključim na zfs.
Do sada sam koristio FAT32 particiju, ali su problem (bili) fajlovi veći od 4 gb :slight_smile:

[ATTACH]2543.IPB[/ATTACH]

Još jednom, hvala obojici na trudu :slight_smile: