Daniel P. Berrangé
2022-Jan-04 10:33 UTC
[Libguestfs] [PATCH 0/3] resolve conflict between manual and libvirt-assigned PCI addresses
On Thu, Dec 23, 2021 at 11:36:58AM +0100, Laszlo Ersek wrote:> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2034160 > > The first patch extends our current <qemu:commandline> hack, moving the > virtio-net-pci device to slot 0x1E, where it is very unlikely to > conflict with any libvirt-assigned PCI address.Remind me why we still need to use <qemu:commandline> ? A need for this obviously reflects a failure of libvirt to address the libguestfs requirements. Can we fix the root cause here with proper XML support for whatever feature is missing. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Richard W.M. Jones
2022-Jan-04 14:02 UTC
[Libguestfs] [PATCH 0/3] resolve conflict between manual and libvirt-assigned PCI addresses
On Tue, Jan 04, 2022 at 10:33:14AM +0000, Daniel P. Berrang? wrote:> On Thu, Dec 23, 2021 at 11:36:58AM +0100, Laszlo Ersek wrote: > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2034160 > > > > The first patch extends our current <qemu:commandline> hack, moving the > > virtio-net-pci device to slot 0x1E, where it is very unlikely to > > conflict with any libvirt-assigned PCI address. > > Remind me why we still need to use <qemu:commandline> ? A need > for this obviously reflects a failure of libvirt to address the > libguestfs requirements. Can we fix the root cause here with proper > XML support for whatever feature is missing.Laszlo actually fixed this properly in the case we care about (modern libvirt), if you look at the 3rd patch which went upstream: https://github.com/libguestfs/libguestfs/commit/5858c2cf6c24b3776e3867eafd9d86a1f4912d9c Ignoring the old libvirt case, the only reason we still need <qemu:commandline> is to allow us to set TMPDIR accurately. (Otherwise if you recall we can get a TMPDIR from an unrelated run of libguestfs that happens to share the same session libvirtd). The final code should make this clear: https://github.com/libguestfs/libguestfs/blob/d1e7e1a323619d8f1e913a7833d07009f02a2d33/lib/launch-libvirt.c#L1838-L1899 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW