[PATCH v2.1 1/3] interface: introduce downscript element for interface

2020-05-25 Thread Chen Hanxiao
https://gitlab.com/libvirt/libvirt/-/issues/13 Add support for downscript: Signed-off-by: Chen Hanxiao --- docs/formatdomain.html.in | 6 +- docs/schemas/domaincommon.rng | 8 src/conf/domain_conf.c| 9 + src/conf/domain_conf.h| 1 + 4

[PATCH v2.1 3/3] news: add description about downscript

2020-05-25 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4cef804aac..67fb85377d 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -52,6 +52,16 @@ + + + qemu: support

[PATCH v2.1 2/3] downscript: add support for booting and hotplug interface

2020-05-25 Thread Chen Hanxiao
Support downscript for booting vm, and hotunplug interface device. Signed-off-by: Chen Hanxiao --- src/qemu/qemu_extdevice.c | 4 ++ src/qemu/qemu_hotplug.c | 3 ++ tests/qemuxml2argvdata/downscript.xml | 60 + tests/qemuxml2xmloutdata

[PATCH v2.1 0/3] Support network interface downscript

2020-05-25 Thread Chen Hanxiao
QEMU has the ability to run a script when a NIC is brought up and down. Libvirt only enables use of the up script at this time. This series add support for postscript when NIC is down/detached. Chen Hanxiao (3): interface: introduce downscript downscript: add support for booting and hotplug

[PATCH v2 0/3] Support network interface downscript

2020-05-25 Thread Chen Hanxiao
QEMU has the ability to run a script when a NIC is brought up and down. Libvirt only enables use of the up script at this time. This series add support for postscript when NIC is down/detached. Chen Hanxiao (3): interface: introduce downscript downscript: add support for booting and hotplug

[PATCH v2 3/3] downscript: docs: add docs and news

2020-05-25 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao --- docs/formatdomain.html.in | 6 +- docs/news.xml | 10 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 23eb029234..4e2320d537 100644 --- a/docs

[PATCH v2 2/3] downscript: add support for booting and hotplug interface

2020-05-25 Thread Chen Hanxiao
Support downscript for booting vm, and hotunplug interface device. Signed-off-by: Chen Hanxiao --- src/qemu/qemu_extdevice.c | 4 ++ src/qemu/qemu_hotplug.c | 3 ++ tests/qemuxml2argvdata/downscript.xml | 60 + tests/qemuxml2xmloutdata

[PATCH v2 1/3] interface: introduce downscript

2020-05-25 Thread Chen Hanxiao
https://gitlab.com/libvirt/libvirt/-/issues/13 Add support for downscript: Signed-off-by: Chen Hanxiao --- docs/schemas/domaincommon.rng | 8 src/conf/domain_conf.c| 9 + src/conf/domain_conf.h| 1 + 3 files changed, 18 insertions(+) diff

Re:Re: [PATCH 0/3] Support network interface downscript

2020-05-22 Thread Chen Hanxiao
At 2020-05-22 23:09:21, "Michal Privoznik" wrote: >On 5/21/20 3:59 PM, Chen Hanxiao wrote: >> QEMU has the ability to run a script when a NIC is brought up and down. >> Libvirt only enables use of the up script at this time. >> This series add support for posts

[PATCH 2/3] downscript: add test case

2020-05-21 Thread Chen Hanxiao
add a testcase for new element. Signed-off-by: Chen Hanxiao --- tests/qemuxml2argvdata/downscript.xml | 60 + tests/qemuxml2xmloutdata/downscript.xml | 60 + tests/qemuxml2xmltest.c | 1 + 3 files changed, 121 insertions

[PATCH 1/3] downscript: Support network interface downscript

2020-05-21 Thread Chen Hanxiao
https://gitlab.com/libvirt/libvirt/-/issues/13 Add support for downscript: Signed-off-by: Chen Hanxiao --- docs/schemas/domaincommon.rng | 8 src/conf/domain_conf.c| 9 + src/conf/domain_conf.h| 1 + src/qemu/qemu_extdevice.c | 4 src

[PATCH 0/3] Support network interface downscript

2020-05-21 Thread Chen Hanxiao
QEMU has the ability to run a script when a NIC is brought up and down. Libvirt only enables use of the up script at this time. This series add support for postscript when NIC is down/detached. Chen Hanxiao (3): downscript: Support network interface downscript downscript: add test case doc

[PATCH 3/3] doc: downscript: updating the documentation

2020-05-21 Thread Chen Hanxiao
We can give a postscript for some netdev. Signed-off-by: Chen Hanxiao --- docs/formatdomain.html.in | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 23eb029234..4e2320d537 100644 --- a/docs/formatdomain.html.in

[PATCH] RFC: Support network interface downscript

2020-05-14 Thread Chen Hanxiao
. Signed-off-by: Chen Hanxiao --- src/conf/domain_conf.c| 7 +++ src/conf/domain_conf.h| 1 + src/qemu/qemu_extdevice.c | 2 ++ 3 files changed, 10 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c201fc9..5cb39a3 100644 --- a/src/conf/domain_conf.c +++ b/src

[PATCH] docs: drvqemu: trivial fix for qemu commands passthrough

2020-04-22 Thread Chen Hanxiao
element should be the child of Signed-off-by: Chen Hanxiao --- docs/drvqemu.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in index 5f412ba376..afc4ddf56d 100644 --- a/docs/drvqemu.html.in +++ b/docs/drvqemu.html.in

Re: [libvirt] [PATCH v3] qemu: Remove network type limitation for qemuARPGetInterfaces

2018-09-25 Thread Chen Hanxiao
virMacAddrFormat(&(vm->def->nets[i]->mac), macaddr); > for (j = 0; j < table->n; j++) { > virArpTableEntry entry = table->t[j]; >-- >2.19.0 Reviewed-by: Chen Hanxiao Regards, - Chen -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/2] qemu: Remove network type limitation for qemuARPGetInterfaces

2018-09-11 Thread Chen Hanxiao
At 2018-09-11 13:51:43, "Lin Ma" wrote: >On 09/10/2018 02:55 PM, Chen Hanxiao wrote: > >At 2018-09-07 18:44:53, "Lin Ma" wrote: >>When we call qemuARPGetInterfaces to get IP from host's arp table, The >>iface's type has nothing t

Re: [libvirt] [PATCH 1/2] qemu: Remove network type limitation for qemuARPGetInterfaces

2018-09-10 Thread Chen Hanxiao
At 2018-09-07 18:44:53, "Lin Ma" wrote: >When we call qemuARPGetInterfaces to get IP from host's arp table, The >iface's type has nothing to do with it, We should allow all of type. > >Signed-off-by: Lin Ma Hi, with my limited tests, we can't get useful info by arp query from other kind

Re: [libvirt] [PATCH 2/2] virarptable: Return a virArpTablePtr when the nlmsghdr for loop is over

2018-09-10 Thread Chen Hanxiao
or occurred, but the cause is unknown > >It seems that the "if (nh->nlmsg_type == NLMSG_DONE)" statement won't be >meted. So this patch adds 'return table' when the iterations of nlmsghdr >for loop is over. > >Signed-off-by: Lin Ma >--- It seemed that the c

Re: [libvirt] [PATCH] util:Fix with process number and pid file do not match

2018-07-03 Thread Chen Hanxiao
At 2018-07-03 15:36:19, "Michal Prívozník" wrote: >On 07/02/2018 01:08 PM, dubo163 wrote: >> From: dubobo >> >> the libvirtd pid file is not match the os process pid number >> which is smaller than before. >> >> this would be exist if the libvirtd process coredump or the os >> process was

Re: [libvirt] [PATCH] set-lifecycle-action: add description of type and action

2018-06-26 Thread Chen Hanxiao
At 2018-06-21 19:28:55, "Chen Hanxiao" wrote: >From: Chen Hanxiao > >In [1], are described as "on_poweroff", > "on_reboot", "on_crash". > but we accept "poweroff", "reboot" and "crash". >This

[libvirt] [PATCH] set-lifecycle-action: add description of type and action

2018-06-21 Thread Chen Hanxiao
From: Chen Hanxiao In [1], are described as "on_poweroff", "on_reboot", "on_crash". but we accept "poweroff", "reboot" and "crash". This patch adds docs about them. [1]: https://libvirt.org/formatdomain.html#elementsE

[libvirt] [PATCH v3 2/4] cmdDomblkinfo: add --all to show all block devices info

2018-06-19 Thread Chen Hanxiao
From: Chen Hanxiao This patch introduces --all to show all block devices info of guests like: virsh # domblkinfo w08 --all Target CapacityAllocation Physical --- hda42949672960 9878110208 9878110208 vda

