[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 VIR_DOMAIN_RESUMED_

[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,

Re: [libvirt] libvirt accidentally destroys guests after being restarted

2013-03-12 Thread Sergey Fionov
Hello. We finally found the cause of this problem. When we use "virsh reboot domain", it is actually two calls qemuMonitorSystemPowerdown() and qemuProcessFakeReboot(). Inside the first call domain stateReason is set to VIR_DOMAIN_SHUTDOWN_UNKNOWN and then virDomainSaveStatus() is called. Insid

[libvirt] [PATCH] Fix memory leak in virNetClientIOWriteMessage

2013-02-18 Thread Sergey Fionov
Commit 18937c3ae0990b4417a43aa07a2c35aaf8cb6ec2 introduced the memory leak when client->msg.fds is moved to thecall->msg and then never freed. --- Hello, Please ignore previous patch with incorrent formatting. src/rpc/virnetclient.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/rpc/v

[libvirt] [PATCH] Fix memory leak in virNetClientIOWriteMessage

2013-02-17 Thread Sergey Fionov
Commit 18937c3ae0990b4417a43aa07a2c35aaf8cb6ec2 introduced the memory leak when client->msg.fds is copied to thecall->msg and then never freed. --- src/rpc/virnetclient.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 4efa578..bfa1624