[PATCH] qemu_driver:report guest interface informations

2021-08-26 Thread scuzhanglei
Signed-off-by: scuzhanglei --- NEWS.rst | 5 ++ include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 12 + src/qemu/qemu_agent.c| 9 ++-- src/qemu/qemu_agent.h| 3 +- src/qemu/qemu_driver.c | 88

[PATCH] NEWS: Mention new SecurityManager APIs for labeling network devices

2021-08-26 Thread Jim Fehlig
Signed-off-by: Jim Fehlig --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 21df0e1602..744f445319 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -19,6 +19,13 @@ v7.7.0 (unreleased) * **Improvements** + * Add SecurityManager APIs for labeling

[PATCH 3/8] ch_monitor: Update virCHMonitorGet to handle accept a response

2021-08-26 Thread William Douglas
The virCHMonitorGet function needed to be able to return data from the hypervisor. This functionality is needed in order for the driver to support PTY enablement and getting details about the VM state. Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 44

[PATCH 8/8] ch_driver: Add handler for console API

2021-08-26 Thread William Douglas
Enable the handler function to find and open the console character device that will be used by the console API. Signed-off-by: William Douglas --- src/ch/ch_driver.c | 78 ++ 1 file changed, 78 insertions(+) diff --git a/src/ch/ch_driver.c

[PATCH 4/8] ch_monitor: Use virCHMonitorGet to access cloud-hypervisor API

2021-08-26 Thread William Douglas
Now that virCHMonitorGet is capable of handling data returned by the cloud-hypervisor API, make use of this via virCHMonitorGetInfo to call into the vm.info endpoint. Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 15 +++ src/ch/ch_monitor.h | 3 +++ 2 files changed, 18

[PATCH 6/8] ch_process: Handle enabled console devices

2021-08-26 Thread William Douglas
Add functionality to allow libvirt console to connect to the cloud-hypervisor created PTY associated with a VM by updating the domain with console path information. This has to be run after the VM is created by cloud-hypervisor. Signed-off-by: William Douglas --- src/ch/ch_process.c | 67

[PATCH 1/8] ch_domain: Add virChrdevs for console support

2021-08-26 Thread William Douglas
Add and initialize a virChrdevs to the _virCHDomainObjPrivate structure in order to eventually track the consoles in use by a domain. Signed-off-by: William Douglas --- src/ch/ch_domain.c | 7 +++ src/ch/ch_domain.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/ch/ch_domain.c

[PATCH 7/8] ch_domain: Allow controller and chr devices

2021-08-26 Thread William Douglas
With the console and serial device handling fully functional, allow the required device types to be specified in the domain configuration. Signed-off-by: William Douglas --- src/ch/ch_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch/ch_domain.c

[PATCH 5/8] ch_monitor: Add pty json builder function

2021-08-26 Thread William Douglas
Add function to build the the json structure to configure a PTY in cloud-hypervisor. The configuration only supports a single serial or console device. The devices themselves still aren't allowed in configurations yet though. Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 56

[PATCH v3 0/8] ch: Add Console support

2021-08-26 Thread William Douglas
This series enables console support in the cloud-hypervisor driver. Cloud-hypervisor only supports a single console or serial device at a time, hence the checks to ensure the domain configuration is only passing one or the other. Changes since v2: * Squashed an additional patch. Changes since

[PATCH 2/8] ch_monitor: Make unused function static

2021-08-26 Thread William Douglas
The virCHMonitorGet function wasn't in use and was declared as non-static (though not in a header file). This function isn't going to be used outside of the monitor though so remove the initial declaration and define the function to be static. Future work should adjust this function to allow

Re: [PATCH] qemuProcessSetupDisksTransientHotplug: Add checking set-action capability

2021-08-26 Thread Masayoshi Mizuma
On Thu, Aug 26, 2021 at 04:11:15PM +0200, Ján Tomko wrote: > On a Wednesday in 2021, Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > > > The VM is terminated abnormally when > > is set to the disk option and the qemu doesn't have set-action capability. > > > > # virsh start guest01 > >

[PATCH] NEWS: Document new '--validate' option for virsh define commands

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- NEWS.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 21df0e1602..b9edb7dc68 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -19,6 +19,20 @@ v7.7.0 (unreleased) * **Improvements** + * virsh: Allow XML validation

[PATCH] NEWS: Document my contributions for the upcoming release

2021-08-26 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 17 + 1 file changed, 17 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 21df0e1602..1a8abb56f4 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -105,6 +105,11 @@ v7.5.0 (2021-07-01) Since it's impossible to fix it without running

Re: [PATCH] qemuProcessSetupDisksTransientHotplug: Add checking set-action capability

2021-08-26 Thread Ján Tomko
On a Wednesday in 2021, Masayoshi Mizuma wrote: From: Masayoshi Mizuma The VM is terminated abnormally when is set to the disk option and the qemu doesn't have set-action capability. # virsh start guest01 error: Failed to start domain 'guest01' error: internal error: qemu unexpectedly

Re: [libvirt PATCH] src: fix generation of default resource partition

2021-08-26 Thread Michal Prívozník
On 8/25/21 4:43 PM, Pavel Hrdina wrote: > Now that resource structure can have appid as well we need to adapt code > that creates default resource partition if not provided by user. > Otherwise starting a VM with appid defined would fail with following > error: > > error: unsupported

[PATCH 4/4] virsh: add support for '--validate' option in create nwfilter-binding

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- docs/manpages/virsh.rst | 5 - tools/virsh-nwfilter.c | 10 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 2204bed3bb..15ac75d487 100644 --- a/docs/manpages/virsh.rst

[PATCH 2/4] conf: virnwfilterbindingdef: add validation against schema in create

