Re: [libvirt] [PATCH v4 2/2] qemu: migration: new migration param for persistent destination XML

2016-04-18 Thread Dmitry Andreev
On 15.04.2016 21:12, Jiri Denemark wrote: On Thu, Mar 17, 2016 at 19:31:45 +0300, Dmitry Andreev wrote: Migration API allows to specify a destination domain configuration. Offline domain has only inactive XML and it is replaced by configuration specified using VIR_MIGRATE_PARAM_DEST_XML param

Re: [libvirt] [PATCH v4 0/2] persistent live migration with specified XML

2016-03-30 Thread Dmitry Andreev
ping On 17.03.2016 19:31, Dmitry Andreev wrote: v4: wrong param name in commit msg v3: - use shorter name for param and rename args - move qemuMigrationCookieAddPersistent out from qemuMigrationBakeCookie - rebase to master v2: reimplemented with new migration param Libvirt doesn't

[libvirt] [PATCH v3 1/2] qemuMigrationCookieAddPersistent: move it out and change argument type

2016-03-19 Thread Dmitry Andreev
This changes allow to use qemuMigrationCookieAddPersistent with an XML definition that isn't assigned to any domain. --- src/qemu/qemu_migration.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt] [PATCH v4 0/2] persistent live migration with specified XML

2016-03-19 Thread Dmitry Andreev
VIR_MIGRATE_PARAM_PERSIST_XML and implements its support in qemu driver. Dmitry Andreev (2): qemuMigrationCookieAddPersistent: move it out and change argument type qemu: migration: new migration param for persistent destination XML include/libvirt/libvirt-domain.h | 15 ++ src/qemu/qemu_driver.c

Re: [libvirt] [PATCH v3 2/2] qemu: migration: new migration param for persistent destination XML

2016-03-19 Thread Dmitry Andreev
On 17.03.2016 19:12, Dmitry Andreev wrote: Migration API allows to specify a destination domain configuration. Offline domain has only inactive XML and it is replaced by configuration specified using VIR_MIGRATE_PARAM_DEST_XML param. In case of live migration VIR_MIGRATE_PARAM_DEST_XML param

[libvirt] [PATCH v3 0/2] persistent live migration with specified XML

2016-03-19 Thread Dmitry Andreev
in qemu driver. Dmitry Andreev (2): qemuMigrationCookieAddPersistent: move it out and change argument type qemu: migration: new migration param for persistent destination XML include/libvirt/libvirt-domain.h | 15 ++ src/qemu/qemu_driver.c | 12 +--- src/qemu

[libvirt] [PATCH v3 2/2] qemu: migration: new migration param for persistent destination XML

2016-03-18 Thread Dmitry Andreev
Migration API allows to specify a destination domain configuration. Offline domain has only inactive XML and it is replaced by configuration specified using VIR_MIGRATE_PARAM_DEST_XML param. In case of live migration VIR_MIGRATE_PARAM_DEST_XML param is applied for active XML. This commit

[libvirt] [PATCH v4 2/2] qemu: migration: new migration param for persistent destination XML

2016-03-18 Thread Dmitry Andreev
Migration API allows to specify a destination domain configuration. Offline domain has only inactive XML and it is replaced by configuration specified using VIR_MIGRATE_PARAM_DEST_XML param. In case of live migration VIR_MIGRATE_PARAM_DEST_XML param is applied for active XML. This commit

[libvirt] [PATCH v4 1/2] qemuMigrationCookieAddPersistent: move it out and change argument type

2016-03-18 Thread Dmitry Andreev
This changes allow to use qemuMigrationCookieAddPersistent with an XML definition that isn't assigned to any domain. --- src/qemu/qemu_migration.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

Re: [libvirt] [PATCH v5 2/2] qemuDomainRevertToSnapshot: save domain configuration

2016-03-16 Thread Dmitry Andreev
Sorry, forget to remove cc to libvir-list@redhat.com. On 16.03.2016 11:30, Dmitry Andreev wrote: Макс, можно тебя попросить вмержить этот патч? commit c5e81090eaf40d5735402f94a7446ced3e78a7df commit 8047d45704a3af77a2c4b88f48e3c98d853813b8 А прошлую версию удалить. commit

Re: [libvirt] [PATCH v5 2/2] qemuDomainRevertToSnapshot: save domain configuration

2016-03-16 Thread Dmitry Andreev
:О On 15.03.2016 22:20, Cole Robinson wrote: On 03/12/2016 10:39 AM, Dmitry Andreev wrote: Reverting to a snapshot may change domain configuration. New configuration should be saved if domain has persistent flag. VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT is emitted in case of configuration update

[libvirt] [PATCH v5 2/2] qemuDomainRevertToSnapshot: save domain configuration

2016-03-12 Thread Dmitry Andreev
Reverting to a snapshot may change domain configuration. New configuration should be saved if domain has persistent flag. VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT is emitted in case of configuration update. --- src/qemu/qemu_driver.c | 9 + 1 file changed, 9 insertions(+) diff --git

[libvirt] [PATCH v5 0/2] notify about reverting to a snapshot

2016-03-12 Thread Dmitry Andreev
and event is emitted for all cases when persistent domain configuration was updated from a snapshot. Dmitry Andreev (2): Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT sub-event qemuDomainRevertToSnapshot: save domain configuration examples/object-events/event-test.c | 2 ++ include/libvirt

[libvirt] [PATCH v5 1/2] Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT sub-event

2016-03-12 Thread Dmitry Andreev
VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT event should be emitted when domain configuration was changed on revert to snapshot. --- examples/object-events/event-test.c | 2 ++ include/libvirt/libvirt-domain.h| 1 + tools/virsh-domain.c| 3 ++- 3 files changed, 5 insertions(+), 1

[libvirt] [PATCH v2 0/2] persistent live migration with specified XML

2016-03-11 Thread Dmitry Andreev
: https://bugzilla.redhat.com/show_bug.cgi?id=835300 This patch-set introduces new migration param VIR_MIGRATE_PARAM_DEST_PERSIST_XML and implements its support in qemu driver. Dmitry Andreev (2): qemuMigrationCookieAddPersistent: change argument type qemu: migration: new migration param

[libvirt] [PATCH v2 2/2] qemu: migration: new migration param for persistent destination XML

2016-03-11 Thread Dmitry Andreev
Migration API allows to specify a destination domain configuration. Offline domain has only inactive XML and it is replaced by configuration specified using VIR_MIGRATE_PARAM_DEST_XML param. In case of live migration VIR_MIGRATE_PARAM_DEST_XML param is applied for active XML. This commit

[libvirt] [PATCH v2 1/2] qemuMigrationCookieAddPersistent: change argument type

2016-03-11 Thread Dmitry Andreev
It wasn't possible to add XML not assigned to a domain because virDomainObjPtr was an argument type. --- src/qemu/qemu_migration.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 38fa81c..92d2ce9 100644 ---

[libvirt] [PATCH 2/2] qemu: migration: use specified XML for active and inactive confguration

2016-03-10 Thread Dmitry Andreev
Migration API allows to specify a destination domain XML. If no XML was specified the source one is used. Offline domain has only inactive XML and it is replaced by specified destination XML. Live migration allows to persist domain on a destination host. In this case both inactive and active XML

[libvirt] [PATCH 1/2] qemuMigrationCookieAddPersistent: change argument type

2016-03-10 Thread Dmitry Andreev
It wasn't possible to add XML not assigned to a domain because virDomainObjPtr was an argument type. --- src/qemu/qemu_migration.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 38fa81c..92d2ce9 100644 ---

[libvirt] [PATCH 0/2] persistant live migration with specified XML

2016-03-10 Thread Dmitry Andreev
Live migration has a bug: specified XML doesn't used for persistant configuration. https://bugzilla.redhat.com/show_bug.cgi?id=835300 This patch-set fixes this problem. Specified XML used for both active and inactive domain XML. Hope this is what it should be. Dmitry Andreev (2

[libvirt] [PATCH v4 0/2] notify about reverting to a snapshot

2016-02-18 Thread Dmitry Andreev
. v4: rebase v3: [2/2] event is emited only in the case when stopped domain is reverted to a stopped domain. Dmitry Andreev (2): Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT sub-event qemu: emit 'defined' event after reverted to snapshot without state changes examples/object

[libvirt] [PATCH v4 1/2] Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT sub-event

2016-02-18 Thread Dmitry Andreev
When domain is reverted to a snapshot and domain state is changed libvirt emits _FROM_SNAPSHOT event. This new introduced event could be emitted if there was no changes in state but domain configuration was changed by a snapshot. --- examples/object-events/event-test.c | 2 ++

Re: [libvirt] [PATCHv3 0/2] notify about reverting to a snapshot

2016-02-18 Thread Dmitry Andreev
On 06.01.2016 01:19, John Ferlan wrote: On 12/23/2015 09:25 AM, Dmitry Andreev wrote: Reverting to snapshot may change domain configuration but there will be no events about that. Lack of the event become a problem for virt-manager https://bugzilla.redhat.com/show_bug.cgi?id=1081148

[libvirt] [PATCH v4 2/2] qemu: emit 'defined' event after reverted to snapshot without state changes

2016-02-18 Thread Dmitry Andreev
When domain is reverted to a snapshot it's configuration and state may be changed. If the domain state was changed libvirt emits one or more _FROM_SNAPSHOT events. In case when domain and target states both are offline there will be no state changes and no events. Lack of the event become a

Re: [libvirt] [PATCH] qemuDomainResume: allow to resume domain with guest panicked

2016-02-01 Thread Dmitry Andreev
Ping. Thanks! Dmitry On 23.01.2016 19:08, Dmitry Andreev wrote: In case of guest panicked, preserved crashed domain has stopped CPUs. It's not possible to use tools like WinDbg for the problem investigation until we start CPUs back. --- src/qemu/qemu_driver.c | 7 +-- 1 file changed, 5

[libvirt] [PATCH] qemuDomainResume: allow to resume domain with guest panicked

2016-01-23 Thread Dmitry Andreev
In case of guest panicked, preserved crashed domain has stopped CPUs. It's not possible to use tools like WinDbg for the problem investigation until we start CPUs back. --- src/qemu/qemu_driver.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH] qemuDomainReboot: use fakeReboot=true only for acpi mode

2016-01-20 Thread Dmitry Andreev
When acpi is used to reboot/shutdown qemu domain, qemu emits SHUTDOWN event. Libvirt uses fakeReboot variable in order to differentiate reboot or shutdown. fakeReboot value is reseted to false after domain restart/reset. When mode=agent is used to reboot qemu domain, qemu doesn't emit SHUTDOWN

[libvirt] [PATCHv3 2/3] qemu: add capability check for memballoon 'deflate-on-oom' feature

2016-01-08 Thread Dmitry Andreev
Add appropriate capability check and new virQEMUCaps flag for the new virtio balloon feature. QEMU commit with the complete feature description: http://git.qemu.org/?p=qemu.git;a=commit;h=e3816255bf4b6377bb405331e2ee0dc14d841b80 --- src/qemu/qemu_capabilities.c | 11 ++

[libvirt] [PATCHv3 1/3] conf: introduce 'autodeflate' attribute for memballoon device

2016-01-08 Thread Dmitry Andreev
Excessive memory balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. QEMU memballoon device has a feature to release some memory at the last moment before some process will be get killed by OOM-killer. Introduce a new optional balloon device attribute

[libvirt] [PATCHv3 3/3] qemu: add support of optional 'autodeflate' attribute

2016-01-08 Thread Dmitry Andreev
Autodeflate can be enabled/disabled for memballon device of model 'virtio'. xml: qemu: qemu -device virtio-balloon-pci,...,deflate-on-oom=on Autodeflate cannot be enabled/disabled for running domain. --- src/qemu/qemu_command.c| 11

[libvirt] [PATCHv3 0/3] 'autodeflate' attribute for mememory balloon

2016-01-08 Thread Dmitry Andreev
* s/> 0/ != VIR_TRISTATE_SWITCH_ABSENT/ [3/3] Dmitry Andreev (3): conf: introduce 'autodeflate' attribute for memballoon device qemu: add capability check for memballoon 'deflate-on-oom' feature qemu: add support of optional 'autodeflate' attribute docs/formatdomain.

[libvirt] [PATCHv3 2/2] qemu: emit 'defined' event after reverted to snapshot without state changes

2015-12-23 Thread Dmitry Andreev
When domain is reverted to a snapshot it's configuration and state may be changed. If the domain state was changed libvirt emits one or more _FROM_SNAPSHOT events. In case when domain and target states both are offline there will be no state changes and no events. Lack of the event become a

[libvirt] [PATCHv3 0/2] notify about reverting to a snapshot

2015-12-23 Thread Dmitry Andreev
is emited only in the case when stopped domain is reverted to a stopped domain. Dmitry Andreev (2): Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT sub-event qemu: emit 'defined' event after reverted to snapshot without state changes examples/object-events/event-test.c | 2

[libvirt] [PATCHv3 1/2] Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT sub-event

2015-12-23 Thread Dmitry Andreev
When domain is reverted to a snapshot and domain state is changed libvirt emits _FROM_SNAPSHOT event. This new introduced event could be emitted if there was no changes in state but domain configuration was changed by a snapshot. --- examples/object-events/event-test.c | 2 ++

[libvirt] [PATCHv2 0/3] 'autodeflate' attribute for mememory balloon

2015-12-23 Thread Dmitry Andreev
wasn't added because QEMU doesn't allow to on/off 'deflate-on-oom' in runtime * more tests added [3/3] *** BLURB HERE *** Dmitry Andreev (3): conf: introduce 'autodeflate' attribute for memballoon device qemu: add capability check for memballoon 'autodeflate' feature qemu: add support

[libvirt] [PATCHv2 2/3] qemu: add capability check for memballoon 'autodeflate' feature

2015-12-23 Thread Dmitry Andreev
New attribute 'autodeflate' for memballoon was introduced. This commit adds appropriate capability check and new virQEMUCaps flag. --- src/qemu/qemu_capabilities.c | 11 ++ src/qemu/qemu_capabilities.h | 2 +