[libvirt] [PATCH v3 3/4] cmdDomblkinfoPrint: support printing "-" for invalid virDomainBlockInfo

2018-06-19 Thread Chen Hanxiao
From: Chen Hanxiao For inactive domain, we'll set virDomainBlockInfo to 0 if specific error code got. Print "-" to show the value should be ignored in this scenario. Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 73 1 file c

[libvirt] [PATCH v3 0/4] cmdDomblkinfo: introduce --all to show all block devices info

2018-06-19 Thread Chen Hanxiao
This series introduce --all to cmdDomblkinfo to show all block devices info in one cmd. Likes a combination of domblklist and domblkinfo. v3: check error code on network disk v2: add support --human for --all v1.1 fix a self test Chen Hanxiao (4): cmdDomblkinfo: introduce helper

[libvirt] [PATCH v3 4/4] news: add cmdDomblkinfo --all option

2018-06-19 Thread Chen Hanxiao
From: Chen Hanxiao Update news for cmdDomblkinfo --all option. Signed-off-by: Chen Hanxiao --- v3: update descriptions docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 08e5dcbda3..9bf7442047 100644 --- a/docs/news.xml +++ b

[libvirt] [PATCH v3 1/4] cmdDomblkinfo: introduce helper cmdDomblkinfoPrint

2018-06-19 Thread Chen Hanxiao
From: Chen Hanxiao Introduce helper cmdDomblkinfoPrint for printing. Reviewed-by: John Ferlan Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 39 ++-- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/tools/virsh-domain-monitor.c b

Re: [libvirt] [PATCH v2 2/3] cmdDomblkinfo: add --all to show all block devices info

2018-06-15 Thread Chen Hanxiao
At 2018-06-15 05:41:48, "John Ferlan" wrote: > > >On 06/11/2018 06:52 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> [...] >> > >Do you have networked disks in your domain configs? For a non running >guest, t; otherwise, you would have n

[libvirt] [PATCH] libvirt: fix a typo

2018-06-13 Thread Chen Hanxiao
From: Chen Hanxiao s/httsp/https Signed-off-by: Chen Hanxiao --- src/libvirt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt.c b/src/libvirt.c index ffb002f4e1..52f4dd2808 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -1098,7 +1098,7

[libvirt] [PATCH v2 2/3] cmdDomblkinfo: add --all to show all block devices info

2018-06-11 Thread Chen Hanxiao
From: Chen Hanxiao This patch introduces --all to show all block devices info of guests like: virsh # domblkinfo --all Target CapacityAllocation Physical --- hda42949672960 9878110208 9878110208 vda

[libvirt] [PATCH v2 1/3] cmdDomblkinfo: introduce helper cmdDomblkinfoPrint

2018-06-11 Thread Chen Hanxiao
From: Chen Hanxiao Introduce helper cmdDomblkinfoPrint for printing. Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 39 ++-- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain

[libvirt] [PATCH v2 0/3] cmdDomblkinfo: introduce --all to show all block devices info

2018-06-11 Thread Chen Hanxiao
This series introduce --all to cmdDomblkinfo to show all block devices info in one cmd. Likes a combination of domblklist and domblkinfo. v2: add support --human for --all v1.1 fix a self test Chen Hanxiao (3): cmdDomblkinfo: introduce helper cmdDomblkinfoPrint cmdDomblkinfo: add --all

[libvirt] [PATCH v2 3/3] news: add cmdDomblkinfo --all option

2018-06-11 Thread Chen Hanxiao
From: Chen Hanxiao Update news for cmdDomblkinfo --all option. Signed-off-by: Chen Hanxiao --- docs/news.xml | 8 1 file changed, 8 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index e0cf381f33..c07db04809 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -193,6 +193,14

[libvirt] [PATCH] virstring: fix a typo

2018-06-11 Thread Chen Hanxiao
From: Chen Hanxiao s/glibc's_asprintf/glibc's asprintf Signed-off-by: Chen Hanxiao --- src/util/virstring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virstring.h b/src/util/virstring.h index fa2ec1df4d..607ae66e99 100644 --- a/src/util/virstring.h +++ b

Re: [libvirt] [PATCH v1.1 1/2] cmdDomblkinfo: introduce --all to show all block devices info

