Re: [libvirt] [PATCHv3 11/12] qemu: Implement memory device hotplug

2015-03-23 Thread Peter Krempa
On Thu, Mar 19, 2015 at 18:40:36 -0400, John Ferlan wrote: On 03/17/2015 10:20 AM, Peter Krempa wrote: Add code to hot-add memory devices to running qemu instances. --- Notes: Version 3: - added comment to clarify that @mem is always consumed by qemuDomainAttachMemory

Re: [libvirt] [PATCH] qemu: Don't return memory device config on error in qemuBuildMemoryBackendStr

2015-03-23 Thread John Ferlan
On 03/23/2015 09:23 AM, Peter Krempa wrote: In the last section if the function determines that the config is invalid when QEMU doesn't support the memory device the JSON config object would be returned even if it doesn't make sense. Assign the object to be returned only on success. ---

[libvirt] [PATCH 3/8] Force usage of virThreadCreate

2015-03-23 Thread Jiri Denemark
We want all threads to be set as workers or to have a job assigned to them, which can easily be achieved in virThreadCreate wrapper to pthread_create. Let's make sure we always use the wrapper. Signed-off-by: Jiri Denemark jdene...@redhat.com --- cfg.mk | 9

[libvirt] [PATCH 4/8] virThread: Set thread job

2015-03-23 Thread Jiri Denemark
Automatically assign a job to every thread created by virThreadCreate. The name of the virThreadFunc function passed to virThreadCreate is used as the job or worker name in case no name is explicitly passed. Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/libvirt_private.syms | 2 +-

[libvirt] [PATCH 8/8] qemu: Add timing to domain jobs

2015-03-23 Thread Jiri Denemark
Whenever we fail to acquire a job, we can report how long ago it was locked by another API. https://bugzilla.redhat.com/show_bug.cgi?id=853839 Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/qemu/qemu_domain.c | 20 ++-- src/qemu/qemu_domain.h | 2 ++ 2 files changed,

[libvirt] [PATCH 1/8] POTFILES.in: Sort

2015-03-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark jdene...@redhat.com --- po/POTFILES.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index fd8bf33..ab6ae3b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -178,6 +178,8 @@ src/util/virconf.c

[libvirt] [PATCH 7/8] qemu: Track the API which started the current job

2015-03-23 Thread Jiri Denemark
This is very helpful when we want to log and report why we could not acquire a state change lock. Reporting what job keeps it locked helps with understanding the issue. Moreover, after calling virDomainGetControlInfo, it's possible to tell whether libvirt is just stuck somewhere within the API (or

[libvirt] [PATCH 2/8] Add support for tracking thread jobs

2015-03-23 Thread Jiri Denemark
Each thread can use a thread local variable to keep the name of a job which is currently running in the job. The virThreadJobSetWorker API is supposed to be called once by any thread which is used as a worker, i.e., it is waiting in a pool, woken up to do a job, and returned back to the pool.

[libvirt] [PATCH 6/8] Set thread job for every RPC call

2015-03-23 Thread Jiri Denemark
Since all APIs are also RPC calls, we automatically get all APIs covered with thread jobs. Signed-off-by: Jiri Denemark jdene...@redhat.com --- daemon/remote.c| 1 + src/locking/lock_daemon_dispatch.c | 1 + src/qemu/qemu_domain.c | 1 + src/rpc/gendispatch.pl

Re: [libvirt] [PATCH] Fix typo in error message

2015-03-23 Thread Eric Blake
On 03/23/2015 06:12 AM, Pavel Hrdina wrote: On Mon, Mar 23, 2015 at 12:29:42PM +0100, Ján Tomko wrote: Just a question: where is the typo mentioned in $subject? by rewriting it completely from: error: unsupported configuration: virtio only support device address type 'PCI' 'support'

[libvirt] [PATCH] qemu: Don't return memory device config on error in qemuBuildMemoryBackendStr

2015-03-23 Thread Peter Krempa
In the last section if the function determines that the config is invalid when QEMU doesn't support the memory device the JSON config object would be returned even if it doesn't make sense. Assign the object to be returned only on success. --- src/qemu/qemu_command.c | 7 --- 1 file changed,

