qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Connect physical discs to a virtual machine


From: Jakob Bohm
Subject: Re: [Qemu-discuss] Connect physical discs to a virtual machine
Date: Fri, 19 Jun 2015 15:07:53 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 19/06/2015 11:10, Wolfgang Mader wrote:
Dear list,

please CC me on reply, since I am off-list.

I have a linux server on which a linux quest is running in a qemu virtual 
machine. To the server, I attached an external hd enclosure (usb) of 8 disks. 
4 of these disks form a btrfs raid which is already formated and full of data. 
I am now searching for a way to connect the disks to the virtual machine.

I already found out, that I can mount the btrfs file system on the server and 
export the mount point folders to the virtual machine. This approach, however, 
seem to imply nasty problems with data permission. The files on the btrfs file 
system do belong to different people, and I want to keep it that way. Since 
qemu is running as a user process, I do not see how is is possible to get r/w 
access to the data.

What I rather would like to archive is to wire the bare metal disks up to the 
virtual machine and manage the btrfs filesystem on file-system level from 
withing the virtual machine.  How can this be done?

Thanks for your help!
Simple really: Instruct qemu to provide the physical
disks as "raw disk images", by simply using their
device names on the host (e.g. /dev/sdk and /dev/sdm)
as the filenames of the disk images on the qemu
command line.  Then the guest OS will see those two
physical disks as physical disks with different names,
such as /dev/vdb and /dev/vdc or /dev/sdb and /dev/sdc
depending on the type of virtual hardware you specified
for them on the qemu command line.


Enjoy

Jakob
-- 
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]