2018-06-11 Thread Chen Hanxiao
At 2018-06-09 04:49:08, "John Ferlan" wrote: > > >On 06/07/2018 12:19 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> This patch introduces --all to show all block devices info >> of guests like: >> >> virsh # domblkinfo w08 --all

[libvirt] [PATCH v1.1 1/2] cmdDomblkinfo: introduce --all to show all block devices info

2018-06-06 Thread Chen Hanxiao
From: Chen Hanxiao This patch introduces --all to show all block devices info of guests like: virsh # domblkinfo w08 --all Target CapacityAllocation Physical --- hda42949672960 9878110208 9878110208 vda

[libvirt] [PATCH v1.1 0/2] cmdDomblkinfo: introduce --all to show all

2018-06-06 Thread Chen Hanxiao
This series introduce --all to cmdDomblkinfo to show all block devices info in one cmd. Likes a combination of domblklist and domblkinfo. v1.1: fix a self test Chen Hanxiao (2): cmdDomblkinfo: introduce --all to show all block devices info news: add cmdDomblkinfo --all option docs

[libvirt] [PATCH v1.1 2/2] news: add cmdDomblkinfo --all option

2018-06-06 Thread Chen Hanxiao
From: Chen Hanxiao Update news for cmdDomblkinfo --all option. Signed-off-by: Chen Hanxiao --- docs/news.xml | 8 1 file changed, 8 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index c45850f625..daee3aa6b7 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -123,6 +123,14

[libvirt] [PATCH 1/2] cmdDomblkinfo: introduce --all to show all block devices info

2018-06-06 Thread Chen Hanxiao
From: Chen Hanxiao This patch introduces --all to show all block devices info of guests like: virsh # domblkinfo w08 --all Target CapacityAllocation Physical --- hda42949672960 9878110208 9878110208 vda

[libvirt] [PATCH 2/2] news: add cmdDomblkinfo --all option

2018-06-06 Thread Chen Hanxiao
From: Chen Hanxiao Update news for cmdDomblkinfo --all option. Signed-off-by: Chen Hanxiao --- docs/news.xml | 8 1 file changed, 8 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index c45850f625..daee3aa6b7 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -123,6 +123,14

[libvirt] [PATCH 0/2] cmdDomblkinfo: introduce --all to show all

2018-06-06 Thread Chen Hanxiao
This series introduce --all to cmdDomblkinfo to show all block devices info in one cmd. Likes a combination of domblklist and domblkinfo. Chen Hanxiao (2): cmdDomblkinfo: introduce --all to show all block devices info news: add cmdDomblkinfo --all option docs/news.xml| 8

Re: [libvirt] [PATCH] virsh: add missing help info of --source to domifaddr

2018-03-27 Thread Chen Hanxiao
At 2018-03-16 10:03:15, "Chen Hanxiao" <chen_han_x...@126.com> wrote: >From: Chen Hanxiao <chenhanx...@gmail.com> > >commit b4b5c82ce forgot to add this. > >Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> >--- > tools/virsh-domain-monitor.c |

[libvirt] [PATCH 1/2] virarptable: fix some leaks and format issue

2018-03-17 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> fix some leaks and format issue Also support virArpTableFree to get NULL. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- src/util/virarptable.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --gi

[libvirt] [PATCH 2/2] qemu: fix a mem leak

2018-03-17 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> fix a mem leak Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5c55c69af..14b72a8f6 100644 --

Re: [libvirt] [PATCH rebase v4 2/5] util: introduce helper to parse message from RTM_GETNEIGH query

2018-03-17 Thread Chen Hanxiao
At 2018-03-16 18:53:58, "John Ferlan" <jfer...@redhat.com> wrote: > > >On 03/08/2018 02:11 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> introduce helper to parse RTM_GETNEIGH query message and >> store it in

[libvirt] [PATCH 0/2] virarptable: fix some leaks and format

2018-03-17 Thread Chen Hanxiao
Address John's comment on v4 Chen Hanxiao (2): virarptable: fix some leaks and format issue qemu: fix some leaks src/qemu/qemu_driver.c | 3 +++ src/util/virarptable.c | 13 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) -- 2.14.3 -- libvir-list mailing list libvir-list

[libvirt] [PATCH] virsh: add missing help info of --source to domifaddr

2018-03-15 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> commit b4b5c82ce forgot to add this. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tools/virsh-domain-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-doma