[libvirt] [PATCHv2 3/3] qemu: add support of optional 'autodeflate' attribute

2015-12-23 Thread Dmitry Andreev
Autodeflate can be enabled/disabled for memballon device of model 'virtio'. xml: qemu: qemu -device virtio-balloon-pci,...,deflate-on-oom=on Autodeflate cannot be enabled/disabled for running domain. --- src/qemu/qemu_command.c| 11

[libvirt] [PATCHv2 1/3] conf: introduce 'autodeflate' attribute for memballoon device

2015-12-23 Thread Dmitry Andreev
Excessive memory balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. QEMU memballoon device has a feature to release some memory at the last moment before some process will be get killed by OOM-killer. Introduced attribute allows to enable or disable

Re: [libvirt] [PATCH 1/2] conf: introduce 'deflate-on-oom' attribute for memballoon device

2015-12-18 Thread Dmitry Andreev
On 17.12.2015 23:25, John Ferlan wrote: On 12/14/2015 06:35 AM, Dmitry Andreev wrote: Excessive memory balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. QEMU memballoon device has a feature to release some memory at the last moment before some

Re: [libvirt] [PATCHv2 2/2] qemu: emit 'defined' event after reverted to snapshot

2015-12-16 Thread Dmitry Andreev
On 16.12.2015 16:26, Peter Krempa wrote: On Wed, Dec 16, 2015 at 07:28:43 -0500, John Ferlan wrote: On 12/16/2015 07:01 AM, Peter Krempa wrote: On Wed, Dec 16, 2015 at 12:09:42 +0300, Dmitry Andreev wrote: If config file was changed VIR_DOMAIN_EVENT_DEFINED should be emitted drop "

[libvirt] [PATCHv2 1/2] Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT event

2015-12-16 Thread Dmitry Andreev
This should be emitted whenever a domain is reverted to snapshot. --- examples/object-events/event-test.c | 2 ++ include/libvirt/libvirt-domain.h| 1 + tools/virsh-domain.c| 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCHv2 2/2] qemu: emit 'defined' event after reverted to snapshot

2015-12-16 Thread Dmitry Andreev
If config file was changed VIR_DOMAIN_EVENT_DEFINED should be emitted --- src/qemu/qemu_driver.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 783a7cd..1474eaa 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCHv2 0/2] notify about reverting to snapshot

2015-12-16 Thread Dmitry Andreev
] Reworked. John noted that in some error cases I send 'defined' event without changes in configuration. Dmitry Andreev (2): Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT event qemu: emit 'defined' event after reverted to snapshot examples/object-events/event-test.c | 2 ++ include/libvirt

Re: [libvirt] [PATCH 0/5] UEFI loader NVRAM image in Qcow2 format

2015-12-16 Thread Dmitry Andreev
On 16.12.2015 11:13, Michal Privoznik wrote: On 08.12.2015 15:17, Dmitry Andreev wrote: Found this message right after I'v sent the patch. https://www.redhat.com/archives/libvir-list/2015-January/msg00446.html Right. When I came across this patch set I recalled having some discussion about

Re: [libvirt] [PATCH 2/2] qemu: emit 'defined' event after reverted to snapshot

2015-12-15 Thread Dmitry Andreev
On 14.12.2015 23:10, John Ferlan wrote: On 12/09/2015 03:29 AM, Dmitry Andreev wrote: Config file is changed. VIR_DOMAIN_EVENT_DEFINED should be emitted --- src/qemu/qemu_driver.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

Re: [libvirt] Exclusive VM lock

2015-12-15 Thread Dmitry Andreev
On 15.12.2015 11:47, Martin Kletzander wrote: On Mon, Dec 14, 2015 at 06:50:56PM +0300, Dmitry Andreev wrote: On 14.12.2015 18:10, Peter Krempa wrote: On Mon, Dec 14, 2015 at 17:18:22 +0300, Dmitry Andreev wrote: Hi, I'm looking for a mechanism to do a sequence of API calls as atomic

[libvirt] [PATCH 0/2] 'deflate-on-oom' attribute for mememory balloon

2015-12-14 Thread Dmitry Andreev
. QEMU commit with the complete feature description: http://git.qemu.org/?p=qemu.git;a=commit;h=e3816255bf4b6377bb405331e2ee0dc14d841b80 Dmitry Andreev (2): conf: introduce 'deflate-on-oom' attribute for memballoon device qemu: add support of optional 'deflate-on-oom' attribute docs

[libvirt] [PATCH 1/2] conf: introduce 'deflate-on-oom' attribute for memballoon device

