Re: [libvirt] [Xen-devel] converting gatewaydev= from domU.cfg to libvirt.xml fails

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Jim Fehlig wrote: > On 04/17/2015 12:50 PM, Olaf Hering wrote: > >How should this be converted? > > > >/etc/init.d/boot.local > >tap=xentap > >tunctl -pt ${tap} > >ip addr add 1.1.1.1/29 dev ${tap} > >ip link set up dev ${tap} > > > >domU.cfg > >vif=[ > >'mac=00:16:3e:13:01:00,ip=1

Re: [libvirt] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Jim Fehlig wrote: > On 04/17/2015 11:59 AM, Olaf Hering wrote: > >On Fri, Apr 17, Olaf Hering wrote: > > > >>If the domU configu has sdl enabled libvirtd crashes: > >>libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion > >>`!libxl_defbool_is_default(db)' failed. >

Re: [libvirt] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Jim Fehlig wrote: > On 04/17/2015 11:19 AM, Olaf Hering wrote: > >+libxl_defbool_set(&x_vfb->vnc.enable, 0); > Not shown here, but just before the switch is > > libxl_device_vfb_init(x_vfb); > > which IIUC (looking at the impl in $xensrc/tools/libxl/_libxl_types.

[libvirt] [libvirt-php] memory overflow when using libvirt_list_networks

2015-04-17 Thread Kash Pande
Finding lots of bad behaviour here: [Fri Apr 17 23:44:04.590626 2015] [:error] [pid 31714] [client 127.0.0.1:38103] PHP Warning: libvirt_list_networks(): this function is not supported by the connection driver: virConnectNumOfNetworks [Fri Apr 17 23:44:04.590655 2015] [:error] [pid 31714] [clien

[libvirt] [PATCH 04/11] caps: Switch AddGuest to take VIR_DOMAIN_OSTYPE value

2015-04-17 Thread Cole Robinson
Rather than an opencoded string. This should be a no-op --- src/bhyve/bhyve_capabilities.c | 2 +- src/conf/capabilities.c | 11 ++- src/conf/capabilities.h | 2 +- src/esx/esx_driver.c | 4 ++-- src/libxl/libxl_conf.c | 2 +- src/lxc/lxc_conf.

[libvirt] [PATCH 00/11] caps: various internal cleanups

2015-04-17 Thread Cole Robinson
First two patches are straight bug fixes. The rest is a bunch of internal cleanup I felt compelled to do. Summary is - Switch caps and domain to use an enum for os.type value (hvm, xen, exe, ...) - Switch caps to use VIR_DOMAIN_VIRT* internally - Add a single function for looking up domain XML re

[libvirt] [PATCH 02/11] domain: conf: Don't validate VM ostype/arch at daemon startup

2015-04-17 Thread Cole Robinson
When parsing XML, we validate the passed ostype + arch combo against the detected hypervisor capabilities. This has led to the following problem: - Define x86 qemu guest - qemu is inadvertently removed from the host - libvirtd is restarted. fails to parse VM config since arch is removed - 'virsh l

[libvirt] [PATCH 03/11] caps: Use an enum internally for ostype value

2015-04-17 Thread Cole Robinson
But the internal API stays the same, and we just convert the value as needed. Not useful yet, but this is the beginning step of using an enum for ostype throughout the code. --- src/conf/capabilities.c | 74 ++--- src/conf/capabilities.h | 2 +- src/con

[libvirt] [PATCH 01/11] domain: conf: Better errors on bad os values

2015-04-17 Thread Cole Robinson
If no was specified: before: unknown OS type no OS type after : xml error: an os must be specified If an is specified that's not in our capabiliities data: before: unknown OS type: $type after : unsupported configuration: no support found for os '$type' VIR_ERR_OS_TYPE is now unused (

Re: [libvirt] [PATCH v3 3/4] scsi: Adjust return value for virStorageBackendSCSINewLun

2015-04-17 Thread John Ferlan
work - so we'll short circuit here. >>> >>> This also rejects the non-stable path '/dev' that was accepted before. >>> >> >> Not quite sure I see the issue - can you be more specific? Am I missing >> something obvious? >> >> Previously if "pool->def->target.path" is "/dev" (or NULL or "/dev/" or

[libvirt] [PATCH 07/11] caps: Add virCapabilitiesDomainDataLookup

2015-04-17 Thread Cole Robinson
This is a helper function to look up all capabilities data for all the OS bits that are relevant to . This is - os type - arch - domain type - emulator - machine type This will be used to replace several functions in later commits. --- src/conf/capabilities.c | 163 +

[libvirt] [PATCH 11/11] domain: conf: Drop expectedVirtTypes

2015-04-17 Thread Cole Robinson
This needs to specified in way too many places for a simple validation check. The ostype/arch/virttype validation checks later in DomainDefParseXML should catch most of the cases that this was covering. --- src/bhyve/bhyve_driver.c | 5 --- src/conf/domain_conf.c| 79 +---

[libvirt] [PATCH 05/11] domain: Convert os.type to VIR_DOMAIN_OSTYPE enum

2015-04-17 Thread Cole Robinson
--- src/conf/capabilities.c | 55 --- src/conf/capabilities.h | 10 ++-- src/conf/domain_audit.c | 2 +- src/conf/domain_conf.c | 115 +++ src/conf/domain_conf.h | 2 +- src/hyperv/hyperv_drive

[libvirt] [PATCH 10/11] caps: Use DomainDataLookup to replace GuestDefault*

2015-04-17 Thread Cole Robinson
This revealed that GuestDefaultEmulator was a bit buggy, capable of returning an emulator that didn't match the passed domain type. Fix up the test suite input to continue to pass. --- src/conf/capabilities.c| 122 - src/conf/capabilities.h

[libvirt] [PATCH 06/11] caps: Convert to use VIR_DOMAIN_VIRT internally

2015-04-17 Thread Cole Robinson
--- src/bhyve/bhyve_capabilities.c | 4 ++-- src/conf/capabilities.c | 28 ++-- src/conf/capabilities.h | 10 +- src/conf/domain_conf.c | 17 + src/esx/esx_driver.c | 4 ++-- src/libxl/libxl_conf.c

[libvirt] [PATCH 08/11] domain: conf: Do ostype/arch/machine parsing earlier

2015-04-17 Thread Cole Robinson
Just move this code to where we parse virtType. Lots of things depend on os.type values so it should be handled early like virtType. --- src/conf/domain_conf.c | 182 - 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/src/conf/domain_c

[libvirt] [PATCH 09/11] domain: conf: Use CapabilitiesDomainDataLookup for caps validation

2015-04-17 Thread Cole Robinson
The strange logic here is just to duplicate the previous behavior, which parts of the test suite are currently relying on. --- src/conf/capabilities.c | 68 - src/conf/capabilities.h | 11 src/conf/domain_conf.c | 61 ++-

[libvirt] [PATCH 3/3] libxl: provide integration with lock manager

2015-04-17 Thread Jim Fehlig
Provide integration with libvirt's lock manager in the libxl driver. Signed-off-by: Jim Fehlig --- src/Makefile.am | 12 + src/libxl/libvirtd_libxl.aug | 2 ++ src/libxl/libxl.conf | 10 src/libxl/libxl_conf.c | 14

[libvirt] [PATCH 2/3] libxl: Introduce configuration file for libxl driver

2015-04-17 Thread Jim Fehlig
Introduce libxl.conf configuration file, adding the 'autoballoon' setting as the first knob for controlling the libxl driver. Signed-off-by: Jim Fehlig --- libvirt.spec.in | 8 + src/Makefile.am | 24 +- src/libxl/libvirtd_libxl.aug

[libvirt] [PATCH 0/3] Support libvirt's lock manager in the libxl driver

2015-04-17 Thread Jim Fehlig
Patch 1 relaxes the requirement of PID != 0 in the locking code. danpb and I discussed this on IRC: danpb: jimfehlig: it wouldn't be the end of the world if you leave pid as 0 danpb: jimfehlig: it'd just loose some safety sanity check in that scenario Patch 2 introduces a config file for the lib

[libvirt] [PATCH 1/3] locking: relax PID requirement

2015-04-17 Thread Jim Fehlig
Some hypervisors like Xen do not have PIDs associated with domains. Relax the requirement for PID != 0 in the locking code so it can be used by hypervisors that do not represent domains as a process running on the host. Signed-off-by: Jim Fehlig --- src/locking/lock_daemon.c | 2 +- sr

Re: [libvirt] [Xen-devel] converting gatewaydev= from domU.cfg to libvirt.xml fails

2015-04-17 Thread Jim Fehlig
On 04/17/2015 12:50 PM, Olaf Hering wrote: How should this be converted? /etc/init.d/boot.local tap=xentap tunctl -pt ${tap} ip addr add 1.1.1.1/29 dev ${tap} ip link set up dev ${tap} domU.cfg vif=[ 'mac=00:16:3e:13:01:00,ip=1.1.1.2,type=vif,gatewaydev=xentap,script=vif-route' ] The result f

Re: [libvirt] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Jim Fehlig
On 04/17/2015 11:59 AM, Olaf Hering wrote: On Fri, Apr 17, Olaf Hering wrote: If the domU configu has sdl enabled libvirtd crashes: libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed. Initialize the relevant defbool variables in libxl_de

Re: [libvirt] [PATCH] qemu: set macvtap physdevs online when macvtap is set online

2015-04-17 Thread Laine Stump
On 04/15/2015 02:59 PM, John Ferlan wrote: > On 04/13/2015 01:44 PM, Laine Stump wrote: >> A further fix for: >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1113474 >> >> Since there is no possibility that any type of macvtap will work if >> the parent physdev it's attached to is offline, we s

Re: [libvirt] [PATCH] libxl: include a XLU_Config in _libxlDriverConfig

2015-04-17 Thread Jim Fehlig
On 04/17/2015 11:44 AM, Olaf Hering wrote: Upcoming changes for vscsi will use libxlutil.so to prepare the configuration for libxl. The helpers needs a xlu struct for logging. Provide one and reuse the existing output as log target. Signed-off-by: Olaf Hering Cc: Jim Fehlig --- src/libxl/lib

Re: [libvirt] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Jim Fehlig
On 04/17/2015 11:19 AM, Olaf Hering wrote: If the domU configu has sdl enabled libvirtd crashes: libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed. The assertion seems harsh considering the offense... Initialize the relevant defbool v

Re: [libvirt] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Olaf Hering wrote: > If the domU configu has sdl enabled libvirtd crashes: > libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion > `!libxl_defbool_is_default(db)' failed. > > Initialize the relevant defbool variables in libxl_device_vfb. Fix one crash, find anoth

[libvirt] converting gatewaydev= from domU.cfg to libvirt.xml fails

2015-04-17 Thread Olaf Hering
How should this be converted? /etc/init.d/boot.local tap=xentap tunctl -pt ${tap} ip addr add 1.1.1.1/29 dev ${tap} ip link set up dev ${tap} domU.cfg vif=[ 'mac=00:16:3e:13:01:00,ip=1.1.1.2,type=vif,gatewaydev=xentap,script=vif-route' ] The result from "convert-xml xen-xl domU,cfg" is:

Re: [libvirt] [PATCH] libxl: initialize allocated libxl_device_vfb array

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Olaf Hering wrote: > Its already allocated by calloc, but the init function sets ->devid. Scratch that one, libxlMakeVfb already calls libxl_device_vfb_init. Somehow I missed that. Olaf -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/li

[libvirt] [PATCH] libxl: include a XLU_Config in _libxlDriverConfig

2015-04-17 Thread Olaf Hering
Upcoming changes for vscsi will use libxlutil.so to prepare the configuration for libxl. The helpers needs a xlu struct for logging. Provide one and reuse the existing output as log target. Signed-off-by: Olaf Hering Cc: Jim Fehlig --- src/libxl/libxl_conf.c | 6 ++ src/libxl/libxl_conf.h |

[libvirt] [PATCH] libxl: initialize allocated libxl_device_vfb array

2015-04-17 Thread Olaf Hering
Its already allocated by calloc, but the init function sets ->devid. Just in case anything cares. Signed-off-by: Olaf Hering Cc: Jim Fehlig --- src/libxl/libxl_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 6feb7d9..8b76fc7 10064

[libvirt] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Olaf Hering
If the domU configu has sdl enabled libvirtd crashes: libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed. Initialize the relevant defbool variables in libxl_device_vfb. Signed-off-by: Olaf Hering Cc: Jim Fehlig --- Seen in 1.2.14. src/

Re: [libvirt] [PATCH] domcaps: Check for architecture more wisely

2015-04-17 Thread Cole Robinson
On 04/09/2015 09:27 AM, Cole Robinson wrote: > On 04/09/2015 04:00 AM, Michal Privoznik wrote: >> On 08.04.2015 17:25, Cole Robinson wrote: >>> On 04/08/2015 11:12 AM, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1209948 So we have this bug. The virConnectGetDo

Re: [libvirt] [RFCv2 PoCv1 PATCH 00/15] Just Admin API

2015-04-17 Thread Lee Schermerhorn
On Fri, 2015-04-17 at 11:30 +0100, Daniel P. Berrange wrote: > On Thu, Apr 16, 2015 at 04:46:10PM +0200, Martin Kletzander wrote: > > *** BLURB *** > > > > ... > > > > Just kidding :) > > > > Sooo... After very very VERY long time, here's a draft of an admin > > interface that is supposed to op