Re: [libvirt] lifecycle: shutdown: should it have timeout when using qemu-agent?

2015-03-23 Thread Michal Privoznik
On 23.03.2015 10:31, zhang bo wrote: The problem we encountered is: 1) use qemu-agent to shutdown a domain. 2) libvirt will block in qemuAgentShutdown(), if the domain itself got stucked when it powers-off. It's the *guest domain*'s fault that it stucks when shutdown. However, we could

Re: [libvirt] [PATCH] qemu: Set default SCSI controller model for S390 arch

2015-03-23 Thread Michal Privoznik
On 20.03.2015 16:01, Boris Fiuczynski wrote: When no model is specified in the domain definition for a scsi controller and the architectur is s390 than virtio-scsi is set as default model. Signed-off-by: Boris Fiuczynski fiu...@linux.vnet.ibm.com Reviewed-by: Daniel Hansel

[libvirt] [PATCH] Fix typo in error message

2015-03-23 Thread Ján Tomko
by rewriting it completely from: error: unsupported configuration: virtio only support device address type 'PCI' to: error: unsupported configuration: virtio disk cannot have an address of type drive Since we now support CCW addresses as well. --- src/qemu/qemu_command.c | 5 +++-- 1 file

Re: [libvirt] [PATCH] conf: fix running vm numa settings disappear after restart libvirtd

2015-03-23 Thread Luyao Huang
On 03/23/2015 06:10 PM, Peter Krempa wrote: On Thu, Mar 19, 2015 at 18:13:04 +0800, Luyao Huang wrote: 5bba61f introduce a issue : when start a vm with numa settings and restart libvirtd, numa settings will disappear. Because when parse the vm states file, there is no node in /domain/cpu/numa

Re: [libvirt] [PATCH 8/9] libxl: pass cmdline to HVM guests

2015-03-23 Thread Ian Campbell
On Fri, 2015-03-20 at 22:13 +0100, Marek Marczykowski-Górecki wrote: I'll definitely do. But above raises a question - how can I set extra arguments for qemu? In case of qemu in dom0, it's not a problem because I can create some wrapper script. But in case of qemu in stubdom, the only way is

Re: [libvirt] [PATCH] Fix typo in error message

2015-03-23 Thread Pavel Hrdina
On Mon, Mar 23, 2015 at 12:29:42PM +0100, Ján Tomko wrote: Just a question: where is the typo mentioned in $subject? by rewriting it completely from: error: unsupported configuration: virtio only support device address type 'PCI' to: error: unsupported configuration: virtio disk cannot

[libvirt] lifecycle: shutdown: should it have timeout when using qemu-agent?

2015-03-23 Thread zhang bo
The problem we encountered is: 1) use qemu-agent to shutdown a domain. 2) libvirt will block in qemuAgentShutdown(), if the domain itself got stucked when it powers-off. It's the *guest domain*'s fault that it stucks when shutdown. However, we could not handle the domain in libvirt anymore,

Re: [libvirt] [PATCH] qemu: skip precreation of network disks

2015-03-23 Thread Michal Privoznik
On 13.03.2015 01:34, Michael Chapman wrote: Commit cf54c60699833b3791a5d0eb3eb5a1948c267f6b introduced the ability to create missing storage volumes during migration. For network disks, however, we may not necessarily be able to detect whether they already exist -- there is no straight-forward

[libvirt] [PATCH] hostdev: fix two bugs in virHostdevReAttachPCIDevices

2015-03-23 Thread Huanle Han
Bug 1: The the next element in the pcidevs is skipped after we virPCIDeviceListDel the previous element. Bug 2: virHostdevNetConfigRestore is called for store the hostdevs which may be used by other domain. Signed-off-by: Huanle Han hanxue...@gmail.com --- src/util/virhostdev.c | 25

Re: [libvirt] [PATCH] qemu: Don't return memory device config on error in qemuBuildMemoryBackendStr

2015-03-23 Thread Peter Krempa
On Mon, Mar 23, 2015 at 09:41:23 -0400, John Ferlan wrote: On 03/23/2015 09:23 AM, Peter Krempa wrote: In the last section if the function determines that the config is invalid when QEMU doesn't support the memory device the JSON config object would be returned even if it doesn't make

