Re: [libvirt] [PATCH v2 05/22] qemu: Don't mess with disk->mirrorState

2015-06-09 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:10 +0200, Jiri Denemark wrote: > This patch reverts commit 76c61cdca20c106960af033e5d0f5da70177af0f. > > VIR_DOMAIN_DISK_MIRROR_STATE_ABORT says we asked for a block job to be > aborted rather than saying it was aborted. Let's just use > VIR_DOMAIN_DISK_MIRROR_STATE_N

[libvirt] question about virConnectGetAllDomainStats and virTypedParameter

2015-06-09 Thread Vasiliy Tolstov
I'm try to implement virConnectGetAllDomainStats for php binding api, but have one issue with VIR_TYPED_PARAM_STRING: code part: retval = virConnectGetAllDomainStats(conn->conn, stats, &retstats, flags); for (i=0; i < retval; i++) { zval *arr2; ALLOC

[libvirt] [PATCH] nodeinfo: fix to parse present cpus rather than possible cpus

2015-06-09 Thread Kothapally Madhu Pavan
Currently we are parsing all the possible cpus to get the nodeinfo. This fix will perform a check for present cpus before parsing. Signed-off-by: Kothapally Madhu Pavan --- src/nodeinfo.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 2faf

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread zhang bo
On 2015/6/10 13:40, Vasiliy Tolstov wrote: > 2015-06-10 5:28 GMT+03:00 zhang bo : >> Thank you for your reply. >> Before this patch, we needed to manually online memory blocks inside the >> guest, after dimm memory hotplug >> for most *nix OSes. (Windows guests automatically get their memory bloc

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread Vasiliy Tolstov
2015-06-10 5:28 GMT+03:00 zhang bo : > Thank you for your reply. > Before this patch, we needed to manually online memory blocks inside the > guest, after dimm memory hotplug > for most *nix OSes. (Windows guests automatically get their memory blocks > online after hotplugging) > That is to say,

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread zhang bo
On 2015/6/9 20:47, Daniel P. Berrange wrote: > On Tue, Jun 09, 2015 at 02:12:39PM +0200, Peter Krempa wrote: >> On Tue, Jun 09, 2015 at 13:05:35 +0100, Daniel Berrange wrote: >>> On Tue, Jun 09, 2015 at 02:03:13PM +0200, Peter Krempa wrote: On Tue, Jun 09, 2015 at 12:46:27 +0100, Daniel Berra

Re: [libvirt] Problem with setting up KVM guests to use HugePages

2015-06-09 Thread Vivi L
Kashyap Chamarthy redhat.com> writes: > You might want re-test by explicitly setting the 'page' element and > 'size' attribute? From my test, I had something like this: > > $ virsh dumpxml f21-vm | grep hugepages -B3 -A2 > 2000896 > 200 > > > >

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

2015-06-09 Thread John Ferlan
Signed-off-by: John Ferlan --- Pushing under the trivial rule src/storage/storage_backend_logical.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index 9c77b4c..070f2bd 100644 --- a/src/stora

[libvirt] [PATCH] storage: Disallow wiping an extended disk partition

2015-06-09 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1225694 Check if the disk partition to be wiped is the extended partition, if so then disallow it. Do this via changing the wipeVol backend to check the volume before passing to the common virStorageBackendVolWipeLocal Signed-off-by: John Ferlan --- s

[libvirt] [PATCH] qemu: Do not support 'serial' scsi-block 'lun' devices

2015-06-09 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1021480 Seems the property has been deprecated for qemu, although seemingly ignored. This patch enforces from a libvirt perspective that a scsi-block 'lun' device should not provide the 'serial' property. Signed-off-by: John Ferlan --- docs/formatdom

Re: [libvirt] [PATCH v2 02/22] qemu: Introduce qemuBlockJobUpdate

2015-06-09 Thread Jiri Denemark
On Tue, Jun 09, 2015 at 16:56:34 +0200, Peter Krempa wrote: > On Tue, Jun 02, 2015 at 14:34:07 +0200, Jiri Denemark wrote: > > The wrapper is useful for calling qemuBlockJobEventProcess with the > > event details stored in disk's privateData, which is the most likely > > usage of qemuBlockJobEventP

Re: [libvirt] [PATCH 0/2] Fix network names with quotes

2015-06-09 Thread Laine Stump
On 06/01/2015 04:06 AM, Shivaprasad G Bhat wrote: > The following series implements... > > --- > > Shivaprasad G Bhat (2): > fix domaincommon.rng to accept network name with quotes > escape quotes for dsmasq conf contents I just pushed both of these patches. Thanks! -- libvir-list mai

Re: [libvirt] [PATCH v1] update snapshot api

2015-06-09 Thread Vasiliy Tolstov
ping for patches... 2015-05-07 17:21 GMT+03:00 Vasiliy Tolstov : > * add constants from libvirt to snapshots api > * add flags to snapshot functions > > Signed-off-by: Vasiliy Tolstov > --- > src/libvirt-php.c | 87 > ++- > 1 file changed, 61

Re: [libvirt] [PATCH v2 04/22] qemu: Use domain condition for synchronous block jobs

2015-06-09 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:09 +0200, Jiri Denemark wrote: > By switching block jobs to use domain conditions, we can drop some > pretty complicated code in NBD storage migration. Moreover, we are > getting ready for migration events (to replace our 50ms polling on > query-migrate). The ultimate

[libvirt] [PATCH v2] storage: Need to set secrettype for direct iscsi disk volume

2015-06-09 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1200206 Commit id '1b4eaa61' added the ability to have a mode='direct' for an iscsi disk volume. It relied on virStorageTranslateDiskSourcePool in order to copy any disk source pool authentication information to the direct disk volume, but it neglected

Re: [libvirt] [PATCH 0/4 v2] parallels: better support of volume based disks in containers

2015-06-09 Thread Dmitry Guryanov
On 06/04/2015 12:10 AM, Maxim Nestratov wrote: v1-v2 change: * Single patch was split into smaller pieces * Corrected conflict of "/" mount point in case both filesystem and block device disks are being added. It is possible to attach volumes to containers but since they are added they a

Re: [libvirt] [PATCH] storage: Need to set secrettype for direct iscsi disk volume

2015-06-09 Thread John Ferlan
On 06/08/2015 07:00 PM, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1200206 > > Commit id '1b4eaa61' added the ability to have a mode='direct' for > an iscsi disk volume. It relied on virStorageTranslateDiskSourcePool > in order to copy any disk source pool authentication i

Re: [libvirt] [PATCH] storage: add RBD support to disk source pool translation

2015-06-09 Thread John Ferlan
On 06/09/2015 10:47 AM, Thibault VINCENT wrote: > On 09/06/2015 14:45, John Ferlan wrote: >> Your cover letter indicates you didn't find any bit of documentation, >> but I'll point out that the formatdomain.html.in describes the "> type='volume'.../>" and how the "> use a disk type volume.. > >

Re: [libvirt] [PATCH v1] update snapshot api

2015-06-09 Thread Vasiliy Tolstov
Or this patch have problems? 2015-05-07 17:21 GMT+03:00 Vasiliy Tolstov : > * add constants from libvirt to snapshots api > * add flags to snapshot functions > > Signed-off-by: Vasiliy Tolstov > --- > src/libvirt-php.c | 87 > ++- > 1 file cha

Re: [libvirt] [libvirt-php] [PATCH v1] update snapshot api

2015-06-09 Thread Vasiliy Tolstov
Another ping. 2015-05-18 9:04 GMT+03:00 Vasiliy Tolstov : > ping > > 2015-05-07 18:06 GMT+03:00 Vasiliy Tolstov : >> 2015-05-07 17:21 GMT+03:00 Vasiliy Tolstov : >>> * add constants from libvirt to snapshots api >>> * add flags to snapshot functions >> >> This is for php libvirt binding >> >> >>

Re: [libvirt] [PATCH v2 02/22] qemu: Introduce qemuBlockJobUpdate

2015-06-09 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:07 +0200, Jiri Denemark wrote: > The wrapper is useful for calling qemuBlockJobEventProcess with the > event details stored in disk's privateData, which is the most likely > usage of qemuBlockJobEventProcess. > > Signed-off-by: Jiri Denemark > --- > > Notes: > A

Re: [libvirt] [PATCH] storage: add RBD support to disk source pool translation

2015-06-09 Thread Thibault VINCENT
On 09/06/2015 14:45, John Ferlan wrote: Your cover letter indicates you didn't find any bit of documentation, but I'll point out that the formatdomain.html.in describes the "" and how the " It's a misunderstanding, I never wished to imply a lack of information existed on how to use the feature.

Re: [libvirt] [PATCH 0/2] Fix network names with quotes

2015-06-09 Thread Daniel P. Berrange
On Tue, Jun 09, 2015 at 07:44:36PM +0530, Shivaprasad bhat wrote: > On Mon, Jun 8, 2015 at 7:09 PM, Michal Privoznik wrote: > > On 01.06.2015 10:06, Shivaprasad G Bhat wrote: > >> The following series implements... > >> > >> --- > >> > >> Shivaprasad G Bhat (2): > >> fix domaincommon.rng to

[libvirt] Jenkins build is back to normal : libvirt-syntax-check #3578

2015-06-09 Thread Jenkins CI
See -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/2] fix domaincommon.rng to accept network name with quotes

