提交 b22d935d 编写于 作者: P Pritesh Kothari 提交者: Daniel Veillard

VBox bug when starting machine from old versions

* src/vbox/vbox_tmpl.c: fix a bug where one can't start domains defined
  with older builds or with empty "FRONTEND/Type" tag in their xml
  files.
上级 f2ad7824
...@@ -2850,6 +2850,13 @@ static int vboxDomainCreate(virDomainPtr dom) { ...@@ -2850,6 +2850,13 @@ static int vboxDomainCreate(virDomainPtr dom) {
vrdpPresent = 1; 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); data->pFuncs->pfnUtf8Free(valueTypeUtf8);
} else { } else {
...@@ -2882,12 +2889,12 @@ static int vboxDomainCreate(virDomainPtr dom) { ...@@ -2882,12 +2889,12 @@ static int vboxDomainCreate(virDomainPtr dom) {
data->pFuncs->pfnUtf8ToUtf16("vrdp", &sessionType); data->pFuncs->pfnUtf8ToUtf16("vrdp", &sessionType);
} }
data->vboxObj->vtbl->OpenRemoteSession(data->vboxObj, rc = data->vboxObj->vtbl->OpenRemoteSession(data->vboxObj,
data->vboxSession, data->vboxSession,
iid, iid,
sessionType, sessionType,
env, env,
&progress ); &progress );
if (NS_FAILED(rc)) { if (NS_FAILED(rc)) {
vboxError(dom->conn, VIR_ERR_OPERATION_FAILED, vboxError(dom->conn, VIR_ERR_OPERATION_FAILED,
"%s", "openremotesession failed, domain can't be started"); "%s", "openremotesession failed, domain can't be started");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册