2015-12-14 Thread Dmitry Andreev
Excessive memory balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. QEMU memballoon device has a feature to release some memory at the last moment before some process will be get killed by OOM-killer. Introduced attribute allows to enable or disable

[libvirt] [PATCH 2/2] qemu: add support of optional 'deflate-on-oom' attribute

2015-12-14 Thread Dmitry Andreev
xml: qemu: qemu -device virtio-balloon-pci,...,deflate-on-oom=on --- src/qemu/qemu_command.c| 4 .../qemuxml2argv-balloon-device-deflate-off.args | 23 .../qemuxml2argv-balloon-device-deflate-off.xml| 25 ++

Re: [libvirt] Exclusive VM lock

2015-12-14 Thread Dmitry Andreev
On 14.12.2015 18:10, Peter Krempa wrote: On Mon, Dec 14, 2015 at 17:18:22 +0300, Dmitry Andreev wrote: Hi, I'm looking for a mechanism to do a sequence of API calls as atomic operation. Is there any way for libvirt's API client to acquire an exclusive VM lock to prevent other client from

[libvirt] Exclusive VM lock

2015-12-14 Thread Dmitry Andreev
Hi, I'm looking for a mechanism to do a sequence of API calls as atomic operation. Is there any way for libvirt's API client to acquire an exclusive VM lock to prevent other client from changing VM state through libvirt? -- libvir-list mailing list libvir-list@redhat.com

[libvirt] qemu logging/tracing option in domain xml

2015-12-14 Thread Dmitry Andreev
Hi all, QEMU has the '-d' command line option to configure logs/traces. As I can see, is the only way to set it in domain xml. makes a configuration tainted and doesn't allow to update tracing/logging configuration in runtime. The ability to update configuration in runtime will be very

[libvirt] [PATCH 2/2] qemu: emit 'defined' event after reverted to snapshot

2015-12-09 Thread Dmitry Andreev
Config file is changed. VIR_DOMAIN_EVENT_DEFINED should be emitted --- src/qemu/qemu_driver.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ae1d8e7..b32172a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@

[libvirt] [PATCH 0/2] notify about reverting to snapshot

2015-12-09 Thread Dmitry Andreev
Reverting to snapshot may change domain configuration but there will be no events about that. Lack of the event become a problem for virt-manager https://bugzilla.redhat.com/show_bug.cgi?id=1081148 This patch-set introduces new event and emits it in qemuDomainRevertToSnapshot. Dmitry Andreev

[libvirt] [PATCH 1/2] Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT event

2015-12-09 Thread Dmitry Andreev
This should be emitted whenever a domain is reverted to snapshot. --- examples/object-events/event-test.c | 2 ++ include/libvirt/libvirt-domain.h| 1 + tools/virsh-domain.c| 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 5/5] qemu: add support for os.nvram 'format' attribute

2015-12-08 Thread Dmitry Andreev
UEFI firmwares may want to use a non-volatile memory to store some variables. os.nvram tag is used to specify image file path for this store. 'format' attribute is used to specify this image format. --- src/qemu/qemu_command.c | 8 ++-- src/qemu/qemu_process.c | 17 + 2

[libvirt] [PATCH 3/5] storage: add new function virStorageBackendConvertImage

2015-12-08 Thread Dmitry Andreev
virStorageBackendConvertImage can be used to convert image from one format to another. --- src/storage/storage_backend.c | 22 ++ src/storage/storage_backend.h | 5 + 2 files changed, 27 insertions(+) diff --git a/src/storage/storage_backend.c

[libvirt] [PATCH 4/5] conf: add 'format' attribute to domain/os/nvram element

2015-12-08 Thread Dmitry Andreev
By default libvirt's qemu driver creates nvram file as a copy of the file specified in 'template' attribute and use it as a 'raw' image file. 'raw' image format doesn't support snapshotting. 'format' attribut can be used to specify different format for nvram image file. This patch introduces

[libvirt] [PATCH 2/5] storage: refactor: split out image creating tool search function

2015-12-08 Thread Dmitry Andreev
This patch splits out the function from virStorageBackendCreateQemuImg. New function virStorageBackendFindQemuImgTool has a char** argument so it can be used without virConnect and virStoragePool. --- src/storage/storage_backend.c | 29 - 1 file changed, 20

[libvirt] [PATCH 0/5] UEFI loader NVRAM image in Qcow2 format

2015-12-08 Thread Dmitry Andreev
that specifies nvram image file format. The patch-set doesn't contains docs and test in v1. Dmitry Andreev (5): storage: split virStorageBackendCreateExecCommand in two functions storage: refactor: split out image creating tool search function storage: add new function virStorageBackendConvertImage

Re: [libvirt] [PATCH 0/5] UEFI loader NVRAM image in Qcow2 format