2015-06-09 Thread Laine Stump
On 06/01/2015 04:07 AM, Shivaprasad G Bhat wrote: > The network name is currently of type "deviceName" but it should be "text" as > name is defined in the network.rng. > > Signed-off-by: Shivaprasad G Bhat > --- > docs/schemas/domaincommon.rng |2 +- > 1 file changed, 1 insertion(+), 1 deleti

Re: [libvirt] [PATCH v2 03/22] qemu: Properly report failed migration

2015-06-09 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:08 +0200, Jiri Denemark wrote: > Because we are polling we may detect some errors after we asked QEMU for > migration status even though they occurred before. If this happens and > QEMU reports migration completed successfully, we would happily report > the migration s

Re: [libvirt] [PATCH v2 02/22] qemu: Introduce qemuBlockJobUpdate

2015-06-09 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:07 +0200, Jiri Denemark wrote: > The wrapper is useful for calling qemuBlockJobEventProcess with the > event details stored in disk's privateData, which is the most likely > usage of qemuBlockJobEventProcess. > > Signed-off-by: Jiri Denemark > --- > > Notes: > A

Re: [libvirt] Build failed in Jenkins: libvirt-syntax-check #3577

2015-06-09 Thread Dmitry Guryanov
On 06/09/2015 05:08 PM, Jenkins CI wrote: See Sorry, that's my mistake. Already fixed it. -- Started by upstream project "libvirt-build" build number 4064 Started by upstream project "libvir

