Real Hardware and libvirt/kvm/qemu

Trever L. Adams trever.adams at gmail.com
Sun Aug 15 23:46:11 UTC 2010


  On 08/14/2010 10:10 AM, Trever L. Adams wrote:
> Hello everyone,
>
> I am working on a project for my family. At the moment the only hardware
> that we can get is the harddrives.
>
> Question: Is it possible to give control of these over to the
> virtualized systems in such a way that they can later be used as a real
> hard drive in a real setup, just plug and play? (At least some of these
> will be doing this, others will just be moved to less crowded vm hosts.)
> If so, how? How do I keep the host OS from detecting and using them.
> (All machines, vm and actual, are/will be Fedora.)
>
> Thank you,
> Trever Adams
Since I received no answer, I think I have figured this out. Documenting 
it on the list for others. This is not a recommended configuration 
(qemu) due to the fact that if the host operating system touches the 
file system, corruption can happen.

How do you do it:

Make sure that the host does not touch it. Disable the drive (no 
entries) in /etc/fstab
Use filter in lvm.conf filter = ["r|sdX"] where X is any number used 
directly with qemu. This could be sdg for example. Use multiple entries 
for multiple drives.

In Qmu/Virtmanager:

Set the drive image to the raw harddrives (not partitions), such as 
/dev/sdg.

There you are.

Trever



More information about the users mailing list