Re: [libvirt] [PATCH] domain: conf: Better errors on bad os values

2015-04-17 Thread Cole Robinson
On 04/17/2015 09:10 AM, Eric Blake wrote: > On 04/17/2015 07:06 AM, Cole Robinson wrote: >> If no was specified: >> before: unknown OS type no OS type >> after : xml error: an os must be specified >> >> If an is specified that's not in our capabiliities data: > > s/capabiliities/capabilitie

Re: [libvirt] [PATCH] rng: Forbid to validate mismatched 'device' and 'type' attributes

2015-04-17 Thread Ján Tomko
On Fri, Apr 17, 2015 at 01:31:09PM +0200, Erik Skultety wrote: > According to docs, using 'lun' as a value for device attribute is only valid > with disk types 'block' and 'network'. However current RNG schema also allows > a combination type='file' device='lun' which results in a successfull > xml

[libvirt] [python PATCH] examples: Add example to make guest agent lifecycle event useful

2015-04-17 Thread Peter Krempa
This example allows to use the guest agent event and metadata to track vCPU count set via the guest agent (agent-based onlining/offlining) and keep it persistent accross domain restarts. The daemon listens for the agent lifecycle event, and if it's received it looks into doman's metadata to see wh

Re: [libvirt] [PATCH] domain: conf: Better errors on bad os values

