[libvirt] [PATCH]: Bug when you try to start machines made will older VBox versions

2009-09-14 Thread Pritesh Kothari
Hi All,

Thanks to Florian, who pointed out the bug, due to which you can't start 
domains defined with older builds or with empty FRONTEND/Type tag in their 
xml files.

Fixed it in the following patch.

Regards,
Pritesh
commit 612e914a8b5902f779223f70552a16d86ede6e6f
Author: Pritesh Kothari pritesh.koth...@sun.com
Date:   Mon Sep 14 16:35:10 2009 +0200

libvirt: sessionType can't be null while calling OpenRemoteSession

diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 8024243..7270710 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -2850,6 +2850,13 @@ static int vboxDomainCreate(virDomainPtr dom) {
 vrdpPresent = 1;
 }
 
+if (!vrdpPresent  !sdlPresent  !guiPresent) {
+/* if nothing is selected it means either the machine xml
+ * file is really old or some values are missing so fallback
+ */
+guiPresent = 1;
+}
+
 data-pFuncs-pfnUtf8Free(valueTypeUtf8);
 
 } else {
@@ -2882,12 +2889,12 @@ static int vboxDomainCreate(virDomainPtr dom) {
 data-pFuncs-pfnUtf8ToUtf16(vrdp, sessionType);
 }
 
-data-vboxObj-vtbl-OpenRemoteSession(data-vboxObj,
-   data-vboxSession,
-   iid,
-   sessionType,
-   env,
-   progress );
+rc = data-vboxObj-vtbl-OpenRemoteSession(data-vboxObj,
+data-vboxSession,
+iid,
+sessionType,
+env,
+progress );
 if (NS_FAILED(rc)) {
 vboxError(dom-conn, VIR_ERR_OPERATION_FAILED,
   %s, openremotesession failed, domain can't be started);
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH]: Bug when you try to start machines made will older VBox versions

2009-09-14 Thread Daniel Veillard
On Mon, Sep 14, 2009 at 04:53:32PM +0200, Pritesh Kothari wrote:
 Hi All,
 
 Thanks to Florian, who pointed out the bug, due to which you can't start 
 domains defined with older builds or with empty FRONTEND/Type tag in their 
 xml files.
 
 Fixed it in the following patch.

 Okay since it's a bug fix and based on IRC discussions it was validated
by the bug reporter, ACK, pushed to git,

 thanks !

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list