Re: [libvirt] build failure on 32-bit

2016-07-14 Thread Eric Blake
On 07/13/2016 03:14 AM, Daniel P. Berrange wrote: > On Tue, Jul 12, 2016 at 11:48:11AM -0600, Eric Blake wrote: >> I hit an interesting failure on my 32-bit F24 machine: >> >> In file included from ../../src/util/virconf.c:32:0: >> ../../src/util/virconf.c: In function 'virConfGetValueSSizeT': >>

Re: [libvirt] [PATCH] virConfGetValueSSizeT: Fix build on 32 bits

2016-07-14 Thread Eric Blake
On 07/14/2016 03:45 PM, Michal Privoznik wrote: > This function tries to get a ssize_t value from a config file. > But before returning it, it checks whether the value would fit in > ssize_t and if not an error is printed out among with the range > for the ssize_t type. However, on some platforms

[libvirt] [PATCH] virConfGetValueSSizeT: Fix build on 32 bits

2016-07-14 Thread Michal Privoznik
This function tries to get a ssize_t value from a config file. But before returning it, it checks whether the value would fit in ssize_t and if not an error is printed out among with the range for the ssize_t type. However, on some platforms SSIZE_MAX may actually be a signed long type:

Re: [libvirt] [PATCH] virconf: skip some range checks if SSIZE_MAX >= LLONG_MAX

2016-07-14 Thread Michal Privoznik
On 14.07.2016 12:30, Daniel P. Berrange wrote: > If size_t is the same size as long long, then we can skip > some of the range checks. This avoids triggering some > bogus compiler warning messages. > > Signed-off-by: Daniel P. Berrange > --- > src/util/virconf.c | 4 >

Re: [libvirt] [PATCH] conf: Revert changes to add new secret type "passphrase"

2016-07-14 Thread Daniel P. Berrange
On Thu, Jul 14, 2016 at 01:49:19PM -0400, John Ferlan wrote: > Revert the remainder of commit id 'c84380106' > > Signed-off-by: John Ferlan > --- > > This "replaces" patch 3 of my other series - essentially removing all > traces of the 'passphrase' changes - as requested

Re: [libvirt] [PATCH v4 4/7] storage: Add support to create a luks volume