2015-04-17 Thread Eric Blake
On 04/17/2015 07:06 AM, Cole Robinson wrote: > If no was specified: > before: unknown OS type no OS type > after : xml error: an os must be specified > > If an is specified that's not in our capabiliities data: s/capabiliities/capabilities/ > before: unknown OS type $type > after : un

[libvirt] [PATCH] domain: conf: Better errors on bad os values

2015-04-17 Thread Cole Robinson
If no was specified: before: unknown OS type no OS type after : xml error: an os must be specified If an is specified that's not in our capabiliities data: before: unknown OS type $type after : unsupported configuration: no support found for os '$type' VIR_ERR_OS_TYPE is now unused (a

Re: [libvirt] [PATCH v3] schema: Allow multiple machines for VMs and unite architectures

2015-04-17 Thread Ján Tomko
On Wed, Apr 15, 2015 at 02:25:48PM +0200, Martin Kletzander wrote: > Use the same pattern for all machine types on all archs and same archs > for hvm and exe types. > > Signed-off-by: Martin Kletzander > --- > docs/schemas/domaincommon.rng | 182 > ++ > 1

Re: [libvirt] [PATCH v3 3/4] scsi: Adjust return value for virStorageBackendSCSINewLun

2015-04-17 Thread Ján Tomko
On Thu, Apr 16, 2015 at 07:42:55PM -0400, John Ferlan wrote: > > > On 04/16/2015 09:14 AM, Ján Tomko wrote: > > On Tue, Apr 07, 2015 at 04:21:02PM -0400, John Ferlan wrote: > >> Use virStorageBackendPoolUseDevPath API to determine whether creation of > >> stable target path is possible for the vo

