[vfio-users] Linux-on-Linux desktop

Alex Williamson alex.l.williamson at gmail.com
Fri Jun 17 14:09:24 UTC 2016


On Fri, Jun 17, 2016 at 7:16 AM, Adam Hunt <voxadam at gmail.com> wrote:

> I'd like to virtualize my desktop so that Linux machine I use day-to-day
> is running as a VM on a minimally configured Linux host.
>
> The idea is to allow me to run a couple other virtual machines along side
> my desktop without them getting in each other's way. This way I would be
> able to do things such as upgrade the kernel on my desktop without
> disturbing the VM acting as my primary firewall and router[1], or the VM
> which hosts a number of containers running various personal services.[2]
>
>> While I've read quite a bit about KVM, QEMU, PCI passthrough, and vfio I
> wanted to make sure that what I'm planning isn't doomed to fail for some
> reason which I've overlooked. My two primary concerns are that as of now I
> lack a discrete GPU and that my Ivy Bridge CPU (i5-3570) clearly lacks ACS.
>
> If necessary I suppose could hold this off until I get myself a suitable
> PCIe GPU, though, I'd prefer not to. I don't use the system for gaming of
> any sort and while I'd like to have the option of doing some 3D work in the
> future it's not an immediate concern of mine for this system. The CPU is
> more of a sticking point, there's little chance of it being upgraded in the
> foreseeable future and most certainly not to what Intel refers to as a
> "high end" processor. If you scroll down you'll find a list of the hardware
> in my machine currently.
>
> I'd appreciate any thoughts on this plan of mine. I have years of
> experience with Linux but PCI passthrough is new territory for me.
>

Yes, you can do this.  Note that for IGD assignment you'll need qemu.git
with seabios.git for the VM BIOS.  IGD assignment was added after QEMU 2.6
and the necessary BIOS has not yet been merged into the QEMU tree.  You'll
also need a v4.6+ kernel on the host.  For your Ivy Bridge class processor,
you'll need to run in "legacy" mode (see
http://git.qemu.org/?p=qemu.git;a=blob;f=docs/igd-assign.txt).  This means
that it needs to use the default 440FX machine type with the IGD assigned
at VM address 02.0.  IGD should also be the primary graphics on the host.
You can dynamically unbind from the host i915 driver, but bad things
generally occur when re-binding to the driver after shutting down the IGD
assigned domain.  Therefore I generally disable i915 in the host via early
binding to vfio-pci, as described in my blog (vfio.blogspot.com).  Also use
the options video=efifb:off,vesafb:off to prevent non-PCI drivers from
using the display.  Obviously management of a headless host is difficult,
so you probably want at least a serial console.  Good luck.

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20160617/11f7ace1/attachment.htm>


More information about the vfio-users mailing list