2016-07-14 Thread John Ferlan
[...] >> + >> +void >> +virQEMUBuildLuksOpts(virBufferPtr buf, >> + virStorageEncryptionInfoDefPtr enc, >> + const char *alias) >> +{ >> +virBufferAsprintf(buf, "key-secret=%s,", alias); >> + >> +/* If there's any cipher, then add that to the

[libvirt] [PATCH] docs: Add Kimchi as Web Application

2016-07-14 Thread Ramon Medeiros
Kimchi is a open-source interface to kvm. It runs with HTML5, simple and easy to manage kvm guests. Signed-off-by: Ramon Medeiros --- docs/apps.html.in | 8 1 file changed, 8 insertions(+) diff --git a/docs/apps.html.in b/docs/apps.html.in index

Re: [libvirt] [PATCH] config: Add listen setter

2016-07-14 Thread Zeeshan Ali (Khattak)
On Thu, Jul 14, 2016 at 3:16 PM, Visarion-Mingopol Alexandru-Viorel wrote: > Actually, it seems there is some stuff to work on regarding this change. Indeed. Please keep in mind that * if we only use string types if there is no better alternatives. Static types are

[libvirt] [PATCH] conf: Revert changes to add new secret type "passphrase"

2016-07-14 Thread John Ferlan
Revert the remainder of commit id 'c84380106' Signed-off-by: John Ferlan --- This "replaces" patch 3 of my other series - essentially removing all traces of the 'passphrase' changes - as requested via code review. docs/aclpolkit.html.in | 4

[libvirt] [PATCH v2 0/1] storage: vstorage support

2016-07-14 Thread Olga Krishtal
The patch supports pool and volume managment using Vistuozzo Storage (vstorage) as a backend. To define pool use: virsh -c qemu+unix:///system pool-define-as --name VZ --type vstorage --source-name vz7-vzstorage --target /vzstorage_pool The resulting XML: VZ

[libvirt] [PATCH v2] storage: vz storage pool support

2016-07-14 Thread Olga Krishtal
This patch supports pool and volume management within Virtuozzo Storage. Virtuozzo Storage is a highly-available distributed software defined storage with built-in replication and disaster recovery. From client's point of view it looks like network attached storage (NFS or GlusterFS). More

Re: [libvirt] [PATCHv4 9/9] Auto-add one hub if there are too many USB devices

2016-07-14 Thread John Ferlan
On 07/01/2016 11:38 AM, Ján Tomko wrote: > When parsing a command line with USB devices that have > no address specified, QEMU automatically adds a USB hub > if the device would fill up all the available USB ports. > > To help most of the users, add one hub if there are more > USB devices than

[libvirt] [PATCH] config: Add listen address setter

2016-07-14 Thread Visarion Alexandru
Learn to set the address the domain is listening on. --- .../libvirt-gconfig-domain-graphics-spice.c| 18 ++ .../libvirt-gconfig-domain-graphics-spice.h| 3 +++ libvirt-gconfig/libvirt-gconfig.sym| 1 + 3 files changed, 22

Re: [libvirt] [PATCHv4 8/9] Assign addresses on USB device hotplug

2016-07-14 Thread John Ferlan
On 07/01/2016 11:38 AM, Ján Tomko wrote: > USB disks, redirected devices, host devices and serial devices > are supported. > --- > src/conf/domain_addr.c | 29 > ++ > src/conf/domain_addr.h | 4 +++ >

[libvirt] [PATCH 1/5] domain: Add new VCPU state "halted"

2016-07-14 Thread Viktor Mihajlovski
QEMU virtual CPUs can assume a halted state, which - depending on the architecture - can indicate whether a CPU is in use by the guest operating system. A new VCPU state halted is introduced in preparation of the support in the QEMU driver (and optionally others where deemed appropriate).

Re: [libvirt] [PATCHv4 7/9] Assign addresses to USB devices

2016-07-14 Thread John Ferlan
On 07/01/2016 11:38 AM, Ján Tomko wrote: > Automatically assign addresses to USB devices. > > Just like reserving, this is only done for newly defined domains. > > https://bugzilla.redhat.com/show_bug.cgi?id=1215968 > --- > src/conf/domain_addr.c | 125 >

Re: [libvirt] [PATCH v4 7/7] qemu: Add luks support for domain disk

2016-07-14 Thread Ján Tomko
On Mon, Jul 11, 2016 at 02:07:58PM -0400, John Ferlan wrote: Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1301021 Generate the luks command line using the AES secret key to encrypt the luks secret. A luks secret object will be in addition to a an AES secret. For hotplug, check if the

[libvirt] [PATCH v3 4/4] vz: support filesystem type volume

2016-07-14 Thread Olga Krishtal
Vz containers are able to use ploop volumes from storage pools to work upon. To use filesystem type volume, pool name and volume name should be specifaed in : The information about pool and volume is stored in ct dom configuration:

[libvirt] [PATCH 5/5] qemu: Ensure reported VCPU state is current in driver API

2016-07-14 Thread Viktor Mihajlovski
Refresh the VCPU halted states in API functions returning domain VCPU state information to make sure it's current. This affects qemuDomainGetVcpus and qemuDomainGetStatsVcpu Signed-off-by: Viktor Mihajlovski Reviewed-by: Bjoern Walk

[libvirt] [PATCH 4/5] qemu: Add domain support for VCPU halted state

2016-07-14 Thread Viktor Mihajlovski
Adding a field to the domain's private vcpu object to hold the halted state information. Adding two functions in support of the halted state: - qemuDomainGetVcpuHalted: retrieve the halted state from a private vcpu object - qemuDomainRefreshVcpuHalted: obtain the per-vcpu halted states via

[libvirt] [PATCH 2/5] qemu: Add monitor APIs for the detection of halted VCPUs

2016-07-14 Thread Viktor Mihajlovski
New monitor function qemuMonitorGetCPUState added to retrieve the halted state of VCPUs via the query-cpus command. Signed-off-by: Viktor Mihajlovski Reviewed-by: Bjoern Walk Signed-off-by: Boris Fiuczynski ---

[libvirt] [PATCH v3 1/4] filesystem: adds possibility to use storage pool as fs source

2016-07-14 Thread Olga Krishtal
Signed-off-by: Olga Krishtal --- src/conf/domain_audit.c| 4 ++-- src/conf/domain_conf.c | 34 --- src/conf/domain_conf.h | 3 ++- src/libvirt_private.syms | 1 + src/lxc/lxc_cgroup.c | 2 +- src/lxc/lxc_container.c

[libvirt] [PATCH v3 0/4] devices: filesystem: type volume

2016-07-14 Thread Olga Krishtal
The patches introduce new filesystem type volume: This makes possible to use storage volumes as the source for disks. v2: -split patches -rebased v3: - fixed check for template fs. - refactoring Olga Krishtal (4): filesystem: adds possibility to use storage pool as fs source

[libvirt] [PATCH v3 2/4] devices: filesystems: added volume type

2016-07-14 Thread Olga Krishtal
New type of is introduced. This patch allows to use volumes for storing the filesystem, that is accessed from the guest e.g. root directory for container. To take advantage of volumes as a backend of filesystem volume and pool names should be specified: Signed-off-by: Olga Krishtal

[libvirt] [PATCH v3 3/4] vz: refactoring of prlsdkCreateCt

2016-07-14 Thread Olga Krishtal
We do not need to check domainf fs type there, because it is done in prlsdkCheckUnsupportedParams. Signed-off-by: Olga Krishtal --- src/vz/vz_sdk.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/vz/vz_sdk.c

Re: [libvirt] [PATCH v4 6/7] qemu: Alter the qemuDomainGetSecretAESAlias to add new arg

2016-07-14 Thread Ján Tomko
On Mon, Jul 11, 2016 at 02:07:57PM -0400, John Ferlan wrote: Soon we will be adding luks encryption support. Since a volume could require both a luks secret and a secret to give to the server to use of the device, alter the alias generation to create a slightly different alias so that we don't

[libvirt] [PATCH 0/5] qemu: report actual vcpu state in virVcpuInfo

2016-07-14 Thread Viktor Mihajlovski
Currently, the virVcpuInfo returned by virDomainGetVcpus() will always report a state of VIR_VCPU_RUNNING for each defined domain vcpu even if the vcpu is currently in the halted state. As the monitor interface is in fact reporting the accurate state, it is rather easy to transport this

[libvirt] [PATCH 3/5] tests: Add testcase for qemuMonitorJSONGetCPUState

2016-07-14 Thread Viktor Mihajlovski
Mix of halted and non-halted VCPUs used for verification. Signed-off-by: Viktor Mihajlovski Reviewed-by: Bjoern Walk Signed-off-by: Boris Fiuczynski --- tests/qemumonitorjsontest.c | 106

Re: [libvirt] [PATCH v4 5/7] qemu: Add secinfo for hotplug virtio disk

2016-07-14 Thread Ján Tomko
On Mon, Jul 11, 2016 at 02:07:56PM -0400, John Ferlan wrote: Commit id 'a1344f70a' added AES secret processing for RBD when starting up a guest. As such, when the hotplug code calls qemuDomainSecretDiskPrepare an AES secret could be added to the disk about to be hotplugged. If an AES secret was

Re: [libvirt] [PATCH] config: Add listen setter

2016-07-14 Thread Visarion-Mingopol Alexandru-Viorel
Actually, it seems there is some stuff to work on regarding this change. On Wed, Jul 13, 2016 at 6:11 PM, Visarion Alexandru < viorel.visar...@gmail.com> wrote: > Learn to set the listen attribute on spice. > --- > libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c | 10 ++ >

Re: [libvirt] [PATCH v4 4/7] storage: Add support to create a luks volume

2016-07-14 Thread Ján Tomko
On Mon, Jul 11, 2016 at 02:07:55PM -0400, John Ferlan wrote: Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1301021 If the volume xml was looking to create a luks volume take the necessary steps in order to make that happen. The processing will be: 1. create a temporary file

[libvirt] [libvirt-glib] gconfig: Add gvir_config_domain_video_get_model()

2016-07-14 Thread Zeeshan Ali (Khattak)
Add a getter for model of domain video device. --- libvirt-gconfig/libvirt-gconfig-domain-video.c | 12 libvirt-gconfig/libvirt-gconfig-domain-video.h | 1 + libvirt-gconfig/libvirt-gconfig.sym| 1 + 3 files changed, 14 insertions(+) diff --git

[libvirt] [PATCH 2/2] storage: Forbid wiping formatted volume types that are not supported

2016-07-14 Thread Martin Kletzander
Until now we allowed that to happen, however the only thing we supported was either rewiting the file or truncating it. That however doesn't keep the format of that file, so QCOWs, VDIs and all others just became RAW with arbitrary size. Not to mention any domain using such volume could not

[libvirt] [PATCH 1/2] storage: Don't delete Ploop volumes twice

2016-07-14 Thread Martin Kletzander
When reinitializing Ploop volumes we also went through the rutine of the normal wipe, effectively removing the root.hds file twice. Since we'll hopefully add support for other formats as well, split the function with a switch into which we can cleanly add formats in the future. Signed-off-by:

[libvirt] [PATCH 0/2] Error out on unsupported formats for vol-wipe

2016-07-14 Thread Martin Kletzander
Historically, vol-wipe was created to rewrite volume with either zeros or some algorithm. However for non-raw file-based images rewriting or erasing and recreating them destroys their format. The solution seemed easy -- just delete and rebuild the volume. However we don't store the flags used

Re: [libvirt] [PATCH v4 3/7] Repurpose the 'passphrase' secret to 'tls'

2016-07-14 Thread Ján Tomko
On Mon, Jul 11, 2016 at 02:07:54PM -0400, John Ferlan wrote: Commit id 'c84380106' added support for a secret usage type 'passphrase' that was designed to be used for both LUKS encryption and TLS credentials since both used a 'simple' passphrase in order to handle the authentication. However, a

Re: [libvirt] [PATCH v4 2/7] docs: Update docs to reflect LUKS secret changes

2016-07-14 Thread Ján Tomko
On Mon, Jul 11, 2016 at 02:07:53PM -0400, John Ferlan wrote: Commit id's 'c8438010', '9bbf0d7e', and '2552fec24' altered the documentation to describe adding a 'passphrase' type secret usage model in order to reference the secret for a luks volume. After commit, it was deemed that a 'volume'

Re: [libvirt] [PATCH v4 1/7] tests: Adjust LUKS tests to use 'volume' secret type

2016-07-14 Thread Ján Tomko
On Mon, Jul 11, 2016 at 02:07:52PM -0400, John Ferlan wrote: Commit id's '9bbf0d7e6' and '2552fec24' added some XML parsing tests for a LUKS volume to use a 'passphrase' secret format. After commit, this was deemed to be incorrect, so covert the various tests to use the volume usage format where

Re: [libvirt] [PATCHv4 6/9] Reserve existing USB addresses

2016-07-14 Thread John Ferlan
On 07/01/2016 11:38 AM, Ján Tomko wrote: > Check if they fit on the USB controllers the domain has, > and error out if two devices try to use the same address. > --- > src/conf/domain_addr.c | 42 > ++ > src/conf/domain_addr.h

[libvirt] [PATCH v2] qemu: set fake reboot flag only in acpi mode

2016-07-14 Thread Nikolay Shirokovskiy
First this fixes the same issue as e2b86f580. Only difference is that reboot is done via shutdown function with reboot semantics. Second 8be502fd tells us that we need to always set fake reboot flag if shutdown/reboot will trigger shutdown event. To put it simple we need to set it false if agent

[libvirt] [PATCH] virconf: skip some range checks if SSIZE_MAX >= LLONG_MAX

2016-07-14 Thread Daniel P. Berrange
If size_t is the same size as long long, then we can skip some of the range checks. This avoids triggering some bogus compiler warning messages. Signed-off-by: Daniel P. Berrange --- src/util/virconf.c | 4 1 file changed, 4 insertions(+) diff --git

Re: [libvirt] [PATCH 03/16] virconf: add typed value accessor methods

2016-07-14 Thread Daniel P. Berrange
On Thu, Jul 14, 2016 at 11:27:43AM +0200, Andrea Bolognani wrote: > On Mon, 2016-07-11 at 10:45 +0100, Daniel P. Berrange wrote: > > Currently many users of virConf APIs are defining the same > > macros for calling virConfValue() and then doing type > > checking. To remove this repeated code, add

[libvirt] [PATCH] virconf: clarify type range checks for integers

2016-07-14 Thread Daniel P. Berrange
When virConf 'l' field is a 'signed long long', so whenever the 'type' field is VIR_CONF_ULONG, we should explicitly cast 'l' to a 'unsigned long long' before doing range checks. Signed-off-by: Daniel P. Berrange --- src/util/virconf.c | 81

Re: [libvirt] [PATCH] qemu: don't set fake reboot if it will not be used

2016-07-14 Thread Nikolay Shirokovskiy
On 13.07.2016 17:55, John Ferlan wrote: > > > On 06/30/2016 05:42 AM, Nikolay Shirokovskiy wrote: >> The use case is similar to e2b86f580. First call shutdown with >> reboot semantics in agent mode. As a result fake reboot flag is set. >> Next issue shutdown from guest and you will get reboot

Re: [libvirt] [PATCH 03/16] virconf: add typed value accessor methods

2016-07-14 Thread Andrea Bolognani
On Mon, 2016-07-11 at 10:45 +0100, Daniel P. Berrange wrote: > Currently many users of virConf APIs are defining the same > macros for calling virConfValue() and then doing type > checking. To remove this repeated code, add a set of > typesafe accessor methods. >  > Signed-off-by: Daniel P.

Re: [libvirt] qemu: migration: shall we abort migration while the guest is rebooting?

2016-07-14 Thread Zhangbo (Oscar)
>> Hi all: >> Here's the steps we produce the problem: >> 1 reboot guest with the flag of VIR_DOMAIN_REBOOT_ACPI_POWER_BTN >> 2 sleep 1 second (so that the guest is still rebooting, although the API >already returned.) >> 3 migrate the guest >> >> The problem is that : the guest failed

Re: [libvirt] [PATCH] tests: command: Fix build on ppc64/aarch64

2016-07-14 Thread Martin Kletzander
On Thu, Jul 14, 2016 at 10:17:56AM +0200, Andrea Bolognani wrote: On Thu, 2016-07-14 at 08:30 +0200, Martin Kletzander wrote: > Commit ca10bb040fcf introduced a new test that fails to build > on at least some architectures: >  >  commandtest.c: In function 'test25': >  commandtest.c:1121:5:

Re: [libvirt] [PATCH] tests: command: Fix build on ppc64/aarch64

2016-07-14 Thread Andrea Bolognani
On Thu, 2016-07-14 at 08:30 +0200, Martin Kletzander wrote: > > Commit ca10bb040fcf introduced a new test that fails to build > > on at least some architectures: > >  > >  commandtest.c: In function 'test25': > >  commandtest.c:1121:5: error: comparison is always true due to > >

Re: [libvirt] qemu: migration: shall we abort migration while the guest is rebooting?

2016-07-14 Thread Daniel P. Berrange
On Thu, Jul 14, 2016 at 03:13:45AM +, Zhangbo (Oscar) wrote: > Hi all: > Here's the steps we produce the problem: > 1 reboot guest with the flag of VIR_DOMAIN_REBOOT_ACPI_POWER_BTN > 2 sleep 1 second (so that the guest is still rebooting, although the API > already returned.) > 3

Re: [libvirt] Disconnected from qemu, keepalive timeout

2016-07-14 Thread Martin Kletzander
On Thu, Jul 14, 2016 at 06:11:48AM +, Nir Levy wrote: Thanks you, Yes, indeed after virsh start. That's will surely help. I am really struggling to understand how eventually the libvirt is managing the qemu via its fd's I can see that virsh is launching qemu right after: execve(binary,

Re: [libvirt] [PATCH] tests: command: Fix build on ppc64/aarch64

2016-07-14 Thread Martin Kletzander
On Wed, Jul 13, 2016 at 07:20:26PM +0200, Andrea Bolognani wrote: Commit ca10bb040fcf introduced a new test that fails to build on at least some architectures: commandtest.c: In function 'test25': commandtest.c:1121:5: error: comparison is always true due to limited

Re: [libvirt] Disconnected from qemu, keepalive timeout

2016-07-14 Thread Nir Levy
Thanks you, Yes, indeed after virsh start. That's will surely help. I am really struggling to understand how eventually the libvirt is managing the qemu via its fd's I can see that virsh is launching qemu right after: execve(binary, cmd->args, cmd->env); I have grasp too that libvirtd is

Re: [libvirt] Disconnected from qemu, keepalive timeout

2016-07-14 Thread Martin Kletzander
On Wed, Jul 13, 2016 at 03:47:37PM +, Nir Levy wrote: Hello Guys, Thanks for reading this, I have compiled libvirt and qemu over fedora 22 for using debug information and no opt ("-g3 -O0"). I am investigating the xml feature qemu_traced_symbols includes all qemu traced