Re: [libvirt] [PATCH 2/2] virarptable: Include rtnetlink.h only on Linux

2018-03-15 Thread Chen Hanxiao
arptable.h >@@ -25,7 +25,6 @@ > # define __VIR_ARPTABLE_H__ > > # include "internal.h" >-# include > > typedef struct _virArpTableEntry virArpTableEntry; > typedef virArpTableEntry *virArpTableEntryPtr; >-- Reviewed-by: Chen Hanxiao<chenhanx...@gmail.com> Regards, - Chen -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH rebase v4 0/5] qemu: use arp table of host to get the

2018-03-15 Thread Chen Hanxiao
At 2018-03-15 18:23:03, "Michal Privoznik" <mpriv...@redhat.com> wrote: >On 03/08/2018 08:11 AM, Chen Hanxiao wrote: >> introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address >> of VM from the output of /proc/net/arp >> >> Chen Hanxiao (5):

Re: [libvirt] [PATCH rebase v4 0/5] qemu: use arp table of host to get the

2018-03-15 Thread Chen Hanxiao
At 2018-03-08 15:11:54, "Chen Hanxiao" <chen_han_x...@126.com> wrote: >introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address >of VM from the output of /proc/net/arp > >Chen Hanxiao (5): > util: introduce virNetlinkGetNeighbor to get neighbor table

[libvirt] [PATCH rebase v4 1/5] util: introduce virNetlinkGetNeighbor to get neighbor table entry

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> use RTM_GETNEIGH to query arp table entry by netlink socket Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v4: use netlink to get arp table entry src/libvirt_private.syms | 1 + src/util/virnetli

[libvirt] [PATCH rebase v4 5/5] news: qemu: use arp table of host to get the IP address of guests

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v4: rebase on 4.2 v3: more verbose description docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index a51ca973e..6d72

[libvirt] [PATCH rebase v4 0/5] qemu: use arp table of host to get the

2018-03-07 Thread Chen Hanxiao
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Chen Hanxiao (5): util: introduce virNetlinkGetNeighbor to get neighbor table entry util: introduce helper to parse message from RTM_GETNEIGH query qemu: introduce qemuARPGetInterfaces

[libvirt] [PATCH rebase v4 3/5] qemu: introduce qemuARPGetInterfaces to get IP from host's arp table

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the message of netlink RTM_GETNEIGH Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v4: remove dummy entry use VIR_APPEND_ELEMENT v3

[libvirt] [PATCH rebase v4 4/5] virsh: add --source arp to domifaddr

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> We can use: domifaddr f26-cloud --source arp to get the address. Acked-by: Michal Privoznik <mpriv...@redhat.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tools/virsh-domain-monitor.c | 2 ++ tools/virsh.pod

[libvirt] [PATCH rebase v4 2/5] util: introduce helper to parse message from RTM_GETNEIGH query

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> introduce helper to parse RTM_GETNEIGH query message and store it in struct virArpTable. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v4-rebase: fit split Makefile.am fit new virMacAddr fields v4: use netlink query instea

Re: [libvirt] [PATCH v4 0/5] qemu: use arp table of host to get the

2018-02-21 Thread Chen Hanxiao
At 2018-02-08 15:46:59, "Chen Hanxiao" <chen_han_x...@126.com> wrote: >introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address >of VM from the output of /proc/net/arp > >Chen Hanxiao (5): > util: introduce virNetlinkGetNeighbor to get neighbor table

[libvirt] [PATCH] qemu: don't leak in qemuGetDHCPInterfaces when failing to alloc

2018-02-10 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> We forgot to free alloced mem when failed to dup ifname or macaddr. Also use VIR_STEAL_PTR to simplify codes. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- src/qemu/qemu_agent.c | 3 +-- src/qemu/qemu_driver.c | 7 +++ 2 f

Re: [libvirt] [PATCH] qemu: Alter condition to avoid possible NULL deref