Re: [libvirt] [PATCH v3 4/4] scsi: Adjust return values from processLU

2015-04-17 Thread Ján Tomko
On Thu, Apr 16, 2015 at 09:24:41PM -0400, John Ferlan wrote: > > > On 04/16/2015 10:06 AM, Ján Tomko wrote: > > On Tue, Apr 07, 2015 at 04:21:03PM -0400, John Ferlan wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1171933 > >> > >> Adjust the processLU error returns to be a bit more logic

Re: [libvirt] [RFCv2 PoCv1 PATCH 00/15] Just Admin API

2015-04-17 Thread Martin Kletzander
On Fri, Apr 17, 2015 at 11:30:54AM +0100, Daniel P. Berrange wrote: On Thu, Apr 16, 2015 at 04:46:10PM +0200, Martin Kletzander wrote: *** BLURB *** ... Just kidding :) Sooo... After very very VERY long time, here's a draft of an admin interface that is supposed to open up new possibilities

Re: [libvirt] [PATCH 09/15] Add libvirt-admin library

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 02:25:48PM +0200, Martin Kletzander wrote: > On Fri, Apr 17, 2015 at 11:28:11AM +0100, Daniel P. Berrange wrote: > >On Thu, Apr 16, 2015 at 04:46:44PM +0200, Martin Kletzander wrote: > >>Initial scratch of the admin library. It has its own virAdmConnectPtr > >>that inherits