Re: [libvirt] computing the correct rom for seabios to recognize SR-IOV

2015-06-09 Thread Laine Stump
On 06/09/2015 06:49 AM, Ido Barkan wrote: > Hi, > I am a VDSM developer at Ovirt. > > Recently, we opened Bug 1224954 - seabios does not recognize a direct > attached nic [1] > and discovered that in order to leverage the > (as explained in [2]) in the hostdev element, one must compute the correc

Re: [libvirt] [PATCH] parallels: fix formatting errors in parallels driver

2015-06-09 Thread Dmitry Guryanov
On 06/09/2015 05:13 PM, Dmitry Guryanov wrote: This patch fixes several formatting errors, which I missed before pushing previous patches. Mostly because of missing cppi package. Signed-off-by: Dmitry Guryanov --- src/parallels/parallels_driver.c | 8 src/parallels/parallels_sdk.c

[libvirt] Build failed in Jenkins: libvirt-syntax-check #3577

2015-06-09 Thread Jenkins CI
See -- Started by upstream project "libvirt-build" build number 4064 Started by upstream project "libvirt-build" build number 4065 Building on master in workspace

Re: [libvirt] [PATCH v2 01/22] conf: Introduce per-domain condition variable

2015-06-09 Thread Peter Krempa
On Tue, Jun 02, 2015 at 14:34:06 +0200, Jiri Denemark wrote: > Complex jobs, such as migration, need to monitor several events at once, > which is impossible when each of the event uses its own condition > variable. This patch adds a single condition variable to each domain > object. This variable

[libvirt] [PATCH] parallels: fix formatting errors in parallels driver

2015-06-09 Thread Dmitry Guryanov
This patch fixes several formatting errors, which I missed before pushing previous patches. Mostly because of missing cppi package. Signed-off-by: Dmitry Guryanov --- src/parallels/parallels_driver.c | 8 src/parallels/parallels_sdk.c| 4 ++-- src/parallels/parallels_utils.h | 10

Re: [libvirt] [PATCH 0/2] Fix network names with quotes

2015-06-09 Thread Shivaprasad bhat
On Mon, Jun 8, 2015 at 7:09 PM, Michal Privoznik wrote: > On 01.06.2015 10:06, Shivaprasad G Bhat wrote: >> The following series implements... >> >> --- >> >> Shivaprasad G Bhat (2): >> fix domaincommon.rng to accept network name with quotes >> escape quotes for dsmasq conf contents >>

Re: [libvirt] [PATCH v5] parallels: add block device statistics to driver

