<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I don’t think that’s true if you use the startupPolicy option of “optional”.  From libvirt domain XML documentation:<div class=""><br class=""></div><div class="">Since 1.0.0, the source element of USB devices may contain startupPolicy attribute which can be used to define policy what to do if the specified host USB device is not found. The attribute accepts the following values:</div><div class=""><br class=""></div><div class=""><div class="">mandatory<span class="Apple-tab-span" style="white-space:pre">      </span>fail if missing for any reason (the default)</div><div class="">requisite<span class="Apple-tab-span" style="white-space:pre">             </span>fail if missing on boot up, drop if missing on migrate/restore/revert</div><div class="">optional<span class="Apple-tab-span" style="white-space:pre">             </span>drop if missing at any start attempt</div></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 8, 2015, at 9:56 AM, Blank Field <<a href="mailto:ihatethisfield@gmail.com" class="">ihatethisfield@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">...but wait, there's more!<br class="">
If you unplug the p-t'd device from the host while VM is offline, the VM will fail to boot.<br class="">
There's still a lot of work to be done with USB.</p>
<div class="gmail_quote">On Sep 8, 2015 5:51 PM, "Will Marler" <<a href="mailto:will@wmarler.com" class="">will@wmarler.com</a>> wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">USB pass-through works quite well with libvirt/virt-manager now; I've used it for mouse, keyboard, two different audio devices, while the guest was running. There's one feature request that I haven't gotten around to submitting; have an "enable/disable" checkbox in the virt-manager gui (I will not always want to p-t a USB device, but I will want to frequently enough that deleting it & re-adding it each time gets on my nerves).</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Sep 8, 2015 at 12:15 AM, Quentin Deldycke <span dir="ltr" class=""><<a href="mailto:quentindeldycke@gmail.com" target="_blank" class="">quentindeldycke@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">My main problem with libvirt was:<div class=""><br class=""></div><div class=""><ul class=""><li class="">no ovmf support at the time i created my vm on debian</li><li class="">No correct usb passthrough</li></ul><div class=""><br class=""></div></div><div class="">The qemu monitor support the device_add command. Which let me bind / unbind usb devices at runtime, without limit of number.</div><div class=""><br class=""></div><div class="">I really love libvirt at my job, but for this particular case, i found it less interesting..</div><div class=""><br class=""></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class=""><div dir="ltr" class="">--<div class="">Deldycke Quentin<br class=""></div><div class=""><div class=""><br class=""></div></div></div></div></div><div class=""><div class="">
<br class=""><div class="gmail_quote">On 8 September 2015 at 06:23, Will Marler <span dir="ltr" class=""><<a href="mailto:will@wmarler.com" target="_blank" class="">will@wmarler.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Not to mention, you can still see the actual qemu invocation script in the logs when you use libvirt, in case you *really* want to (though a pastebin share of your libvirt xml config is better, imo ...)</div><div class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Sep 7, 2015 at 10:15 PM, Jon Panozzo <span dir="ltr" class=""><<a href="mailto:jonp@lime-technology.com" target="_blank" class="">jonp@lime-technology.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr" class="">Just to second Alex's point here, I see a lot of folks doing QEMU the old fashioned way, which is to say, manual invocation.  Libvirt really is an amazing management solution and makes things so much easier.  Lots of things can go awry if you're invoking QEMU manually, and libvirt can prevent that, as well as automate many other aspects of management that manual QEMU invocation cannot.</p>
<div class="gmail_quote"><div class=""><div class="">On Sep 7, 2015 3:20 PM, "Alex Williamson" <<a href="mailto:alex.l.williamson@gmail.com" target="_blank" class="">alex.l.williamson@gmail.com</a>> wrote:<br type="attribution" class=""></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Sun, Sep 6, 2015 at 7:19 PM, Garrett Powell <span dir="ltr" class=""><<a href="mailto:garretttracypowell@gmail.com" target="_blank" class="">garretttracypowell@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">I've been having trouble with my guest freezing up, which I'm told is due to a lack of CPU pinning. I'm currently trying to set up CPU pinning with cgroups (specifically cpuset), but the freezing isn't going away. Could anyone tell me what I'm doing wrong? I'm specifically referring to the <i class="">cgcreate</i>, <i class="">cgset </i>and<i class=""> cgexec</i> lines. Here's my launch script:<br class=""><br class=""><div class=""><div class="">#!/bin/bash</div><div class=""><br class=""></div><div class="">export QEMU_AUDIO_DRV=pa</div><div class="">export QEMU_PA_SERVER=localhost</div><div class="">export PULSE_SERVER=localhost</div><div class=""><br class=""></div><div class="">vfio-bind 0000:06:00.0</div><div class=""><br class=""></div><div class="">synergys --daemon --config /etc/synergy.conf</div><div class=""><br class=""></div><div class="">for i in {0..3}; do</div><div class="">    echo performance > /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_governor</div><div class="">done</div><div class=""><br class=""></div><div class="">echo 5120 > /proc/sys/vm/nr_hugepages</div><div class=""><br class=""></div><div class="">cgcreate -g cpuset:kvm</div><div class="">cgset -r cpuset.cpus=0-3 -r cpuset.mems=0 -r cpuset.cpu_exclusive=1 kvm</div><div class="">cgexec -g cpuset:kvm qemu-system-x86_64 \</div></div></div></blockquote><div class=""><br class=""></div><div class="">Ok, so you've change to pCPUs 0-3 instead of 4-7, but doesn't this have the same problem as your previous attempt with taskset?  You're using a different tool, but afaict you're still not doing 1:1 pinning of vCPUs, you're pining them to a set of pCPUs.  Taskset can work, but you need to get the thread ID for each vCPU thread and pin it.  The problem is not the tool you're using but how you're using it, to set the entire process and all the threads it will launch to a range of CPUs rather than pulling out the vCPU threads and individually pinning them.  There's this really great tool that already does this, it's called libvirt.  Thanks,</div><div class=""><br class=""></div><div class="">Alex <br class=""></div></div></div></div>
<br class=""></div></div>_______________________________________________<br class="">
vfio-users mailing list<br class="">
<a href="mailto:vfio-users@redhat.com" target="_blank" class="">vfio-users@redhat.com</a><br class="">
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank" class="">https://www.redhat.com/mailman/listinfo/vfio-users</a><br class="">
<br class=""></blockquote></div>
<br class="">_______________________________________________<br class="">
vfio-users mailing list<br class="">
<a href="mailto:vfio-users@redhat.com" target="_blank" class="">vfio-users@redhat.com</a><br class="">
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank" class="">https://www.redhat.com/mailman/listinfo/vfio-users</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></div><br class="">_______________________________________________<br class="">
vfio-users mailing list<br class="">
<a href="mailto:vfio-users@redhat.com" target="_blank" class="">vfio-users@redhat.com</a><br class="">
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank" class="">https://www.redhat.com/mailman/listinfo/vfio-users</a><br class="">
<br class=""></blockquote></div><br class=""></div></div></div>
</blockquote></div><br class=""></div>
<br class="">_______________________________________________<br class="">
vfio-users mailing list<br class="">
<a href="mailto:vfio-users@redhat.com" class="">vfio-users@redhat.com</a><br class="">
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank" class="">https://www.redhat.com/mailman/listinfo/vfio-users</a><br class="">
<br class=""></blockquote></div>
_______________________________________________<br class="">vfio-users mailing list<br class=""><a href="mailto:vfio-users@redhat.com" class="">vfio-users@redhat.com</a><br class="">https://www.redhat.com/mailman/listinfo/vfio-users<br class=""></div></blockquote></div><br class=""></div></body></html>