Re: [libvirt] [PATCH 02/15] util: Add virabstracts file for keeping abstract classes

2015-04-17 Thread Martin Kletzander
On Fri, Apr 17, 2015 at 11:16:49AM +0100, Daniel P. Berrange wrote: On Thu, Apr 16, 2015 at 04:46:37PM +0200, Martin Kletzander wrote: The first class in this file is going to be an abstract connection class that holds a per-connection error inside. virConnect will be the first child class inhe

Re: [libvirt] [PATCH 09/15] Add libvirt-admin library

2015-04-17 Thread Martin Kletzander
On Fri, Apr 17, 2015 at 11:28:11AM +0100, Daniel P. Berrange wrote: On Thu, Apr 16, 2015 at 04:46:44PM +0200, Martin Kletzander wrote: Initial scratch of the admin library. It has its own virAdmConnectPtr that inherits from virAbstractConnectPtr and thus trivially supports error reporting. Se

Re: [libvirt] [PATCH 04/15] Break virNetServer into virNetSubServers

2015-04-17 Thread Martin Kletzander
On Fri, Apr 17, 2015 at 11:22:32AM +0100, Daniel P. Berrange wrote: On Thu, Apr 16, 2015 at 04:46:39PM +0200, Martin Kletzander wrote: Each subserver has its own RPC programs, services, workers, keepalive, clients etc. Hence (possible) multiple subservers are properly separated. The part in re

[libvirt] [PATCH] rng: Forbid to validate mismatched 'device' and 'type' attributes

2015-04-17 Thread Erik Skultety
According to docs, using 'lun' as a value for device attribute is only valid with disk types 'block' and 'network'. However current RNG schema also allows a combination type='file' device='lun' which results in a successfull xml validation, but fails at qemuBuildCommandLine. Besides fixing the RNG

Re: [libvirt] [PATCH 04/15] Break virNetServer into virNetSubServers

2015-04-17 Thread Daniel P. Berrange
On Thu, Apr 16, 2015 at 04:46:39PM +0200, Martin Kletzander wrote: > Each subserver has its own RPC programs, services, workers, keepalive, > clients etc. Hence (possible) multiple subservers are properly > separated. > > The part in remote.c is just mechanical, the same applies to most of the >

Re: [libvirt] [RFCv2 PoCv1 PATCH 00/15] Just Admin API

2015-04-17 Thread Daniel P. Berrange
On Thu, Apr 16, 2015 at 04:46:10PM +0200, Martin Kletzander wrote: > *** BLURB *** > > ... > > Just kidding :) > > Sooo... After very very VERY long time, here's a draft of an admin > interface that is supposed to open up new possibilities to be done on > a live daemon. The aim here is to crea

Re: [libvirt] [PATCH 09/15] Add libvirt-admin library

2015-04-17 Thread Daniel P. Berrange
On Thu, Apr 16, 2015 at 04:46:44PM +0200, Martin Kletzander wrote: > Initial scratch of the admin library. It has its own virAdmConnectPtr > that inherits from virAbstractConnectPtr and thus trivially supports > error reporting. See my note earlier about error reporting on the connection being a