2015-06-09 Thread Dmitry Guryanov
On 06/09/2015 10:35 AM, Nikolay Shirokovskiy wrote: Statistics provided through PCS SDK. As we have only async interface in SDK we need to be subscribed to statistics in order to get it. Trivial solution on every stat request to subscribe, wait event and then unsubscribe will lead to significant

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread Daniel P. Berrange
On Tue, Jun 09, 2015 at 02:12:39PM +0200, Peter Krempa wrote: > On Tue, Jun 09, 2015 at 13:05:35 +0100, Daniel Berrange wrote: > > On Tue, Jun 09, 2015 at 02:03:13PM +0200, Peter Krempa wrote: > > > On Tue, Jun 09, 2015 at 12:46:27 +0100, Daniel Berrange wrote: > > > > On Tue, Jun 09, 2015 at 01:22

Re: [libvirt] [PATCH] storage: add RBD support to disk source pool translation

2015-06-09 Thread John Ferlan
On 06/02/2015 09:56 AM, Thibault VINCENT wrote: > Domains can now reference disks of type 'volume' with an underlying RBD pool. > It won't allow mapping snapshots, pools don't list them yet, only COW clones. > > - virStorageTranslateDiskSourcePool: add case to copy RBD attributes > - virStorag

Re: [libvirt] [PATCH] storage: add RBD support to disk source pool translation

2015-06-09 Thread Thibault VINCENT
On 09/06/2015 01:12, Thibault VINCENT wrote: Any idea about this one? Not sure if it's bad or getting lost in backlog, and I'd like to see it in next release. Actually I'm going to submit a new version, please don't merge. Latest patch from John Ferlan about secrettype for iSCSI revealed the s

Re: [libvirt] [PATCH] virsh: change-media: Fix behavior with --update without a source

2015-06-09 Thread Peter Krempa
On Tue, Jun 09, 2015 at 06:01:12 -0600, Eric Blake wrote: > On 06/09/2015 05:41 AM, Peter Krempa wrote: > > Docs state that it should behave like eject. Currently the code does not > > do that. This is a regression since f4b5f53027da4fed2250628e11bac4019. > > > > Resolves: https://bugzilla.redhat.

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread Peter Krempa
On Tue, Jun 09, 2015 at 13:05:35 +0100, Daniel Berrange wrote: > On Tue, Jun 09, 2015 at 02:03:13PM +0200, Peter Krempa wrote: > > On Tue, Jun 09, 2015 at 12:46:27 +0100, Daniel Berrange wrote: > > > On Tue, Jun 09, 2015 at 01:22:49PM +0200, Peter Krempa wrote: > > > > On Tue, Jun 09, 2015 at 11:05

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread Daniel P. Berrange
On Tue, Jun 09, 2015 at 02:03:13PM +0200, Peter Krempa wrote: > On Tue, Jun 09, 2015 at 12:46:27 +0100, Daniel Berrange wrote: > > On Tue, Jun 09, 2015 at 01:22:49PM +0200, Peter Krempa wrote: > > > On Tue, Jun 09, 2015 at 11:05:16 +0100, Daniel Berrange wrote: > > > > On Tue, Jun 09, 2015 at 05:33

Re: [libvirt] [PATCH] virsh: change-media: Fix behavior with --update without a source

2015-06-09 Thread Eric Blake
On 06/09/2015 05:41 AM, Peter Krempa wrote: > Docs state that it should behave like eject. Currently the code does not > do that. This is a regression since f4b5f53027da4fed2250628e11bac4019. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1229592 > --- > tools/virsh-domain.c | 12 +

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread Peter Krempa
On Tue, Jun 09, 2015 at 12:46:27 +0100, Daniel Berrange wrote: > On Tue, Jun 09, 2015 at 01:22:49PM +0200, Peter Krempa wrote: > > On Tue, Jun 09, 2015 at 11:05:16 +0100, Daniel Berrange wrote: > > > On Tue, Jun 09, 2015 at 05:33:24PM +0800, Zhang Bo wrote: > > > > Logically memory hotplug via gues

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread Daniel P. Berrange
On Tue, Jun 09, 2015 at 01:22:49PM +0200, Peter Krempa wrote: > On Tue, Jun 09, 2015 at 11:05:16 +0100, Daniel Berrange wrote: > > On Tue, Jun 09, 2015 at 05:33:24PM +0800, Zhang Bo wrote: > > > Logically memory hotplug via guest agent, by enabling/disabling memory > > > blocks. > > > The correspo