Re: [libvirt] [PATCHv3 10/12] qemu: conf: Add support for memory device cold(un)plug

2015-03-23 Thread Peter Krempa
On Fri, Mar 20, 2015 at 07:40:21 -0400, John Ferlan wrote: I have tested your series with our qemu memory hot remove patch series, here would be a possible error. When hotplug a memory device, its size has been aligned. So the compare for size here would fail possiblely. hmm..

Re: [libvirt] [PATCHv3 00/12] Add support for memory hotplug

2015-03-23 Thread Peter Krempa
On Thu, Mar 19, 2015 at 18:41:31 -0400, John Ferlan wrote: On 03/17/2015 10:19 AM, Peter Krempa wrote: This version includes review feedback changes from John and also fixes the memory element documentation and code that calculates it to support possible non-NUMA configs with memory

Re: [libvirt] [Xen-devel] [PATCH] libxl: fix dom0 balloon logic

2015-03-23 Thread Ian Campbell
(just ccing the other tools maintainers, in particular Stefano who knows what this stuff is supposed to do...) On Fri, 2015-03-20 at 17:10 -0600, Jim Fehlig wrote: Recent testing on large memory systems revealed a bug in the Xen xl tool's freemem() function. When autoballooning is enabled,

Re: [libvirt] [PATCHv2 3/5] Allocate virtio-serial addresses when starting a domain

2015-03-23 Thread John Ferlan
On 03/17/2015 07:41 AM, Ján Tomko wrote: Instead of always using controller 0 and incrementing port number, respect the maximum port numbers of controllers and use all of them. Ports for virtio consoles are quietly reserved, but not formatted (neither in XML nor on QEMU command line).

[libvirt] [PATCH 0/4] util: use netlink to create bridge devices

2015-03-23 Thread Laine Stump
This patch series comes out of a comment in: https://bugzilla.redhat.com/show_bug.cgi?id=1125755 that pointed out that sioctl(SIOCBRDELBR) won't delete a bridge interface if it is IFF_UP, but the netlink RTM_DELLINK message doesn't care - it will delete it anyway. In these patches we switch to

[libvirt] [PATCH 1/4] util: netlink function to delete any network device

2015-03-23 Thread Laine Stump
libvirt has always used the netlink RTM_DELLINK message to delete macvtap/macvlan devices, but it can actually be used to delete other types of network devices, such as bonds and bridges. This patch makes virNetDevMacVLanDelete() available as a generic function so it can intelligibly be called to

[libvirt] [PATCH 4/4] util: use netlink to create bridge devices

2015-03-23 Thread Laine Stump
Just as it is possible to delete a bridge device with the netlink RTM_DELLINK message, one can be created with the RTM_NEWLINK message. Because of differences in the format of the message, it's not as straightforward as with virNetlinkDelLink() to create a single utility function that can be used

[libvirt] [PATCH 3/4] util: use netlink to delete bridge devices

2015-03-23 Thread Laine Stump
https://bugzilla.redhat.com/show_bug.cgi?id=1125755 reported that a stray bridge device was left on the system when a libvirt network failed to start due to an illegal iptables rule caused by bad config. Apparently the reason this was happening was that NetworkManager was noticing immediately

[libvirt] [PATCH 2/4] util: replace body of virNetDevMacVLanDelete() with virNetlinkDelLink()

2015-03-23 Thread Laine Stump
These two functions are identical, so no sense in having the duplication. I resisted the temptation to replace calls to virNetDevMacVLanDelete() with calls to virNetlinkDelLink() just in case some mythical future platform has macvtap devices that aren't managed with netlink (or in case we some day

Re: [libvirt] [PATCH] Fix common misspellings