2015-12-08 Thread Dmitry Andreev
Found this message right after I'v sent the patch. https://www.redhat.com/archives/libvir-list/2015-January/msg00446.html On 08.12.2015 17:11, Dmitry Andreev wrote: Libvirt allows to specify a path to an image file that will be used as a var storage for UEFI firmware. /var/lib/libvirt/nvram

[libvirt] [PATCH 1/5] storage: split virStorageBackendCreateExecCommand in two functions

2015-12-08 Thread Dmitry Andreev
This patch introduces virStorageBackendCreateExec function that has simple type arguments so it can be used without 'virStorageXXX' structures. --- src/storage/storage_backend.c | 130 +++--- 1 file changed, 70 insertions(+), 60 deletions(-) diff --git

[libvirt] Event after reverting to snapshot

2015-12-08 Thread Dmitry Andreev
Hi, I'm looking for a way to catch an event about reverting to snapshot. As I can see in the code there is no lifecycle event if VM state wasn't changed. The comment in the code of qemuDomainRevertToSnapshot: /* We have the following transitions, which create the following events:

[libvirt] [PATCHv5 4/9] qemu: add support for hv_crash feature as a panic device

2015-11-24 Thread Dmitry Andreev
Panic device type used depends on 'model' attribute. If no model is specified then device type depends on hypervisor and guest arch. 'pseries' model is used for pSeries guest and 'isa' model is used in other cases. XML: QEMU command line: qemu -cpu ,hv_crash --- v5: * autoselection of

[libvirt] [PATCHv5 2/9] conf: add 'model' attribute for panic device with values isa, pseries, hyperv

2015-11-24 Thread Dmitry Andreev
Libvirt already has two types of panic devices - pvpanic and pSeries firmware. This patch introduces the 'model' attribute and a new type of panic device. 'isa' model is for ISA pvpanic device. 'pseries' model is a default value for pSeries guests. 'hyperv' model is the new type. It's used for

[libvirt] [PATCHv5 0/9] Hyper-v crash feature support

2015-11-24 Thread Dmitry Andreev
A new Hyper-V cpu feature 'hv_crash' was added to QEMU. The feature will become available in v2.5.0. What is changed in v5: * minor code fixes * code was moved between patches * patch sequence changed Dmitry Andreev (9): conf: refactor code for checking ABI stability of panic device conf

[libvirt] [PATCHv5 9/9] conf: reject multiple panic devices of same model

2015-11-24 Thread Dmitry Andreev
Only one panic device per model is allowed. --- v5: minor code fixes src/conf/domain_conf.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ef322f5..c30f420 100644 --- a/src/conf/domain_conf.c +++

[libvirt] [PATCHv5 7/9] Allow multiple panic devices

2015-11-24 Thread Dmitry Andreev
'model' attribute was added to a panic device but only one panic device is allowed. This patch changes panic device presence from 'optional' to 'zeroOrMore'. --- v5: part of the code was moved out from this commit docs/formatdomain.html.in | 1 + docs/schemas/domaincommon.rng | 4 ++--

[libvirt] [PATCHv5 1/9] conf: refactor code for checking ABI stability of panic device

2015-11-24 Thread Dmitry Andreev
--- v5: this code was moved from another patch src/conf/domain_conf.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0ac7dbf..a14dd77 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c

[libvirt] [PATCHv5 5/9] tests: rework tests for panic devices

2015-11-24 Thread Dmitry Andreev
Panic device model will be selected automatically if it is not chosen by the user. Tests should cover this case. --- .../qemuxml2argv-panic-no-address.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +- .../qemuxml2argv-pseries-nvram.xml | 2 +-

[libvirt] [PATCHv5 6/9] tests: add tests for the new 'hyperv' panic device model

2015-11-24 Thread Dmitry Andreev
--- tests/qemuargv2xmltest.c| 1 + .../qemuxml2argvdata/qemuxml2argv-hyperv-panic.args | 21 + tests/qemuxml2argvtest.c| 1 + 3 files changed, 23 insertions(+) create mode 100644

[libvirt] [PATCHv5 8/9] tests: add tests for multiple panic devices

2015-11-24 Thread Dmitry Andreev
--- .../qemuxml2argv-panic-double.args | 21 .../qemuxml2argvdata/qemuxml2argv-panic-double.xml | 28 ++ tests/qemuxml2argvtest.c | 2 ++ tests/qemuxml2xmltest.c| 1 + 4 files changed, 52

[libvirt] [PATCHv5 3/9] tests: add tests for the new panic device attribute - 'model'

2015-11-24 Thread Dmitry Andreev
--- v5: tests was moved from another patch .../qemuxml2argvdata/qemuxml2argv-hyperv-panic.xml | 25 + tests/qemuxml2argvdata/qemuxml2argv-panic-isa.xml | 31 ++ .../qemuxml2argv-panic-pseries.xml | 30 +

Re: [libvirt] [PATCHv3 0/4] Hyper-v crash feature support

2015-11-13 Thread Dmitry Andreev
On 13.11.2015 12:12, Jiri Denemark wrote: On Fri, Nov 13, 2015 at 11:30:30 +0300, Dmitry Andreev wrote: A new Hyper-V cpu feature 'hv_crash' was added to QEMU. The feature will become available in v2.5.0. This patch adds support for this feature. n & Addressing -> Compose messages

[libvirt] [PATCHv3 3/4] schema: allow multiple panic devices

2015-11-13 Thread Dmitry Andreev
'model' attribute was added to a panic device but only one panic device is allowed. This patch changes panic device presence from 'optional' to 'zeroOrMore'. --- docs/formatdomain.html.in | 1 + docs/schemas/domaincommon.rng | 4 +-- src/conf/domain_conf.c| 73

[libvirt] [PATCHv3 2/4] qemu: add support for hv_crash feature as a panic device

2015-11-13 Thread Dmitry Andreev
Panic device type used depends on 'model' attribute. If no model is specified then device type depends on hypervisor and guest arch. 'pseries' model is used for pSeries guest and 'isa' model is used in other cases. XML: QEMU command line: qemu -cpu ,hv_crash --- src/qemu/qemu_command.c |

[libvirt] [PATCHv3 4/4] tests: add tests for panic models and multiple panic devices

2015-11-13 Thread Dmitry Andreev
--- tests/qemuargv2xmltest.c | 1 + .../qemuxml2argv-hyperv-panic.args | 21 +++ .../qemuxml2argvdata/qemuxml2argv-hyperv-panic.xml | 25 + .../qemuxml2argv-panic-double.args | 21 +++

[libvirt] [PATCHv3 0/4] Hyper-v crash feature support

2015-11-13 Thread Dmitry Andreev
in docs because there are many examples of " 'value' " without a tag. Dmitry Andreev (4): conf: add 'model' attribute for panic device with values isa, pseries, hyperv qemu: add support for hv_crash feature as a panic device schema: allow multiple panic devices tests:

[libvirt] [PATCHv3 1/4] conf: add 'model' attribute for panic device with values isa, pseries, hyperv

2015-11-13 Thread Dmitry Andreev
Libvirt already has two types of panic devices - pvpanic and pSeries firmware. This patch introduces the 'model' attribute and a new type of panic device. 'isa' model is for ISA pvpanic device. 'pseries' model is a default value for pSeries guests. 'hyperv' model is the new type. It's used for

[libvirt] [PATCHv4 3/6] schema: allow multiple panic devices

2015-11-13 Thread Dmitry Andreev
'model' attribute was added to a panic device but only one panic device is allowed. This patch changes panic device presence from 'optional' to 'zeroOrMore'. --- docs/formatdomain.html.in | 1 + docs/schemas/domaincommon.rng | 4 +-- src/conf/domain_conf.c| 73

[libvirt] [PATCHv4 2/6] qemu: add support for hv_crash feature as a panic device

2015-11-13 Thread Dmitry Andreev
Panic device type used depends on 'model' attribute. If no model is specified then device type depends on hypervisor and guest arch. 'pseries' model is used for pSeries guest and 'isa' model is used in other cases. XML: QEMU command line: qemu -cpu ,hv_crash --- src/qemu/qemu_command.c |

[libvirt] [PATCHv4 1/6] conf: add 'model' attribute for panic device with values isa, pseries, hyperv

2015-11-13 Thread Dmitry Andreev
Libvirt already has two types of panic devices - pvpanic and pSeries firmware. This patch introduces the 'model' attribute and a new type of panic device. 'isa' model is for ISA pvpanic device. 'pseries' model is a default value for pSeries guests. 'hyperv' model is the new type. It's used for

[libvirt] [PATCHv4 6/6] conf: reject multiple panic devices of same model

2015-11-13 Thread Dmitry Andreev
Only one panic device per model is allowed. --- src/conf/domain_conf.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2f17675..b4a46ad 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[libvirt] [PATCHv4 5/6] qemu: set panic device model if not specified by the user

2015-11-13 Thread Dmitry Andreev
Choose 'ise' or 'pseries' model for panic device 'default' model value. Fixed tests and add two new outputs for xml-2-xml tests. Set value --- src/qemu/qemu_command.c| 14 ++ src/qemu/qemu_domain.c | 9 +++

[libvirt] [PATCHv4 4/6] tests: add tests for panic models and multiple panic devices

2015-11-13 Thread Dmitry Andreev
--- tests/qemuargv2xmltest.c | 1 + .../qemuxml2argv-hyperv-panic.args | 21 +++ .../qemuxml2argvdata/qemuxml2argv-hyperv-panic.xml | 25 + .../qemuxml2argv-panic-double.args | 21 +++

[libvirt] [PATCHv4 0/6] Hyper-v crash feature support

2015-11-13 Thread Dmitry Andreev
[6/6] 1-4 commits have no changes. The previous version: https://www.redhat.com/archives/libvir-list/2015-November/msg00457.html Dmitry Andreev (6): conf: add 'model' attribute for panic device with values isa, pseries, hyperv qemu: add support for hv_crash feature as a panic device

[libvirt] [PATCHv2 2/3] qemu: add support for hv_crash feature as a panic device

2015-11-12 Thread Dmitry Andreev
XML: QEMU command line: qemu -cpu ,hv_crash --- src/qemu/qemu_command.c | 48 ++-- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 792ada3..6ad4240 100644 ---

[libvirt] [PATCHv2 0/3] Hyper-v crash feature support

2015-11-12 Thread Dmitry Andreev
A new Hyper-V cpu feature 'hv_crash' was added to QEMU. The feature will become available in v2.5.0. This patch adds support for this feature. Dmitry Andreev (3): conf: add 'model' attribute for panic device with values isa, pseries, hyperv qemu: add support for hv_crash feature

[libvirt] [PATCHv2 1/3] conf: add 'model' attribute for panic device with values isa, pseries, hyperv

2015-11-12 Thread Dmitry Andreev
Libvirt already has two types of panic devices - pvpanic and pSeries firmware. This patch introduces the 'model' attribute and a new type of panic device. 'isa' model is for ISA pvpanic device. 'pseries' model is a default value for pSeries guests. 'hyperv' model is the new type. It's used for

[libvirt] [PATCHv2 3/3] tests: add tests for panic device with model 'hyperv'

2015-11-12 Thread Dmitry Andreev
--- tests/qemuargv2xmltest.c | 1 + .../qemuxml2argv-hyperv-panic.args | 21 ++ .../qemuxml2argvdata/qemuxml2argv-hyperv-panic.xml | 25 ++ tests/qemuxml2argvtest.c | 1 +

Re: [libvirt] [PATCH 1/2] conf: add crash to hyperv features

2015-11-11 Thread Dmitry Andreev
Adding colleague to CC On 11.11.2015 11:34, Jiri Denemark wrote: On Wed, Nov 11, 2015 at 08:34:02 +0100, Peter Krempa wrote: On Thu, Nov 05, 2015 at 16:54:02 +0300, Dmitry Andreev wrote: On 05.11.2015 14:06, Jiri Denemark wrote: On Mon, Oct 26, 2015 at 13:23:32 +0300, Dmitry Andreev wrote

Re: [libvirt] [PATCH 1/2] conf: add crash to hyperv features

2015-11-10 Thread Dmitry Andreev
Paolo, Jiri, can I do something more for this patch to be accepted? On 05.11.2015 17:32, Paolo Bonzini wrote: On 05/11/2015 14:54, Dmitry Andreev wrote: Add crash CPU feature for Hyper-V. Hyper-V crash MSR's can be used by Hyper-V based guests to notify about occurred guest crash. XML

Re: [libvirt] [PATCH 1/2] conf: add crash to hyperv features

2015-11-05 Thread Dmitry Andreev
On 05.11.2015 14:06, Jiri Denemark wrote: On Mon, Oct 26, 2015 at 13:23:32 +0300, Dmitry Andreev wrote: Add crash CPU feature for Hyper-V. Hyper-V crash MSR's can be used by Hyper-V based guests to notify about occurred guest crash. XML: Sounds like this is related

[libvirt] [PATCH 0/2] Hyper-v crash feature support

2015-10-26 Thread Dmitry Andreev
A new Hyper-V cpu feature 'hv_crash' was added to QEMU. The feature will become available in v2.5.0. This patch adds support for this feature. Dmitry Andreev (2): conf: add crash to hyperv features qemu: add hv_crash support docs/formatdomain.html.in | 7

[libvirt] [PATCH 2/2] qemu: add hv_crash support

2015-10-26 Thread Dmitry Andreev
XML: QEMU command line: qemu -cpu ,hv_crash --- src/qemu/qemu_command.c| 2 ++ tests/qemuxml2argvdata/qemuxml2argv-hyperv-off.xml | 1 + tests/qemuxml2argvdata/qemuxml2argv-hyperv.args| 4 ++-- tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml | 1 +

[libvirt] [PATCH 1/2] conf: add crash to hyperv features

2015-10-26 Thread Dmitry Andreev
Add crash CPU feature for Hyper-V. Hyper-V crash MSR's can be used by Hyper-V based guests to notify about occurred guest crash. XML: --- docs/formatdomain.html.in | 7 +++ docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c| 6 +-