[libvirt] [PATCH] virsh: fix no error output when parse cpulist fail

2015-05-05 Thread Luyao Huang
When we pass a invalid cpulist or the lastcpu in the cpulist exceed the maxcpu, we cannot get any error. like this: # virsh vcpupin test3 1 aaa # virsh vcpupin test3 1 1000 Because virBitmapParse() use virReportError() to set the error message, virsh client use vshError to output error. If we

Re: [libvirt] [PATCH 1/2] Storage: Suppress metadata refresh for volumes being built.

2015-05-05 Thread Prerna Saxena
On Tuesday 05 May 2015 04:22 PM, Ján Tomko wrote: > On Tue, May 05, 2015 at 03:24:31PM +0530, Prerna Saxena wrote: >> On Tuesday 05 May 2015 03:20 PM, Prerna Saxena wrote: >>> On Tuesday 05 May 2015 01:52 PM, Ján Tomko wrote: On Tue, May 05, 2015 at 08:43:21AM +0530, Prerna Saxena wrote:

[libvirt] [PATCH 10/13] qemu: remove test for allowing ide controller in s390, rename usb tests

2015-05-05 Thread Laine Stump
Back in 2013, commit 877bc089 added in some tests that made sure no error was generated on a domain definition that had an automatically added usb controller if that domain didn't have a PCI bus to attach the usb controller to. This was done because, at that time, libvirt was automatically adding a

[libvirt] [PATCH 09/13] qemu: use controller object alias in commandline for virtio-serial device

2015-05-05 Thread Laine Stump
The commandline generator for a virtio-serial device had a hardcoded printf of "virtio-serial%d" as the id of the virtio-serial controller. This patch changes it to use the alias of the controller instead. Because the function that finds a controller alias requires a pointer to the domainDef in ord

[libvirt] [PATCH 04/13] qemu: restructure qemuAssignDeviceControllerAlias

2015-05-05 Thread Laine Stump
No functional change, just rearrange this function and pass in full domain definition to make it simpler to add exceptions. --- src/qemu/qemu_command.c | 32 ++-- src/qemu/qemu_command.h | 2 +- src/qemu/qemu_hotplug.c | 4 ++-- 3 files changed, 25 insertions(+), 13 d

[libvirt] [PATCH 11/13] qemu: log error when domain has an upsupported IDE controller

2015-05-05 Thread Laine Stump
We have previously effectively ignored all elements in a domain definition. On the i440fx-based machinetypes there is an IDE controller that is included in the chipset and can't be removed (which is the ide controller with index='0'>), so it makes sense to ignore that one controller. However, if

[libvirt] [PATCH 07/13] qemu: use controller alias when constructing disk/controller args

2015-05-05 Thread Laine Stump
This makes sure that that the commandlines generated for disk devices and disk controller devices are *all* using the alias that has been set in the controller's object as the id of the controller, rather than hardcoding a printf. Since this "fixes" the controller name used for the sata controller

[libvirt] [PATCH 06/13] qemu: add exceptions for alias names of primary sata/ide controllers

2015-05-05 Thread Laine Stump
If a machine is Q35, the primary sata controller is hardcoded in qemu to have the id "ide" (with no index in the name). Likewise on 440fx-based machinetypes, the primary ide controller is called "ide". All other SATA controllers will have the standard name "sata%d", where %d is the index of the con

[libvirt] [PATCH 12/13] qemu: only add channel arg to scsi-disk if qemu binary supports it

2015-05-05 Thread Laine Stump
libvirt enforces bus (channel to qemu) == 0 for those qemu binaries that don't support the channel argument to scsi disk devices, but still adds "channel=0" in those cases. Apparently nobody with a qemu old enough to not support channel ever uses these devices, because they otherwise should get an

[libvirt] [PATCH 08/13] qemu: use alias for all controller ids in qemuBuildControllerDevStr

2015-05-05 Thread Laine Stump
Some of the other controllers in this function still had their id's hardcoded with a printf rather than getting it from alias in the controller object. --- src/qemu/qemu_command.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qem

[libvirt] [PATCH 02/13] qemu: eliminate duplicated code in qemuBuildDriveDevStr()

