[libvirt] virStream double unref in virChrdevOpen()

2013-05-18 Thread Sergey Fionov
Hello, There is double unref virChrdevOpen() (src/conf/virchrdev.c) when error occured. if (virStreamRef(st) 0) { virMutexUnlock(devs-lock); return -1; } ... if (virHashAddEntry(devs-hash, path, st) 0) goto error; ... if (virFDStreamOpenFile(st,

[libvirt] [PATCH] qemu: save domain state to XML after reboot

2013-05-18 Thread root
Currently qemuDomainReboot() does reboot in two phases: qemuMonitorSystemPowerdown() and qemuProcessFakeReboot(). qemuMonitorSystemPowerdown() shutdowns the domain and saves domain state/reason as VIR_DOMAIN_SHUTDOWN_UNKNOWN. qemuProcessFakeReboot() sets domain state/reason to

[libvirt] [PATCH] qemu: save domain state to XML after reboot

2013-05-18 Thread Sergey Fionov
Currently qemuDomainReboot() does reboot in two phases: qemuMonitorSystemPowerdown() and qemuProcessFakeReboot(). qemuMonitorSystemPowerdown() shutdowns the domain and saves domain state/reason as VIR_DOMAIN_SHUTDOWN_UNKNOWN. qemuProcessFakeReboot() sets domain state/reason to

[libvirt] [PATCH] esx: Implement esxDomainGetMetadata for VIR_DOMAIN_METADATA_DESCRIPTION

2013-05-18 Thread Matthias Bolte
--- src/esx/esx_driver.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index b23e7f6..f53b9c4 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -5211,6 +5211,52 @@ no_memory: #undef

[libvirt] [PATCH] vmware: Restore OOM error reporting in vmwareCopyVMXFileName

2013-05-18 Thread Matthias Bolte
Got lost in commit e6ab10098066dd04794ff2ee5d10bc9b1db93327. --- src/vmware/vmware_conf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 4b61a9c..6c24187 100644 --- a/src/vmware/vmware_conf.c +++

[libvirt] [PATCH] esx: Accept VIR_DOMAIN_AFFECT_CURRENT in addition to VIR_DOMAIN_AFFECT_LIVE

2013-05-18 Thread Matthias Bolte
Basically autotranslate VIR_DOMAIN_AFFECT_CURRENT to VIR_DOMAIN_AFFECT_LIVE. Modification impact is handled lax anyway. There is no distinction between a live and a stored config in the VMware world. A strict modification impact handling would require to check the virtual machine state each time

[libvirt] [PATCH] esx: Replace almost all esxVI_String_DeepCopyValue vith VIR_STRDUP

2013-05-18 Thread Matthias Bolte
--- src/esx/esx_driver.c|8 src/esx/esx_network_driver.c|6 ++ src/esx/esx_storage_backend_iscsi.c |2 +- src/esx/esx_storage_backend_vmfs.c |4 ++-- src/esx/esx_util.c | 11 --- src/esx/esx_vi.c|

[libvirt] [PATCH] esx: Fix dynamic VI object type detection

2013-05-18 Thread Matthias Bolte
VI objects support inheritance with subtype polymorphism. For example the FileInfo object type is extended by FloppyImageFileInfo, FolderFileInfo etc. Then SearchDatastore_Task returns an array of FileInfo objects and depending on the represented file the FileInfo is actually a FolderFileInfo or

[libvirt] [PATCH] esx: Implement esxDomainSetMemoryFlags

2013-05-18 Thread Matthias Bolte
--- src/esx/esx_driver.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index b55ef45..3962bf1 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -2187,6 +2187,27 @@ esxDomainSetMemory(virDomainPtr domain,