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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.Kothari@xxxxxxx>
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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]