2015-05-05 Thread Laine Stump
The code to add device type to the commandline was identical for lsi and other models of SCSI controllers, but was duplicated (with the exception of a minor ordering difference of the if-else clauses) for the two cases. This patch replaces those two with a single instance of the code just before th

[libvirt] [PATCH 13/13] qemu: allow bus != 0 for scsi-disk when -device is used

2015-05-05 Thread Laine Stump
All the way back at the end of 2009, commit d78554d8 added a check that prevented scsi disks from having a bus != 0 due to problems that caused (noted in the comments). At that time, -device wasn't supported by qemu, so the -drive parameter had to identify each disk by bus type (the "if" option), b

[libvirt] [PATCH 03/13] qemu: change if to switch in qemuBuildDeviceAddressStr

2015-05-05 Thread Laine Stump
--- src/qemu/qemu_command.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 620a2a0..b76bd98 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2585,11 +2585,11 @@ qemuBuildDeviceAdd

Re: [libvirt] [PATCH] test: remove s390 tests used only for testing usb and ide controllers

2015-05-05 Thread Laine Stump
On 05/05/2015 03:22 AM, Ján Tomko wrote: > On Mon, May 04, 2015 at 01:15:45PM -0400, Laine Stump wrote: >> On 05/04/2015 08:59 AM, Ján Tomko wrote: >> Perhaps a reasonable compromise would be this: >> >> 1) rename the s390-piix-controllers test to >> "s390-allow-bogus-usb-controller" (or something

[libvirt] [PATCH 05/13] conf: utility to return alias of a controller based on type/index

2015-05-05 Thread Laine Stump
Because there are multiple potential reasons for an error, this function logs any errors before returning NULL (since the caller won't have the information needed to determine which was the reason for failure). --- src/conf/domain_conf.c | 34 ++ src/conf/domain_c

[libvirt] [PATCH 00/13] qemu: fix device alias usage, ide controllers, scsi options

2015-05-05 Thread Laine Stump
These are intertwined a bit, hence they are all posted in the same series. This started out with the intent to generate an error/failure on request for an IDE controller on a machinetype that doesn't support IDE (currently anything except 440fx-based machinetypes), or a 2nd IDE controller on a mac

[libvirt] [PATCH 01/13] qemu: use qemuDomainMachineIsI440FX() in appropriate place

2015-05-05 Thread Laine Stump
This patch makes qemuValideDevicePCISlotsChipsets() more consistent in appearance by replacing several clauses of an if with the equivalent call to qemuDomainMachineIsI440FX. The if was checking exactly the same items, just in a slightly different order. --- src/qemu/qemu_command.c | 6 +- 1 f

[libvirt] [PATCH v2 2/5] storage: conf: Don't output owner/group -1

2015-05-05 Thread Cole Robinson
-1 is just an internal placeholder and is meaningless to output in the XML. --- docs/schemas/storagecommon.rng | 28 -- src/conf/storage_conf.c| 23 +++--- tests/storagepoolxml2xmlout/pool-dir-naming.xml| 2 -- te

[libvirt] [PATCH v2 5/5] storage: fs: Only force directory permissions if required

2015-05-05 Thread Cole Robinson
Only set directory permissions at pool build time, if: - User explicitly requested a mode via the XML - The directory needs to be created - We need to do the crazy NFS root-squash workaround This allows qemu:///session to call build on an existing directory like /tmp. --- v2: Fix style issue

[libvirt] [PATCH v2 4/5] virfile: virDirCreate: Drop redundand FORCE_PERMS flag

2015-05-05 Thread Cole Robinson
The only two virDirCreate callers already use it --- src/storage/storage_backend_fs.c | 2 -- src/util/virfile.c | 6 ++ src/util/virfile.h | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage

[libvirt] [PATCH v2 0/5] storage: fs: tweak dir perms handling on build

2015-05-05 Thread Cole Robinson
Consider the following issue - Using virt-manager with qemu:///session - User adds a storage pool pointing at /tmp. No explicit permissions are requested in the XML - virt-manager calls PoolDefine, then PoolBuild - libvirt tries to unconditionally chmod 755 /tmp. This fails because my user doe

[libvirt] [PATCH v2 1/5] virfile: virDirCreate: Fix ALLOW_EXIST conditional

2015-05-05 Thread Cole Robinson
I screwed this up in the previous (post 1.2.16) commits --- src/util/virfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 8a06813..6e9ecbe 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -2289,7 +2289,7 @@ virDirCre

[libvirt] [PATCH v2 3/5] storage: conf: Don't set any default in the XML

2015-05-05 Thread Cole Robinson
The XML parser sets a default if none is explicitly passed in. This is then used at pool/vol creation time, and unconditionally reported in the XML. The problem with this approach is that it's impossible for other code to determine if the user explicitly requested a storage mode. There are some c

Re: [libvirt] [PATCHv2] Ignore bridge template names with multiple printf conversions

2015-05-05 Thread Eric Blake
On 05/05/2015 10:26 AM, Ján Tomko wrote: > On Tue, May 05, 2015 at 10:14:18AM -0600, Eric Blake wrote: >> On 05/05/2015 10:05 AM, Ján Tomko wrote: >>> For some reason, we allow a bridge name with %d in it, which we replace >>> with an unsigned integer to form a bridge name that does not yet exist >

Re: [libvirt] [PATCHv2] Ignore bridge template names with multiple printf conversions

2015-05-05 Thread Ján Tomko
On Tue, May 05, 2015 at 10:14:18AM -0600, Eric Blake wrote: > On 05/05/2015 10:05 AM, Ján Tomko wrote: > > For some reason, we allow a bridge name with %d in it, which we replace > > with an unsigned integer to form a bridge name that does not yet exist > > on the host. > > > > Do not blindly pass

Re: [libvirt] [PATCHv2] Ignore bridge template names with multiple printf conversions

2015-05-05 Thread Eric Blake
On 05/05/2015 10:05 AM, Ján Tomko wrote: > For some reason, we allow a bridge name with %d in it, which we replace > with an unsigned integer to form a bridge name that does not yet exist > on the host. > > Do not blindly pass it to virAsprintf if it's not the only conversion, > to prevent crashin

[libvirt] [PATCHv2] Ignore bridge template names with multiple printf conversions

2015-05-05 Thread Ján Tomko
For some reason, we allow a bridge name with %d in it, which we replace with an unsigned integer to form a bridge name that does not yet exist on the host. Do not blindly pass it to virAsprintf if it's not the only conversion, to prevent crashing on input like: test Ignore any template

[libvirt] [PATCH] reject out of range memory in SetMemory APIs

2015-05-05 Thread Ján Tomko
The APIs take the memory value in KiB and we store it in KiB internally, but we cannot parse the whole ULONG_MAX range on 64-bit systems, because virDomainParseScaledValue needs to fit the value in bytes in an unsigned long long. https://bugzilla.redhat.com/show_bug.cgi?id=1176739 --- src/conf/do

Re: [libvirt] [PATCH] libxl: support soundhw for hvm domains

2015-05-05 Thread Jim Fehlig
Michal Privoznik wrote: > On 04.05.2015 22:35, Jim Fehlig wrote: > >> The xend driver and the parsing/formating code in src/xenconfig >> have long supported soundhw. Add support in the libxl driver too. >> >> Signed-off-by: Jim Fehlig >> --- >> >> This patch continues the tradition of silently

Re: [libvirt] [PATCH] libxl: add logrotate config file

2015-05-05 Thread Jim Fehlig
Michal Privoznik wrote: > On 30.04.2015 23:38, Jim Fehlig wrote: > >> Add logrotate config for log files in /var/log/libvirt/libxl. >> >> Signed-off-by: Jim Fehlig >> --- >> daemon/Makefile.am | 13 - >> daemon/libvirtd.libxl.logrotate.in | 9 + >> libvirt.

[libvirt] [PATCH] cpu_conf: properly escape characters for model and vendor

2015-05-05 Thread Pavel Hrdina
We should escape strings for those two elements to be consistent along the whole XML. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1197580 Signed-off-by: Pavel Hrdina --- src/conf/cpu_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/cpu_conf.c b/s

Re: [libvirt] [PATCH4/3] qemu: add cpu feature check for host-passthrough

2015-05-05 Thread Luyao Huang
On 05/05/2015 08:31 PM, John Ferlan wrote: On 03/30/2015 06:05 AM, Luyao Huang wrote: Signed-off-by: Luyao Huang --- I forgot this place. src/qemu/qemu_process.c | 5 - 1 file changed, 5 deletions(-) Just bumping with other part of series.. Yes, when i noticed this i had already s

Re: [libvirt] [PATCH 0/3] fix some issue around host-passthough cpu model

2015-05-05 Thread Luyao Huang
On 05/05/2015 08:30 PM, John Ferlan wrote: On 03/30/2015 04:49 AM, Luyao Huang wrote: We support add feature in host-passthough cpu model, but there are some place need fix. Luyao Huang (3): cpu:x86: fix cannot keep cpu feature after migrate/restore qemu: add a check for non-migratable

[libvirt] storage volume download/upload

2015-05-05 Thread Vasiliy Tolstov
As i see in some cases, for example in case of lvm storage pool libvirt spawns libvirt_iohelper to upload or download data to volume. But in case of big data contains zeroes this is wast bw of network. May be we can use gzip or lz4 for compression stream? How the best do this not breaking exiting s

Re: [libvirt] [PATCH] qemu: Log error if domain uses security driver which is not loaded

2015-05-05 Thread Martin Kletzander
On Tue, May 05, 2015 at 02:14:24PM +0200, Erik Skultety wrote: When starting a domain, if we find out domain requests security drivers we do not have loaded, we fail. However we don't check for this during reconnect, so any operation relying on security driver functionality would fail. If someone

Re: [libvirt] [PATCHv3] conf: Add the cpu duplicate use check for vm numa settings

2015-05-05 Thread Luyao Huang
On 05/05/2015 07:35 PM, Michal Privoznik wrote: On 05.05.2015 12:13, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1176020 We had a check for the vcpu count total number in before, however this check is not good enough. There are some examples: 1. one of cpu id is out of max

Re: [libvirt] [PATCH 0/8] Resolve new Coverity issues

2015-05-05 Thread Michal Privoznik
On 05.05.2015 13:34, John Ferlan wrote: > Installed a new Coverity checker (7.6.1) and naturally new issues > were found, plus a set of false positives which for now I'll just > have to ignore since it seems they may be a bug in Coverity, but > that's still to be determined > > John Ferlan (8): >

Re: [libvirt] [PATCH4/3] qemu: add cpu feature check for host-passthrough

2015-05-05 Thread John Ferlan
On 03/30/2015 06:05 AM, Luyao Huang wrote: > Signed-off-by: Luyao Huang > --- > I forgot this place. > > src/qemu/qemu_process.c | 5 - > 1 file changed, 5 deletions(-) > Just bumping with other part of series.. John > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c > ind

Re: [libvirt] [PATCH 0/3] fix some issue around host-passthough cpu model

2015-05-05 Thread John Ferlan
On 03/30/2015 04:49 AM, Luyao Huang wrote: > We support add feature in host-passthough cpu model, but there are > some place need fix. > > Luyao Huang (3): > cpu:x86: fix cannot keep cpu feature after migrate/restore > qemu: add a check for non-migratable cpu flags > docs: fix a small xml

Re: [libvirt] [PATCH 0/3] Few more memory hotplug related fixes

2015-05-05 Thread Michal Privoznik
On 30.04.2015 18:20, Peter Krempa wrote: > Peter Krempa (3): > conf: Always truncate balloon size to maximum memory size > conf: Fix up balloon size after removing a memory device from def > qemu: Fix balloon size handling with memory hot(un)plug > > src/conf/domain_conf.c | 27 +++

[libvirt] [PATCH] qemu: Log error if domain uses security driver which is not loaded

2015-05-05 Thread Erik Skultety
When starting a domain, if we find out domain requests security drivers we do not have loaded, we fail. However we don't check for this during reconnect, so any operation relying on security driver functionality would fail. If someone e.g. starts a domain with selinux driver loaded, then they turn

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

2015-05-05 Thread Ian Campbell
On Fri, 2015-05-01 at 09:10 -0600, Jim Fehlig wrote: > Ian Campbell wrote: > > On Fri, 2015-04-17 at 13:57 -0600, 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

Re: [libvirt] [PATCH v5 4/9] virstoragefile: Always use virStorageSourceSetBackingStore to set backing store

2015-05-05 Thread Matthias Gatto
On Mon, May 4, 2015 at 7:21 PM, John Ferlan wrote: > > > On 04/23/2015 08:41 AM, Matthias Gatto wrote: >> Replace the parts of the code where a backing store is set manually >> with virStorageSourceSetBackingStore >> >> Signed-off-by: Matthias Gatto >> Signed-off-by: John Ferlan >> --- >> src/c

Re: [libvirt] [PATCH] libxl: support soundhw for hvm domains

2015-05-05 Thread Michal Privoznik
On 04.05.2015 22:35, Jim Fehlig wrote: > The xend driver and the parsing/formating code in src/xenconfig > have long supported soundhw. Add support in the libxl driver too. > > Signed-off-by: Jim Fehlig > --- > > This patch continues the tradition of silently ignoring unsupported > config in th

Re: [libvirt] [PATCH] libxl: add logrotate config file

2015-05-05 Thread Michal Privoznik
On 30.04.2015 23:38, Jim Fehlig wrote: > Add logrotate config for log files in /var/log/libvirt/libxl. > > Signed-off-by: Jim Fehlig > --- > daemon/Makefile.am | 13 - > daemon/libvirtd.libxl.logrotate.in | 9 + > libvirt.spec.in| 3 +++ >

[libvirt] [PATCH 0/8] Resolve new Coverity issues

2015-05-05 Thread John Ferlan
Installed a new Coverity checker (7.6.1) and naturally new issues were found, plus a set of false positives which for now I'll just have to ignore since it seems they may be a bug in Coverity, but that's still to be determined John Ferlan (8): libxl: Resolve Coverity RESOURCE_LEAK vbox: Resolv

[libvirt] [PATCH 8/8] qemu: Resolve Coverity FORWARD_NULL

2015-05-05 Thread John Ferlan
Coverity points out that qemuMonitorGetAllBlockStatsInfo could return a -1 and thus not fill in 'stats' (leaving it NULL). Then the call to qemuMonitorBlockStatsUpdateCapacity will dereference it. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[libvirt] [PATCH 6/8] qemu: Resolve Coverity FORWARD_NULL

2015-05-05 Thread John Ferlan
Coverity points out it was possible to have a zero return from qemuBuildRNGBackendProps thus not filling in 'props' and then causing a NULL dereference on the next call. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/

[libvirt] [PATCH 3/8] qemu: Resolve Coverity IDENTICAL_BRANCHES

2015-05-05 Thread John Ferlan
Coverity complains that in the error paths both the < 0 condition and the success path after the qemuDomainObjExitMonitor failure will end up going to cleanup. So just use ignore_value in this error path to resolve the complaint. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 9 +++---

[libvirt] [PATCH 4/8] qemu: Resolve Coverity FORWARD_NULL

2015-05-05 Thread John Ferlan
Coverity notes that ->ifname is used after the VIR_FREE done in the code path after the call to virNetDevMacVLanDeleteWithVPortProfile by a call to virNetDevOpenvswitchRemovePort. Since the ->ifname will be VIR_FREE()'d eventually in virDomainNetDefFree just remove the extraneous VIR_FREE here. W

[libvirt] [PATCH 7/8] qemu: Resolve Coverity FORWARD_NULL

2015-05-05 Thread John Ferlan
Coverity complains over the [n]values pairing in virQEMUCapsFreeStringList and rather than make a bunch if "if values" checks prior to calling, by just adding the values check inside the free function we avoid the chance that somehow nvalues is > 0, while values == NULL Signed-off-by: John Ferlan

[libvirt] [PATCH 1/8] libxl: Resolve Coverity RESOURCE_LEAK

2015-05-05 Thread John Ferlan
The returned socks from virNetSocketNewListenTCP needs to be VIR_FREE'd as well as seach of the Close/Unref on all the socks[i] that is already done Signed-off-by: John Ferlan --- src/libxl/libxl_migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libxl/libxl_migration.c b/src/li

[libvirt] [PATCH 5/8] xen: Resolve Coverity FORWARD_NULL

2015-05-05 Thread John Ferlan
Coverity found that xenXMConfigCacheAddFile has an error path in which no error message and a -1 was not returned which could have resulted in a NULL dereference in a VIR_DEBUG statement and of course an erroneous 0 value returned! Signed-off-by: John Ferlan --- src/xen/xm_internal.c | 3 +++ 1

[libvirt] [PATCH] Ignore Vim swap files.

2015-05-05 Thread Andrea Bolognani
This removes some noise when you're working on the repository and also have a bunch of source files open in Vim in another terminal. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7bcf359..1a5cf8e 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +

[libvirt] [PATCH 2/8] vbox: Resolve Coverity RESOURCE_LEAK

2015-05-05 Thread John Ferlan
If the virStringSearch() returns a 0 (zero), then each of the uses of the call will just jump to cleanup forgetting to free the returned empty list. Expand the scope a bit of each use and free at cleanup. Signed-off-by: John Ferlan --- src/vbox/vbox_common.c | 21 +++-- 1 file ch

Re: [libvirt] [PATCHv3] conf: Add the cpu duplicate use check for vm numa settings

2015-05-05 Thread Michal Privoznik
On 05.05.2015 12:13, Luyao Huang wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1176020 > > We had a check for the vcpu count total number in > before, however this check is not good enough. There are > some examples: > > 1. one of cpu id is out of maxvcpus, can set success(cpu count = 5 <

Re: [libvirt] [PATCH 1/2] Storage: Suppress metadata refresh for volumes being built.

2015-05-05 Thread Ján Tomko
On Tue, May 05, 2015 at 03:24:31PM +0530, Prerna Saxena wrote: > > On Tuesday 05 May 2015 03:20 PM, Prerna Saxena wrote: > > On Tuesday 05 May 2015 01:52 PM, Ján Tomko wrote: > >> On Tue, May 05, 2015 at 08:43:21AM +0530, Prerna Saxena wrote: > >>> Libvirt periodically calls 'stat' on all volumes

Re: [libvirt] [PATCH 2/2] Storage : Fix cloning of raw, sparse volumes.

2015-05-05 Thread Ján Tomko
On Tue, May 05, 2015 at 08:47:56AM +0530, Prerna Saxena wrote: > When virsh vol-clone is attempted on a raw file where capacity > allocation, > the resulting cloned volume has a size that matches the virtual-size of > the parent; in place of matching its actual, disk size. > This patch fixes the cl

[libvirt] [PATCHv3] conf: Add the cpu duplicate use check for vm numa settings

2015-05-05 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1176020 We had a check for the vcpu count total number in before, however this check is not good enough. There are some examples: 1. one of cpu id is out of maxvcpus, can set success(cpu count = 5 < 10): 10 2. use the same cpu in 2 cell, can set suc

[libvirt] [libvirt-php][PATCH 10/10] Install libvirt-php.ini more wisely

2015-05-05 Thread Michal Privoznik
Instead of creating the file directly under the installation directory, lets just create it locally and copy afterwards. Signed-off-by: Michal Privoznik --- configure.ac| 2 +- src/Makefile.am | 33 ++--- 2 files changed, 19 insertions(+), 16 deletions(-) diff -

[libvirt] [libvirt-php][PATCH 00/10] Couple of PHP fixes

2015-05-05 Thread Michal Privoznik
Even though this project is not actively developed, it does not mean we can't make some things better in it. After this patchset, distcheck works, targets are not built everytime, only when necessary, and so on. Michal Privoznik (10): Update .gitignore Update autotools generated files get_ne

[libvirt] [libvirt-php][PATCH 09/10] tests: run under distcheck

2015-05-05 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/Makefile.am | 4 +++- tests/Makefile.am| 14 ++ tests/{functions.phpt => functions.phpt.in} | 4 +++- tests/runtests.sh| 4 +++- tests/test-domain-create-an

[libvirt] [libvirt-php][PATCH 02/10] Update autotools generated files

2015-05-05 Thread Michal Privoznik
Some files, that we track in git, are unfortunately generated by autotools. Running autogen.sh with recent tools regenerated those files, so let's push the change into the repo too. Signed-off-by: Michal Privoznik --- INSTALL| 8 +- install-sh | 14 +-- missing| 412 ++

[libvirt] [libvirt-php][PATCH 08/10] tests: Update qemu path

2015-05-05 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/data/example-qcow2-disk.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data/example-qcow2-disk.xml b/tests/data/example-qcow2-disk.xml index f015965..1e46566 100644 --- a/tests/data/example-qcow2-disk.xml +++ b/tests/data/e

[libvirt] [libvirt-php][PATCH 04/10] tools: Cleanup Makefile

2015-05-05 Thread Michal Privoznik
Lets use more of libtoolisms to make sure we don't build files everytime, only when needed. Signed-off-by: Michal Privoznik --- .gitignore| 1 + tools/Makefile.am | 29 - 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore

[libvirt] [libvirt-php][PATCH 07/10] tests: Clean up Makefile.am

2015-05-05 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- .gitignore| 4 tests/Makefile.am | 23 +-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 121adbd..1066cf5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,10 @@ /libvirt-php

Re: [libvirt] [PATCH v1] [libvirt-php] add stream support and upload/resize/download for volume

2015-05-05 Thread Vasiliy Tolstov
Thanks! 05 мая 2015 г. 12:55 пользователь "Michal Privoznik" написал: > On 28.04.2015 18:26, Vasiliy Tolstov wrote: > > This patch add to libvirt php binding libvirt stream support > > Also provide resize/upload/download for libvirt volume > > > > Signed-off-by: Vasiliy Tolstov > > --- > > conf

[libvirt] [libvirt-php][PATCH 01/10] Update .gitignore

2015-05-05 Thread Michal Privoznik
There are plenty of built files that we don't want git to track. Signed-off-by: Michal Privoznik --- .gitignore | 19 +++ 1 file changed, 19 insertions(+) diff --git a/.gitignore b/.gitignore index 691b998..2a6915a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,28 @@ +*.o +

[libvirt] [libvirt-php][PATCH 06/10] src: Clean up Makefile

2015-05-05 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- .gitignore | 3 +++ Makefile.am | 2 +- src/Makefile.am | 33 +++-- tests/php.ini | 2 +- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 698e97d..121adbd 100644 --- a/.git

[libvirt] [libvirt-php][PATCH 03/10] get_next_free_numeric_value: Use correct format for sscanf()

2015-05-05 Thread Michal Privoznik
To parse a string, sscanf() is used. However, with wrong format: libvirt-php.c: In function ‘get_next_free_numeric_value’: libvirt-php.c:2719:6: warning: format ‘%x’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘long int *’ [-Wformat=] sscanf(Z_STRVAL_PP(data), "%x", &

[libvirt] [libvirt-php][PATCH 05/10] configure.ac: Check for libtool

2015-05-05 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- .gitignore | 1 + Makefile.am | 2 ++ configure.ac | 6 ++ 3 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index 95c45bb..698e97d 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ depcomp docs/*.html docs/*.html.in auto

Re: [libvirt] [PATCH v1] [libvirt-php] add stream support and upload/resize/download for volume

2015-05-05 Thread Michal Privoznik
On 28.04.2015 18:26, Vasiliy Tolstov wrote: > This patch add to libvirt php binding libvirt stream support > Also provide resize/upload/download for libvirt volume > > Signed-off-by: Vasiliy Tolstov > --- > configure.ac | 3 +- > src/libvirt-php.c | 382 >

Re: [libvirt] [PATCH 1/2] Storage: Suppress metadata refresh for volumes being built.

2015-05-05 Thread Prerna Saxena
On Tuesday 05 May 2015 03:20 PM, Prerna Saxena wrote: > On Tuesday 05 May 2015 01:52 PM, Ján Tomko wrote: >> On Tue, May 05, 2015 at 08:43:21AM +0530, Prerna Saxena wrote: >>> Libvirt periodically calls 'stat' on all volumes in a storage pool, >>> to update fields such as 'target.allocation'. >>>

Re: [libvirt] [PATCH 1/2] Storage: Suppress metadata refresh for volumes being built.

2015-05-05 Thread Prerna Saxena
On Tuesday 05 May 2015 01:52 PM, Ján Tomko wrote: > On Tue, May 05, 2015 at 08:43:21AM +0530, Prerna Saxena wrote: >> Libvirt periodically calls 'stat' on all volumes in a storage pool, >> to update fields such as 'target.allocation'. >> >> The operation doesnt make sense for a volume which is cur

Re: [libvirt] [Xen-devel] [PATCH] libxl: Disallow save or migrate when host devices are assigned to a guest.

2015-05-05 Thread Dario Faggioli
On Fri, 2015-05-01 at 15:32 -0600, Jim Fehlig wrote: > Dario Faggioli wrote: > > I mean what NUMA configuration are we talking about, and when and under > > what circumstances would you consider it "migratable"? > > > > E.g. if a domain is configured to use memory allocated from certain numa >

Re: [libvirt] add a rbd disk by virsh attach-device , the operation fails

2015-05-05 Thread 饶俊明
The problem has been resolved,. qemu-kvm is required to support the Ceph RBD versions, and restart the virtual machine; --- -邮件原件- 发件人: Martin Kletzander [mailto:mklet...@redhat.com] 发送时间: 2015年5月5日 14:15 收件人

Re: [libvirt] [PATCH 1/2] Storage: Suppress metadata refresh for volumes being built.

2015-05-05 Thread Ján Tomko
On Tue, May 05, 2015 at 08:43:21AM +0530, Prerna Saxena wrote: > Libvirt periodically calls 'stat' on all volumes in a storage pool, > to update fields such as 'target.allocation'. > > The operation doesnt make sense for a volume which is curently being > allocated. From the comments in the stor

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

2015-05-05 Thread Wei Liu
On Tue, Apr 28, 2015 at 06:40:05AM +, 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. > Do you not need to call xlu_cfg_destro

Re: [libvirt] [PATCH] Ignore bridge template names with multiple printf conversions

2015-05-05 Thread Ján Tomko
On Thu, Apr 30, 2015 at 08:21:34AM -0600, Eric Blake wrote: > On 04/30/2015 06:28 AM, Ján Tomko wrote: > > For some reason, we allow a bridge name with %d in it, which we replace > > with an unsigned integer to form a bridge name that does not yet exist > > on the host. > > > > Do not blindly pass

Re: [libvirt] [PATCH] qemu: Properly rename persistent def after migration

2015-05-05 Thread Jiri Denemark
On Tue, May 05, 2015 at 09:14:39 +0200, Martin Kletzander wrote: > On Tue, May 05, 2015 at 09:10:30AM +0200, Jiri Denemark wrote: > >On Tue, May 05, 2015 at 08:50:10 +0200, Jiri Denemark wrote: > >> On Tue, May 05, 2015 at 08:30:30 +0200, Martin Kletzander wrote: > >> > On Mon, May 04, 2015 at 11:0

Re: [libvirt] [PATCH] test: remove s390 tests used only for testing usb and ide controllers

2015-05-05 Thread Ján Tomko
On Mon, May 04, 2015 at 01:15:45PM -0400, Laine Stump wrote: > On 05/04/2015 08:59 AM, Ján Tomko wrote: > Perhaps a reasonable compromise would be this: > > 1) rename the s390-piix-controllers test to > "s390-allow-bogus-usb-controller" (or something like that) and remove > the ide controller from

Re: [libvirt] [PATCH] qemu: Properly rename persistent def after migration

2015-05-05 Thread Martin Kletzander
On Tue, May 05, 2015 at 09:10:30AM +0200, Jiri Denemark wrote: On Tue, May 05, 2015 at 08:50:10 +0200, Jiri Denemark wrote: On Tue, May 05, 2015 at 08:30:30 +0200, Martin Kletzander wrote: > On Mon, May 04, 2015 at 11:02:18PM +0200, Jiri Denemark wrote: > >When migrating a domain while changing

Re: [libvirt] [PATCH] qemu: Properly rename persistent def after migration

2015-05-05 Thread Jiri Denemark
On Tue, May 05, 2015 at 08:50:10 +0200, Jiri Denemark wrote: > On Tue, May 05, 2015 at 08:30:30 +0200, Martin Kletzander wrote: > > On Mon, May 04, 2015 at 11:02:18PM +0200, Jiri Denemark wrote: > > >When migrating a domain while changing its name and using > > >VIR_MIGRATE_PERSIST_DEST flag, libvi