2015-03-23 Thread Martin Kletzander
On Fri, Mar 20, 2015 at 09:51:23AM -0600, Eric Blake wrote: On 03/20/2015 06:21 AM, Martin Kletzander wrote: Wikipedia's list of common misspellings [1] has a machine-readable version. This patch fixes those misspellings mentioned in the list which don't have multiple right variants (as e.g.

Re: [libvirt] [PATCH] Fix common misspellings

2015-03-23 Thread Martin Kletzander
On Mon, Mar 23, 2015 at 09:58:40AM +0100, Ján Tomko wrote: On Fri, Mar 20, 2015 at 02:40:05PM +0100, Martin Kletzander wrote: I've left out ok (which should be OK, but it looks like nobody cares and there were *so many* false positives in the code), and there's (in)dependant where it suggests

[libvirt] [PATCH] Fix underlinking of libvirt_driver_interface.so

2015-03-23 Thread Natanael Copa
Always add udev linker flags when WITH_UDEV is enabled to avoid underlinking. See commit 43dbcb15 (interface: always build all available backends) Signed-off-by: Natanael Copa nc...@alpinelinux.org --- src/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [libvirt] Windows 7 guest installer does not detect drive if physical partition used instead of disk file.

2015-03-23 Thread Stefan Hajnoczi
On Sat, Mar 21, 2015 at 01:50:46AM +0800, Emmanuel Noobadmin wrote: Running 3.18.9-200.fc21.x86_64 qemu 2:2.1.3-3.fc21 libvirt 1.2.9.2-1.fc21 System is a Thinkpad X250 with Intel i7-5600u Broadwell GT2 I'm trying to replace the Win7 installation on my laptop with Fedora 21 and

Re: [libvirt] [PATCH 5/6] tools: fix the wrong check when use virsh setvcpus --maximum

2015-03-23 Thread Pavel Hrdina
On Mon, Mar 23, 2015 at 11:33:50AM +0800, Yanbing Du wrote: On 03/20/2015 10:39 PM, Pavel Hrdina wrote: From: Luyao Huang lhu...@redhat.com We will ignore --maximum option when only use setvcpus with this option, like this (this error is another issue): # virsh setvcpus test3

Re: [libvirt] [libvirt-designer][PATCH] Changes for code consistency

2015-03-23 Thread Michal Privoznik
On 21.03.2015 01:06, Jayashree Deshpande wrote: --- libvirt-designer/libvirt-designer-domain.c | 194 --- libvirt-designer/libvirt-designer-domain.h | 41 -- libvirt-designer/libvirt-designer-internal.c | 3 +- libvirt-designer/libvirt-designer-internal.h

Re: [libvirt] [PATCH] conf: fix running vm numa settings disappear after restart libvirtd

2015-03-23 Thread Peter Krempa
On Thu, Mar 19, 2015 at 18:13:04 +0800, Luyao Huang wrote: 5bba61f introduce a issue : when start a vm with numa settings and restart libvirtd, numa settings will disappear. Because when parse the vm states file, there is no node in /domain/cpu/numa this place. Change to use ./cpu/numa

Re: [libvirt] qemu_migration: Precreate missing storage breaks with network drives

2015-03-23 Thread Michal Privoznik
On 20.03.2015 20:23, Noel Burton-Krahn wrote: Hi Michal, I think issuing a libvirt migrate to a host where the network disks don't already exist would be a prequisite failure. Libvirt can never copy a network disk, but it shouldn't fail trying to migrate an existing domain that contains a

Re: [libvirt] [PATCH] Fix common misspellings

2015-03-23 Thread Ján Tomko
On Fri, Mar 20, 2015 at 02:40:05PM +0100, Martin Kletzander wrote: I've left out ok (which should be OK, but it looks like nobody cares and there were *so many* false positives in the code), and there's (in)dependant where it suggests s/dant/dent/ and I couldn't find anywhere that the

Re: [libvirt] [PATCH 3/3] network_conf: Drop virNetworkObjIsDuplicate

2015-03-23 Thread Michal Privoznik
On 20.03.2015 20:59, John Ferlan wrote: On 03/16/2015 12:42 PM, Michal Privoznik wrote: This function does not make any sense now, that network driver is (almost) dropped. I mean, previously, when threads were serialized, this function was there to check, if no other network with the same

Re: [libvirt] [PATCH] Fix underlinking of libvirt_driver_interface.so

2015-03-23 Thread Ján Tomko
On Mon, Mar 23, 2015 at 10:11:14AM +0100, Natanael Copa wrote: Always add udev linker flags when WITH_UDEV is enabled to avoid underlinking. See commit 43dbcb15 (interface: always build all available backends) Signed-off-by: Natanael Copa nc...@alpinelinux.org --- src/Makefile.am | 3

Re: [libvirt] [PATCHv2 2/5] Add functions to track virtio-serial addresses

2015-03-23 Thread John Ferlan
On 03/17/2015 07:41 AM, Ján Tomko wrote: Create a sorted array of virtio-serial controllers. Each of the elements contains the controller index and a bitmap of available ports. Buses are not tracked, because they aren't supported by QEMU. --- src/conf/domain_addr.c | 348

[libvirt] [PATCH] Document that USB hostdevs do not need nodeDettach

2015-03-23 Thread Ján Tomko
The virNodeDeviceDettach API only works on PCI devices. Originally added by commit 10d3272e, but the API never supported USB devices. Reported by: Martin Polednik mpoled...@redhat.com --- docs/formatdomain.html.in | 19 +-- tools/virsh.pod | 17 - 2

[libvirt] [PATCH] RFC: Add domain vmport attribute

2015-03-23 Thread Marc-André Lureau
The QEMU machine vmport option allows to set the VMWare IO port emulation. This emulation is useful for absolute pointer input when the guest has vmware input drivers, and is enabled by default for kvm. However it is unnecessary for Spice-enabled VM, since the agent already handles absolute

Re: [libvirt] Windows 7 guest installer does not detect drive if physical partition used instead of disk file.

2015-03-23 Thread Emmanuel Noobadmin
On 3/23/15, Stefan Hajnoczi stefa...@gmail.com wrote: I have CCed the libvirt mailing list, since KVM is a component here but your question seems to be mainly about libvirt, virt-manager, virt-install, etc. Apologies for posting to the wrong list, I assumed it would be KVM related as the guest

[libvirt] [PATCH] compile failure 'src/cpu/cpu_map.xml': No such file or directory'

2015-03-23 Thread Amy Fong
From 73172eeed1fcffcfae088a3059fbca0689b7437f Mon Sep 17 00:00:00 2001 From: Amy Fong amy.f...@windriver.com Date: Mon, 23 Mar 2015 13:44:03 -0400 Subject: [PATCH] libvirt: 'src/cpu/cpu_map.xml': No such file or directory' In some circumstances where the build tree differs from the source,

Re: [libvirt] [PATCH 2/2] qemu: add a max_core setting to qemu.conf for core dump size

2015-03-23 Thread John Ferlan
On 03/18/2015 08:36 AM, Daniel P. Berrange wrote: Currently the QEMU processes inherit their core dump rlimit from libvirtd, which is really suboptimal. This change allows their limit to be directly controller from qemu.conf instead. --- src/libvirt_private.syms | 2 ++

Re: [libvirt] [PATCH] Relax filesystem target type

2015-03-23 Thread Daniel P. Berrange
On Sat, Mar 21, 2015 at 11:45:03AM +0100, Guido Günther wrote: When using QEMU's 9pfs the target dir element is not necessarily an absolute path. If it is not validation currently fails with the misleaading In fact the target dir is not actually a directory at all. With KVM is is an opaque

Re: [libvirt] [PATCH] RFC: Add domain vmport attribute

2015-03-23 Thread Daniel P. Berrange
On Mon, Mar 23, 2015 at 05:32:30PM +0100, Marc-André Lureau wrote: The QEMU machine vmport option allows to set the VMWare IO port emulation. This emulation is useful for absolute pointer input when the guest has vmware input drivers, and is enabled by default for kvm. However it is

Re: [libvirt] [PATCH 1/2] conf: parse integers into long long, instead of long

2015-03-23 Thread John Ferlan
On 03/18/2015 08:36 AM, Daniel P. Berrange wrote: When parsing integer values, we only used 'long' data type in the virConfValue struct. This is insufficiently large to deal with things like guest memory sizes on 32-bit platforms which are using PAE for addressing 4 GB of RAM. ---