2021-08-26 Thread Kristina Hanicova
We need to validate the XML against schema if option '--validate' was passed to the virsh command. This patch also includes propagation of flags into the virNWFilterBindingDefParse(). Signed-off-by: Kristina Hanicova --- src/conf/virnwfilterbindingdef.c | 14 +-

[PATCH 3/4] nwfilter_driver: allow VIR_NWFILTER_BINDING_CREATE_VALIDATE flag

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/nwfilter/nwfilter_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index 1d4567855e..200451d6b1 100644 --- a/src/nwfilter/nwfilter_driver.c +++

[PATCH 0/4] nwfilter-binding create: add support for validation against schema

2021-08-26 Thread Kristina Hanicova
Kristina Hanicova (4): api: add virNWFilterBindingCreateFlags conf: virnwfilterbindingdef: add validation against schema in create nwfilter_driver: allow VIR_NWFILTER_BINDING_CREATE_VALIDATE flag virsh: add support for '--validate' option in create nwfilter-binding

[PATCH 1/4] api: add virNWFilterBindingCreateFlags

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- include/libvirt/libvirt-nwfilter.h | 5 + src/libvirt-nwfilter.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-nwfilter.h b/include/libvirt/libvirt-nwfilter.h index 9897df6df6..4e28801006 100644

[PATCH 4/4] virsh: add support for '--validate' option in create network port

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- docs/manpages/virsh.rst | 4 +++- tools/virsh-network.c | 10 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 2204bed3bb..c699b198fb 100644 --- a/docs/manpages/virsh.rst +++

[PATCH 3/4] bridge_driver: allow VIR_NETWORK_PORT_CREATE_VALIDATE flag

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/network/bridge_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 7513ddad48..06822fb3a0 100644 --- a/src/network/bridge_driver.c +++

[PATCH 1/4] api: add VIR_NETWORK_PORT_CREATE_VALIDATE flag

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- include/libvirt/libvirt-network.h | 1 + src/libvirt-network.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h index 0a49c1888e..e8c008cfc8 100644 ---

[PATCH 0/4] network port create: add support for validation against schema

2021-08-26 Thread Kristina Hanicova
Kristina Hanicova (4): api: add VIR_NETWORK_PORT_CREATE_VALIDATE flag conf: virnetworkportdef: add validation against schema in network port create bridge_driver: allow VIR_NETWORK_PORT_CREATE_VALIDATE flag virsh: add support for '--validate' option in create network port

[PATCH 2/4] conf: virnetworkportdef: add validation against schema in network port create

2021-08-26 Thread Kristina Hanicova
We need to validate the XML against schema if option '--validate' was passed to the virsh command. This patch also includes propagation of flags into the virNetworkPortDefParse(). Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 2 +- src/conf/virnetworkportdef.c | 14

Entering freeze for libvirt-7.7.0

2021-08-26 Thread Jiri Denemark
I have just tagged v7.7.0-rc1 in the repository and pushed signed tarballs and source RPMs to https://libvirt.org/sources/ Please give the release candidate some testing and in case you find a serious issue which should have a fix in the upcoming release, feel free to reply to this thread to make

[PATCH 0/6] network create: add support for validation against schema

2021-08-26 Thread Kristina Hanicova
Kristina Hanicova (6): api: add public virNetworkCreateXMLFlags() and remote protocol src: add driver support for networkCreateXMLFlags() api: add virNetworkCreateFlags network_conf: add validation against schema in create network: allow VIR_NETWORK_CREATE_VALIDATE flag virsh: add

Re: [libvirt PATCH 01/13] security: add SELinux policy for virt

2021-08-26 Thread Vit Mojzis
On 20. 08. 21 13:33, Daniel P. Berrangé wrote: On Thu, Aug 19, 2021 at 05:23:48PM +0200, Vit Mojzis wrote: On 10. 08. 21 18:35, Daniel P. Berrangé wrote: On Tue, Aug 10, 2021 at 10:39:23AM +0200, Pavel Hrdina wrote: On Fri, Aug 06, 2021 at 06:47:58PM +0100, Daniel P. Berrangé wrote: From:

[PATCH 6/6] virsh: add support for '--validate' option in create network

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- docs/manpages/virsh.rst | 4 +++- tools/virsh-network.c | 13 - 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 2204bed3bb..b05b25c555 100644 --- a/docs/manpages/virsh.rst

[PATCH 5/6] network: allow VIR_NETWORK_CREATE_VALIDATE flag

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/network/bridge_driver.c | 4 ++-- src/test/test_driver.c | 4 ++-- src/vbox/vbox_network.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index

[PATCH 2/6] src: add driver support for networkCreateXMLFlags()

2021-08-26 Thread Kristina Hanicova
I added new driver functions to handle creating network with given flags. I also replaced definitions of the functions without flags with function calls to the new ones. Signed-off-by: Kristina Hanicova --- src/network/bridge_driver.c | 18 +++--- src/test/test_driver.c | 13

[PATCH 1/6] api: add public virNetworkCreateXMLFlags() and remote protocol

2021-08-26 Thread Kristina Hanicova
This new API creates network with given flags. Signed-off-by: Kristina Hanicova --- include/libvirt/libvirt-network.h | 3 +++ src/driver-network.h | 6 + src/libvirt-network.c | 41 +++ src/libvirt_public.syms | 5

[PATCH 4/6] network_conf: add validation against schema in create

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/network_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index f23599abac..5e24880f1f 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -2093,7 +2093,8

[PATCH 3/6] api: add virNetworkCreateFlags

2021-08-26 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- include/libvirt/libvirt-network.h | 4 src/libvirt-network.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h index 0be4d64b75..d8eaf83d93 100644 ---