[libvirt] [PATCH] virsh: change-media: Fix behavior with --update without a source

2015-06-09 Thread Peter Krempa
Docs state that it should behave like eject. Currently the code does not do that. This is a regression since f4b5f53027da4fed2250628e11bac4019. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1229592 --- tools/virsh-domain.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-)

[libvirt] [PATCH] Need to squash this into patch

2015-06-09 Thread John Ferlan
Signed-off-by: John Ferlan --- A libvirtd restart test found that my domain disappeared because there was no 'expected_secret_usage' type - this this patch needs to be reviewed as squashed into this patch. src/conf/domain_conf.c | 4 1 file changed, 4 insertions(+) diff --git a/src/conf/d

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread Peter Krempa
On Tue, Jun 09, 2015 at 11:05:16 +0100, Daniel Berrange wrote: > On Tue, Jun 09, 2015 at 05:33:24PM +0800, Zhang Bo wrote: > > Logically memory hotplug via guest agent, by enabling/disabling memory > > blocks. > > The corresponding qga commands are: 'guest-get-memory-blocks', > > 'guest-set-memory

Re: [libvirt] [PATCH] qemu: Capitalize "storage" in qemuDomainAttachUSBMassStorageDevice()

2015-06-09 Thread Jiri Denemark
On Tue, Jun 09, 2015 at 10:40:59 +0200, Andrea Bolognani wrote: > --- > src/qemu/qemu_hotplug.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c > index 94ebe35..3562de6 100644 > --- a/src/qemu/qemu_hotplug.c > +++ b/sr

Re: [libvirt] computing the correct rom for seabios to recognize SR-IOV

2015-06-09 Thread Ido Barkan
Hi, I am a VDSM developer at Ovirt. Recently, we opened Bug 1224954 - seabios does not recognize a direct attached nic [1] and discovered that in order to leverage the (as explained in [2]) in the hostdev element, one must compute the correct FILE path by following something similar to: $ lsp

[libvirt] Qemu-Libgfapi: periodical shutdown of virtual machines.

2015-06-09 Thread Igor Yakovlev
Hello, Would you so kind to help me with my problem concerning libgfapi. My host operating system is Ubuntu 14.04 LTS, version of glusterfs is 3.6.2, and version of qemu is 2.0.0. We use libfgapi library to connect to glusterfs. In our environment virtual machines sometimes go to power-off st

Re: [libvirt] Problem with setting up KVM guests to use HugePages

2015-06-09 Thread Kashyap Chamarthy
On Tue, Jun 09, 2015 at 05:52:04AM +, Vivi L wrote: > Configure hugepages and then start virtual guest via "virsh start". However, > virtual guest failed to use hugepages although it's configured > > The initial usage of system memory > [root@local ~]# free > totalused

[libvirt] computing the correct rom for seabios to recognize SR-IOV

2015-06-09 Thread Ido Barkan
Hi, I am a VDSM developer at Ovirt. Recently, we opened Bug 1224954 - seabios does not recognize a direct attached nic [1] and discovered that in order to leverage the (as explained in [2]) in the hostdev element, one must compute the correct FILE path by following something similar to: $ lspc

[libvirt] Problem with setting up KVM guests to use HugePages

2015-06-09 Thread Vivi L
Configure hugepages and then start virtual guest via "virsh start". However, virtual guest failed to use hugepages although it's configured The initial usage of system memory [root@local ~]# free totalusedfree shared buff/cache available Mem: 263767352 19006

