[PATCH 1/2] qemu: Converting DHCP and ARP functions to domain conf

2020-01-20 Thread Julio Faracco
QEMU driver has two functions: qemuGetDHCPInterfaces() and qemuARPGetInterfaces() that are being used inside only one single function. They can be turned into generic functions that other drivers can use. This commit move both from QEMU driver tree to domain conf tree. Signed-off-by: Julio Faracco

[PATCH 0/2] lxc: Implement lxcDomainInterfaceAddresses() function

2020-01-20 Thread Julio Faracco
It is not able to retrieve IP addresses from LXC domains. This method was not implemented before. LXC uses the same operations to retrieve this information, but QEMU has their own functions to process this data. This series turn them into global functions, moving them into domain conf methods, to m

[PATCH 2/2] lxc: Add support to lxcDomainInterfaceAddresses() function

2020-01-20 Thread Julio Faracco
LXC driver is not able to retrieve IP addresses from domains. This function was not implemented yet. It can be done using DHCP lease and ARP table. Different from QEMU, LXC does not have an agent to fetch this info, but other sources can be used. Signed-off-by: Julio Faracco --- src/lxc/lxc_driv

Re: [PATCH] Fix syntax-check 'always true header test' for virvsock.c

2020-01-20 Thread Daniel Henrique Barboza
Please disregard this patch. This was a problem with my gnulib directory having leftovers. Daniel and Laine helped me in the IRC and everything is happy again. Thanks, DHB On 1/20/20 3:32 PM, Daniel Henrique Barboza wrote: Commit 05a38d4c4a ("src: conditionalize / remove use of sys/ioctl.h"

[PATCH] Fix syntax-check 'always true header test' for virvsock.c

2020-01-20 Thread Daniel Henrique Barboza
Commit 05a38d4c4a ("src: conditionalize / remove use of sys/ioctl.h") aimed to remove imports of ioctl.h and conditionalize them for compilation on Windows. However, the change made in virvsock.c: -#include +#ifdef HAVE_SYS_IOCTL_H +# include +#endif Makes the 'sc_prohibit_always_true_header_te

Re: [libvirt PATCH 12/12] conf/qemu: new attribute "useBackupMAC"

2020-01-20 Thread Daniel P . Berrangé
On Sun, Jan 19, 2020 at 10:24:19PM -0500, Laine Stump wrote: > Current virtio-net drivers that support the failover feature match up > the virtio backup device with its corresponding hostdev device by > looking for an interface with a matching MAC address. Since libvirt > will assign a different ra

Re: [libvirt RFC 2/2] qemu: Handle 'offset' and 'size' parameters of 'raw' driver

2020-01-20 Thread Daniel P . Berrangé
On Thu, Jan 16, 2020 at 05:56:40PM +0100, Peter Krempa wrote: > Prior to using -blockdev if a user created an overlay file with some > json properties we'd not put them on the command line at all. This meant > that qemu then obeyed them. > > Now since we do configure all known backing files, we mu

Re: [libvirt PATCH v2] qemu: fixing auto-detecting binary in domain capabilities

2020-01-20 Thread Boris Fiuczynski
On 1/17/20 7:24 PM, Daniel P. Berrangé wrote: The virConnectGetDomainCapabilities API accepts either a binary path to the emulator, or desired guest arch. If guest arch is not given, then the host arch is assumed. I forgot to mention that virConnectBaselineHypervisorCPU and virConnectCompareHy

Re: [PATCH] qemu: snapshot: Prevent too-nested domain XML when doing inactive snapshot

2020-01-20 Thread Jiri Denemark
On Mon, Jan 20, 2020 at 16:12:06 +0100, Peter Krempa wrote: > Similarly to 510d154a0b41aa70aadabc0918d16dee22882394 we need to prevent > doing too deeply nested backing chains and reject them with a sane error > message. > > Add a loop to go through the snapshots prior to attempting actually > cre

Re: [PATCH] qemu: monitor: Improve error message when QEMU reply is too large

2020-01-20 Thread Jiri Denemark
On Mon, Jan 20, 2020 at 16:11:49 +0100, Peter Krempa wrote: > Don't use ERANGE as it doesn't make much sense in the error message. > Also point out that the reply from qemu was too large which is not > obvious from the original error: > > error: No complete monitor response found in 10485760 byte

[PATCH] qemu: monitor: Improve error message when QEMU reply is too large

2020-01-20 Thread Peter Krempa
Don't use ERANGE as it doesn't make much sense in the error message. Also point out that the reply from qemu was too large which is not obvious from the original error: error: No complete monitor response found in 10485760 bytes: Numerical result out of range The new message will read: error:

[PATCH] qemu: snapshot: Prevent too-nested domain XML when doing inactive snapshot

2020-01-20 Thread Peter Krempa
Similarly to 510d154a0b41aa70aadabc0918d16dee22882394 we need to prevent doing too deeply nested backing chains and reject them with a sane error message. Add a loop to go through the snapshots prior to attempting actually creating them to prevent some possible inconsistent scenarios. Signed-off-

Re: [libvirt PATCH v2] qemu: fixing auto-detecting binary in domain capabilities

2020-01-20 Thread Boris Fiuczynski
Looks ok and also fixes on my system the problem. Tested-by: Boris Fiuczynski On 1/17/20 7:24 PM, Daniel P. Berrangé wrote: The virConnectGetDomainCapabilities API accepts either a binary path to the emulator, or desired guest arch. If guest arch is not given, then the host arch is assumed. In

Re: [libvirt PATCH] qemu: end the agent job in qemuDomainSetTimeAgent

2020-01-20 Thread Peter Krempa
On Mon, Jan 20, 2020 at 08:01:41 +0100, Ján Tomko wrote: > This function grabs an agent job but ends a monitor job. > End the agent job instead. > > https://bugzilla.redhat.com/show_bug.cgi?id=1792723 > > Signed-off-by: Ján Tomko > Reported-by: Dan Zheng > Fixes: e005c95f56fee9ed780be7f8db103d6