Re: [libvirt] [PATCH 02/15] util: Add virabstracts file for keeping abstract classes

2015-04-17 Thread Daniel P. Berrange
On Thu, Apr 16, 2015 at 04:46:37PM +0200, Martin Kletzander wrote: > The first class in this file is going to be an abstract connection class > that holds a per-connection error inside. virConnect will be the first > child class inheriting from this one. > > This is a separate file because virerr

Re: [libvirt] [PATCH 01/15] util: add virJSONValueCopy

2015-04-17 Thread Daniel P. Berrange
On Thu, Apr 16, 2015 at 04:46:36PM +0200, Martin Kletzander wrote: > Faster version of virJSONValueFromString(virJSONValueToString()). > > Signed-off-by: Martin Kletzander > --- > src/libvirt_private.syms | 1 + > src/util/virjson.c | 65 ++- > src/util/virjson.h

Re: [libvirt] [Xen-devel] [libvirt test] 50401: regressions - FAIL

2015-04-17 Thread Ian Campbell
On Wed, 2015-04-15 at 14:16 +0100, Daniel P. Berrange wrote: > Yeah, there is nothing Xen specific about the problem - it is entirely > down to the build toolchain & compiler options. FYI our bisector has now tripped over another related problem, http://lists.xen.org/archives/html/xen-devel/2015-

Re: [libvirt] [PATCH] qemu: lifecycle: guest get rebooted after reboot and shutdown

2015-04-17 Thread Michal Privoznik
On 17.04.2015 02:43, zhang bo wrote: > > Steps: > 1 virsh reboot guest1 --mode=acpi > 2 virsh shutdown guest1 --mode=agent > > Expected result: > As the SHUTDOWN job is after REBOOT, we expected the guest to be > *shutoff*. > > Exacted result: > After the 2 steps above, the gues

Re: [libvirt] [PATCH 0/2] Re: libvirtd live-locking on CTX_LOCK when doing 'virsh save /tmp/blah' with guest corrupting memory (on purpose).

2015-04-17 Thread Ian Campbell
On Thu, 2015-04-16 at 18:18 +0100, Ian Jackson wrote: > Jim Fehlig writes ("Re: [PATCH 0/2] Re: libvirtd live-locking on CTX_LOCK > when doing 'virsh save /tmp/blah' with guest corrupting memory (on > purpose)."): > > On 04/14/2015 11:31 AM, Ian Jackson wrote: > > > I have produced what I think

[libvirt] [RFC 4/7] qemu-agent: add qemuAgentCreateBond interface

2015-04-17 Thread Chen Fan
via initialize callback to create bond device. Signed-off-by: Chen Fan --- src/qemu/qemu_agent.c | 118 src/qemu/qemu_agent.h | 10 src/qemu/qemu_domain.c | 70 src/qemu/qemu_domain.h | 7 +++ src/qemu/q

[libvirt] [RFC 1/7] qemu-agent: add agent init callback when detecting guest setup

2015-04-17 Thread Chen Fan
sometimes, we want to do some initialize work in guest when guest startup, but currently, qemu-agent doesn't support that. so here we add an init callback, when guest startup, notify libvirt it has been up, then libvirt can do some work for guest. Signed-off-by: Chen Fan --- src/qemu/qemu_agent.

[libvirt] [RFC 0/3] add support migration with passthrough device

2015-04-17 Thread Chen Fan
the patches is for libvirt to support migration with passthrough device using existing feacture. Chen Fan (3): qemu-agent: add guest-network-set-interface command qemu-agent: add guest-network-delete-interface command qemu-agent: add notify for qemu-ga boot configure| 16 +++

[libvirt] [RFC 5/7] hostdev: add parse ip and route for bond configure

2015-04-17 Thread Chen Fan
bond device always need to configure the ip address and route way address. so here we add the interface. xml like: Signed-off-by: Chen Fan --- docs/schemas/domaincommon.rng | 21 +++ src/conf/domain_conf.c| 87 -

[libvirt] [RFC 2/3] qemu-agent: add guest-network-delete-interface command