Re: [libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread Daniel P. Berrange
On Tue, Jun 09, 2015 at 05:33:24PM +0800, Zhang Bo wrote: > Logically memory hotplug via guest agent, by enabling/disabling memory blocks. > The corresponding qga commands are: 'guest-get-memory-blocks', > 'guest-set-memory-blocks' and 'guest-get-memory-block-info'. > > detailed flow: > 1 get

[libvirt] [PATCH 8/8] virsh: support memory hotplug with guest agent in virsh

2015-06-09 Thread Zhang Bo
support memory hotplug with the arg --guest in virsh command 'setmem'. fix a little bug in qemu_driver.c at the meanwhile. Signed-off-by: Zhang Bo Signed-off-by: Li Bin --- src/libvirt-domain.c | 5 - src/qemu/qemu_driver.c | 3 ++- tools/virsh-domain.c | 10 +- tools/virsh.p

[libvirt] [PATCH 1/8] lifecycle: add flag VIR_DOMAIN_MEM_GUEST for viDomainSetMemoryFlags

2015-06-09 Thread Zhang Bo
just add the flag and description for function virDomainSetMemoryFlags(). Signed-off-by: Zhang Bo Signed-off-by: Li Bin --- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 4 src/qemu/qemu_driver.c | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-

[libvirt] [PATCH 7/8] qemu: memory: logically hotplug memory with guest agent

2015-06-09 Thread Zhang Bo
hotplug memory with guest agent. It 1 get memory block list, each member has 'phy-index', 'online' and 'can-offline' parameters 2 get memory block size, normally 128MB or 256MB for most OSes 3 convert the target memory size to memory block number, and see if there's enough memory blocks to be s

[libvirt] [PATCH 5/8] qemu: agent: implement qemuAgentUpdateMemblocks

2015-06-09 Thread Zhang Bo
function qemuAgentUpdateMemblocks() checks whether it needs to plug/unplug memory blocks to reach the target memory. it's similar to qemuAgentUpdateCPUInfo(). Signed-off-by: Zhang Bo Signed-off-by: Li Bin --- src/qemu/qemu_agent.c | 69 +++ src/q

[libvirt] [PATCH 6/8] qemu: agent: implement function qemuAgetSetMemblocks

2015-06-09 Thread Zhang Bo
qemuAgetSetMemblocks() is implemented, according to the qga command: 'guest-set-memory-blocks'. It asks the guest agent to set memory blocks online/offline according to the updated MemblockInfo. If all the blocks were setted successfully, the function returns with success, otherwise, fails. Signe

[libvirt] [PATCH 3/8] qemu: agent: implement qemuAgentGetMemblocks

2015-06-09 Thread Zhang Bo
implement function qemuAgentGetMemblocks(). behaviour example: input: '{"execute":"guest-get-memory-blocks"}' output: { "return": [ { "can-offline": false, "online": true, "phys-index": 0 }, { "can-offline": false,

[libvirt] [PATCH 0/8] logically memory hotplug via guest agent

2015-06-09 Thread Zhang Bo
Logically memory hotplug via guest agent, by enabling/disabling memory blocks. The corresponding qga commands are: 'guest-get-memory-blocks', 'guest-set-memory-blocks' and 'guest-get-memory-block-info'. detailed flow: 1 get memory block list, each member has 'phy-index', 'online' and 'can-off

[libvirt] [PATCH 2/8] qemu: agent: define structure of qemuAgentMemblockInfo

2015-06-09 Thread Zhang Bo
add the definition of qemuAgentMemblockInfo, according to the json format: { 'struct': 'GuestMemoryBlock', 'data': {'phys-index': 'uint64', 'online': 'bool', '*can-offline': 'bool'} } Signed-off-by: Zhang Bo Signed-off-by: Li Bin --- src/qemu/qemu_agent.h | 9 +

[libvirt] [PATCH 4/8] qemu: agent: implement qemuAgentGetMemblockGeneralInfo

2015-06-09 Thread Zhang Bo
qemuAgentGetMemblockGeneralInfo() is implememted, according to the qga command 'guest-get-memory-block-info'. the difference between this command and 'guest-get-memory-blocks' is that the latter one gets a list of infos for each memory block, and this command just returns general attributes for t

[libvirt] [PATCH] qemu: Capitalize "storage" in qemuDomainAttachUSBMassStorageDevice()

2015-06-09 Thread Andrea Bolognani
--- src/qemu/qemu_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 94ebe35..3562de6 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -680,7 +680,7 @@ qemuDomainAttachSCSIDisk(virConnectPtr

[libvirt] [PATCH v5] parallels: add block device statistics to driver

2015-06-09 Thread Nikolay Shirokovskiy
Statistics provided through PCS SDK. As we have only async interface in SDK we need to be subscribed to statistics in order to get it. Trivial solution on every stat request to subscribe, wait event and then unsubscribe will lead to significant delays in case of a number of successive requests, as

Re: [libvirt] [PATCH v4] parallels: add block device statistics to driver

2015-06-09 Thread Nikolay Shirokovskiy
On 08.06.2015 20:56, Dmitry Guryanov wrote: > On 06/05/2015 05:17 PM, Nikolay Shirokovskiy wrote: >> static int >> parallelsDoCmdRun(char **outbuf, const char *binary, va_list list) >> diff --git a/src/parallels/parallels_utils.h >> b/src/parallels/parallels_utils.h >> index 2d1d405..cdf6082