[lug] kvm drive i/o - nfs vs direct mount
David Ahern
dsahern at gmail.com
Tue Apr 5 20:48:46 MDT 2011
On 04/05/11 20:18, Michael J. Hammel wrote:
> On Tue, 2011-04-05 at 19:49 -0600, Lee Woodworth wrote:
>> I don't use libvirt or such to configure or launch the VM, so here are some
>> things to compare with your setup (this an AMD64):
>
> (snip)
>
> Lots of interesting stuff to check. I'll dig into it later. 'Course by
Sounds like you are using libvirt so I would expect it to leverage the
essentials for performance -- virtio, vhost and tap based networking.
> the time I get through weeding through all the kernel and network config
> stuff I could probably have just bought another box (which I may just
> do). :-)
The S/W is free; the knowledge is not.
>
>>> <disk type='block' device='disk'>
>>> <source dev='/dev/sdb1'/>
>>> <target dev='vdb' bus='scsi'/>
>> ^^^^
>> Seems like you are asking for an emulated scsi host/disk setup. Is that
>> what you really want?
>
> I was just hoping there was some way to have physical hardware mounted
> directly into the guest. It was a wild-ass guess on my part.
Yes, you can pass a dedicated partition/disk to the guest (host cannot
be using it too). I have been using kvm for 3-1/2 years now - long
before libvirt was worth the energy required to install it, so I have
skipped it entirely. Accordingly I don't know the tweaks to tell libvirt
how to to do it. Manually, you want an argument such as:
-drive file=/dev/sdb,if=virtio,cache=none
That tells qemu-kvm to use the file /dev/sdb as seen from the host OS as
a virtual disk in the guest. The guest will see it using virtio.
David
> Ah, the heck with it. Throw more iron at the problem. It's easier.
> All this file system stuff makes my head spin. :-) Since I have an
> extra mobo sitting in my office with CPU and memory, all I need is to
> dig up an old case and get a power supply and I can just run it
> natively. What's a few more 000's of watts heating my office? I may be
> single handedly responsible for keeping winter mild in Colorado Springs
> this year....
>
More information about the LUG
mailing list