2015-04-17 Thread Chen Fan
Add a corresponding command to guest-network-set-interface. Signed-off-by: Chen Fan --- qga/commands-posix.c | 51 +++ qga/commands-win32.c | 6 ++ qga/qapi-schema.json | 11 +++ 3 files changed, 68 insertions(+) diff --git a/qga/comm

[libvirt] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-17 Thread Chen Fan
backgrond: Live migration is one of the most important features of virtualization technology. With regard to recent virtualization techniques, performance of network I/O is critical. Current network I/O virtualization (e.g. Para-virtualized I/O, VMDq) has a significant performance gap with nativ

[libvirt] [RFC 1/3] qemu-agent: add guest-network-set-interface command

2015-04-17 Thread Chen Fan
Nowadays, qemu has supported physical NIC hotplug for high network throughput. but it's in conflict with live migration feature, to keep network connectivity, we could to create bond device interface which provides a mechanism for enslaving multiple network interfaces into a single "bond" interface

[libvirt] [RFC 6/7] migrate: hot remove hostdev at perform phase for bond device

2015-04-17 Thread Chen Fan
For bond device, we can support the migrate, we can simple to hot remove the device from source side, and after migration end, we hot add the new device at destination side. Signed-off-by: Chen Fan --- src/qemu/qemu_driver.c| 57 +++ src/qemu/qemu_

[libvirt] [RFC 3/3] qemu-agent: add notify for qemu-ga boot

2015-04-17 Thread Chen Fan
Signed-off-by: Chen Fan --- qga/main.c | 13 + 1 file changed, 13 insertions(+) diff --git a/qga/main.c b/qga/main.c index 9939a2b..f011ce0 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1170,6 +1170,19 @@ int main(int argc, char **argv) g_critical("failed to initialize guest

[libvirt] [RFC 2/7] qemu: add guest init event callback to do the initialize work for guest

2015-04-17 Thread Chen Fan
Signed-off-by: Chen Fan --- src/qemu/qemu_domain.h | 7 +++ src/qemu/qemu_driver.c | 32 src/qemu/qemu_process.c | 22 ++ 3 files changed, 61 insertions(+) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 3225abb..19f4

[libvirt] [RFC 7/7] migrate: add hostdev migrate status to support hostdev migration

2015-04-17 Thread Chen Fan
we add a migrate status for hostdev to specify the device don't need to initialze when VM startup, after migration end, we add the migrate status hostdev, so can support hostdev migration. Signed-off-by: Chen Fan --- src/conf/domain_conf.c| 3 ++ src/conf/domain_conf.h| 7 src/qem

[libvirt] [RFC 3/7] hostdev: add a 'bond' type element in element

2015-04-17 Thread Chen Fan
this 'bond' element is to create bond device when guest startup, the xml like: Signed-off-by: Chen Fan --- docs/schemas/basictypes.rng | 6 ++ docs/schemas/domaincommon.rng | 16 ++ src/conf/domain_conf.c| 131 ++

Re: [libvirt] [PATCH 5/7] virnetdevbandwidth.c: Separate tc filter creation to a function

2015-04-17 Thread Michal Privoznik
On 16.04.2015 19:25, Laine Stump wrote: > On 04/14/2015 12:59 PM, Michal Privoznik wrote: >> Not only this simplifies the code a bit, it prepares the >> environment for upcoming patches. The new >> virNetDevBandwidthManipulateFilter() function is capable of both >> removing a filter and adding a ne

Re: [libvirt] util: log: How about online change logLevel?

2015-04-17 Thread Jiri Denemark
On Fri, Apr 17, 2015 at 15:12:21 +0800, zhang bo wrote: > Sometimes, when we encounter with a problem, we need to set libvirtd log > level to DEBUG to dig detailed information. > > But changing log level requires us to *restart* libvirtd. > 1) #vim /etc/libvirt/libvirtd.conf > log_lev

[libvirt] util: log: How about online change logLevel?

2015-04-17 Thread zhang bo
Sometimes, when we encounter with a problem, we need to set libvirtd log level to DEBUG to dig detailed information. But changing log level requires us to *restart* libvirtd. 1) #vim /etc/libvirt/libvirtd.conf log_level = 1 2) *service libvirtd restart* We think that it makes sen