2018-02-09 Thread Chen Hanxiao
if (!(watchdog->model == dev->model && > watchdog->action == dev->action && > virDomainDeviceInfoAddressIsEqual(>info, >info))) { > virReportError(VIR_ERR_DEVICE_MISSING, >-- Reviewed-by: Chen Hanxiao <chenhanx...@gmail.com> Regards, - Chen -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v4 5/5] news: qemu: use arp table of host to get the IP address of guests

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v3: more verbose description docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 5a2943a58..5d6a467d3 100644 --- a/docs/ne

[libvirt] [PATCH v4 2/5] util: introduce helper to parse message from RTM_GETNEIGH query

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> introduce helper to parse RTM_GETNEIGH query message and store it in struct virArpTable. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v4: use netlink query instead of parsing /proc/net/arp v3: s/virGetArpTable/virArpTabl

[libvirt] [PATCH v4 1/5] util: introduce virNetlinkGetNeighbor to get neighbor table entry

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> use RTM_GETNEIGH to query arp table entry by netlink socket Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v4: use netlink to get arp table entry src/libvirt_private.syms | 1 + src/util/virnetli

[libvirt] [PATCH v4 3/5] qemu: introduce qemuARPGetInterfaces to get IP from host's arp table

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the message of netlink RTM_GETNEIGH Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v4: remove dummy entry use VIR_APPEND_ELEMENT v3

[libvirt] [PATCH v4 4/5] virsh: add --source arp to domifaddr

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> We can use: domifaddr f26-cloud --source arp to get the address. Acked-by: Michal Privoznik <mpriv...@redhat.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tools/virsh-domain-monitor.c | 2 ++ tools/virsh.pod

[libvirt] [PATCH v4 0/5] qemu: use arp table of host to get the

2018-02-07 Thread Chen Hanxiao
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Chen Hanxiao (5): util: introduce virNetlinkGetNeighbor to get neighbor table entry util: introduce helper to parse message from RTM_GETNEIGH query qemu: introduce qemuARPGetInterfaces

[libvirt] [PATCH] util: netlink: fix the mismatch parameter description of functions

2018-02-06 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Some of netlink functions don't have the right @parameters description according to the declaration of function. This patch fix them. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- src/util/virne

Re: [libvirt] [PATCH v3 1/4] util: introduce helper to parse /proc/net/arp

2018-02-06 Thread Chen Hanxiao
At 2018-01-29 20:01:30, "Peter Krempa" <pkre...@redhat.com> wrote: >On Mon, Jan 29, 2018 at 16:35:33 +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> introduce helper to parse /proc/net/arp and >> store it in struc

[libvirt] [PATCH go] go: Add ERR_DEVICE_MISSING constants

2018-01-31 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- error.go | 3 +++ error_compat.h | 6 ++ 2 files changed, 9 insertions(+) diff --git a/error.go b/error.go index fb218f7..9de277c 100644 --- a/error.go +++ b/error.go @@ -

Re: [libvirt] [PATCH v3 4/5] qemu: Use VIR_ERR_DEVICE_MISSING for various DetachDeviceConfig messages

2018-01-31 Thread Chen Hanxiao
At 2018-01-31 23:34:55, "John Ferlan" <jfer...@redhat.com> wrote: > >Let's alter the commit message to be more similar to patch 3/5, e.g.: > >qemu: Use VIR_ERR_DEVICE_MISSING for various coldplug messages > >On 01/22/2018 11:24 PM, Chen Hanxiao wrote: >> F

[libvirt] [PATCH perl] perl: Add ERR_DEVICE_MISSING constants

2018-01-31 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- Changes | 2 +- Virt.xs | 1 + lib/Sys/Virt/Error.pm | 4 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index eda3

Re: [libvirt] [PATCH v3 3/5] qemu: Use VIR_ERR_DEVICE_MISSING for various hotplug messages

2018-01-31 Thread Chen Hanxiao
At 2018-01-31 23:33:35, "John Ferlan" <jfer...@redhat.com> wrote: > > >On 01/22/2018 11:24 PM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> Modify OPERATION_FAILED error codes to use DEVICE_MISSING instead. >

Re: [libvirt] [PATCH v3 2/5] qemu: Introduce VIR_ERR_DEVICE_MISSING

2018-01-31 Thread Chen Hanxiao
At 2018-01-31 23:32:35, "John Ferlan" <jfer...@redhat.com> wrote: > > >On 01/22/2018 11:24 PM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> Add new error code to be able to allow consumers (such as Nova) to be &g

[libvirt] [PATCH v3 4/4] news: qemu: use arp table of host to get the IP address of guests

2018-01-29 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v3: more verbose description docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 2268fdf79..706546e6d 100644 --- a/docs/ne

[libvirt] [PATCH v3 0/4] qemu: use arp table of host to get the

2018-01-29 Thread Chen Hanxiao
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Chen Hanxiao (4): util: introduce helper to parse /proc/net/arp qemu: introduce qemuARPGetInterfaces to get IP from host's arp table virsh: add --source arp to domifaddr news: qemu

[libvirt] [PATCH v3 3/4] virsh: add --source arp to domifaddr

2018-01-29 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> We can use: domifaddr f26-cloud --source arp to get the address. Acked-by: Michal Privoznik <mpriv...@redhat.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tools/virsh-domain-monitor.c | 2 ++ tools/virsh.pod

[libvirt] [PATCH v3 2/4] qemu: introduce qemuARPGetInterfaces to get IP from host's arp table

2018-01-29 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v3: add docs in virDomainInterfaceAddresses remove error label show netwo

[libvirt] [PATCH v3 1/4] util: introduce helper to parse /proc/net/arp

2018-01-29 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> introduce helper to parse /proc/net/arp and store it in struct virArpTable. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v3: s/virGetArpTable/virArpTableGet alloc virArpTable in virArpTableGet return ENOSUPP on none-Li

[libvirt] [PATCH v2 0/4] qemu: use arp table of host to get the

2018-01-24 Thread Chen Hanxiao
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Chen Hanxiao (4): util: introduce helper to parse /proc/net/arp qemu: introduce qemuARPGetInterfaces to get IP from host's arp table virsh: add --source arp to domifaddr news: qemu

[libvirt] [PATCH v2 1/4] util: introduce helper to parse /proc/net/arp

2018-01-24 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> introduce helper to parse /proc/net/arp and store it in struct virArpTable. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- src/libvirt_private.syms | 2 ++ src/util/virmacaddr.c| 67 +

[libvirt] [PATCH v2 3/4] virsh: add --source arp to domifaddr

2018-01-24 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> We can use: domifaddr f26-cloud --source arp to get the address. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tools/virsh-domain-monitor.c | 2 ++ tools/virsh.pod | 7 --- 2 files changed, 6 insertions(+),

[libvirt] [PATCH v2 2/4] qemu: introduce qemuARPGetInterfaces to get IP from host's arp table

2018-01-24 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- include/libvirt/libvirt-domain.h | 1 + src/qemu/qemu_driver.c

[libvirt] [PATCH v2 4/4] news: qemu: use arp table of host to get the IP address of guests

2018-01-24 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- docs/news.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index b9e04c632..105917f4d 100644 --- a/docs/news.xml +++ b/docs/news.xml @@

Re: [libvirt] [PATCH] qemu: get VM's ip address from the output of arp command

2018-01-24 Thread Chen Hanxiao
At 2018-01-24 02:01:27, "Martin Kletzander" <mklet...@redhat.com> wrote: >On Tue, Jan 23, 2018 at 03:40:02PM +0800, Chen Hanxiao wrote: >>From: Chen Hanxiao <chenhanx...@gmail.com> >> >>Introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get

[libvirt] [PATCH] qemu: get VM's ip address from the output of arp command

2018-01-23 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of `arp -an` command. We can use: domifaddr f26-cloud --source arp to get the address. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- inc

[libvirt] [PATCH v3 1/5] qemu: Add some more details for hotplug errors when device not found

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> More proper/detail error messages updated. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v3: subject changed. some description of logs changed. src/libvirt_private.syms | 2 ++ src/qemu/qemu_hot

[libvirt] [PATCH v3 4/5] qemu: Use VIR_ERR_DEVICE_MISSING for various DetachDeviceConfig messages

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Modify OPERATION_FAILED error codes to use DEVICE_MISSING instead. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- src/qemu/qemu_driver.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --gi

[libvirt] [PATCH v3 2/5] qemu: Introduce VIR_ERR_DEVICE_MISSING

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Add new error code to be able to allow consumers (such as Nova) to be able to key of a specific error code rather than needing to search the error message." Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v3: commit message

[libvirt] [PATCH v3 0/5] Introduce VIR_ERR_DEVICE_MISSING

2018-01-22 Thread Chen Hanxiao
Use Introduce VIR_ERR_DEVICE_MISSING for hotplug and detach device error message. Chen Hanxiao (5): qemu: Add some more details for hotplug errors when device not found qemu: Introduce VIR_ERR_DEVICE_MISSING qemu: Use VIR_ERR_DEVICE_MISSING for various hotplug messages qemu: Use

[libvirt] [PATCH v3 3/5] qemu: Use VIR_ERR_DEVICE_MISSING for various hotplug messages

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Modify OPERATION_FAILED error codes to use DEVICE_MISSING instead. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v3: modify virDomainNetFindIdx to use VIR_ERR_DEVICE_MISSING src/conf/domain_conf.c | 8 src/qemu/qe

[libvirt] [PATCH v3 5/5] news: Add VIR_ERR_DEVICE_MISSING change as improvements

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- docs/news.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index b4d980624..5798f42d8 100644 --- a/docs/news.xml +++ b/docs/news.xml @@

[libvirt] [PATCH v3] libvirtd: clarify the TLS conf default value setting

2018-01-21 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Provide more details related to the requirement that setting one of the values requires setting all of them. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v3: description updated follow John's comments v2: fix a t

[libvirt] [PATCH v2] libvirtd: clarify the TLS conf default vaule setting

2018-01-12 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> As the description of daemon/libvirtd.conf, setting key_file, cert_file or key_file will override the default value. But if we set any one of them, we need to set all the rest of them. This patch clarify that description. Signed-off-by: Chen H

[libvirt] [PATCH] libvirtd: clarify the TLS conf default vaule setting

2018-01-12 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> As the description of daemon/libvirtd.conf, setting key_file, cert_file or key_file will override the default value. But if we set any one of them, we need to set all the rest of them. This patch clarify that description. Signed-off-by: Chen H

Re: [libvirt] [resend][PATCH] deamon: use default value if ca_file, cert_file or key_file not set

2018-01-12 Thread Chen Hanxiao
At 2018-01-12 17:44:38, "Jiri Denemark" <jdene...@redhat.com> wrote: >On Fri, Jan 12, 2018 at 17:09:10 +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> As the description of daemon/libvirtd.conf, setting >> key_file

[libvirt] [resend][PATCH] deamon: use default value if ca_file, cert_file or key_file not set

2018-01-12 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> As the description of daemon/libvirtd.conf, setting key_file, cert_file or key_file will override the default value. But if we set any one of them, we need to set all the rest of them. This patch set default value to them as daemon/libvirt

Re: [libvirt] [PATCH v2] domain_conf: skip boot order check of CD-ROM or floppy device when change-media

2018-01-12 Thread Chen Hanxiao
At 2018-01-11 21:36:29, "Ján Tomko" <jto...@redhat.com> wrote: >On Thu, Jan 11, 2018 at 06:16:37PM +0800, Chen Hanxiao wrote: >>From: Chen Hanxiao <chenhanx...@gmail.com> >> >>If we insert or eject a CD-ROM/floppy device by: >> 'virsh

[libvirt] [PATCH v2] domain_conf: skip boot order check of CD-ROM or floppy device when change-media

2018-01-11 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> If we insert or eject a CD-ROM/floppy device by: 'virsh change-media VM --eject/--insert some.iso --live', and the original CD-ROM device was configed with a boot order, we may get: unsupported configuration: boot order 2 is already used by a

Re: [libvirt] [PATCH] domain_conf: skip boot order check of CD-ROM or floppy device

2018-01-05 Thread Chen Hanxiao
At 2018-01-05 23:01:50, "John Ferlan" <jfer...@redhat.com> wrote: > > >On 12/25/2017 06:21 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> If we insert or eject a CD-ROM/floppy device with a boot order, >> w

Re: [libvirt] [PATCH v3 1/2] qemu: Add support for hot unplugging redirdev device which can use the detach-device --live

2018-01-05 Thread Chen Hanxiao
在 2018-01-05 21:16:20,"John Ferlan" <jfer...@redhat.com> 写道: > > >On 01/05/2018 05:40 AM, Ján Tomko wrote: >> On Fri, Dec 22, 2017 at 04:04:03PM +0800, Chen Hanxiao wrote: >>> From: Chen Hanxiao <chenhanx...@gmail.com> >>> [...] >&

[libvirt] [PATCH v4.1 1/2] qemu: Add support for hot unplugging redirdev device which can use the detach-device --live

2018-01-05 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> Commit id '162efa1a' added support hotplug a redirdev, but did not add the hot unplug. This patch will add that support to allow usage of the detach-device --live on the device. Reviewed-by: John Ferlan <jfer...@redhat.com> Signed-off-by:

  1   2   3   4   5   6   >