mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
xen: handle root= in xen-xm configuration files.
In addition to extra= xm supported a root= option which was supposed to be incorporated into the final command line. Handle that for "virsh domxml-from-native xen-xm". Tested with the libxl backend. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
parent
97af511b1a
commit
ac63014cfd
@ -339,6 +339,8 @@ xenParseXM(virConfPtr conf, int xendConfigVersion,
|
|||||||
def->os.nBootDevs++;
|
def->os.nBootDevs++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
const char *extra, *root;
|
||||||
|
|
||||||
if (xenXMConfigCopyStringOpt(conf, "bootloader", &def->os.bootloader) < 0)
|
if (xenXMConfigCopyStringOpt(conf, "bootloader", &def->os.bootloader) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (xenXMConfigCopyStringOpt(conf, "bootargs", &def->os.bootloaderArgs) < 0)
|
if (xenXMConfigCopyStringOpt(conf, "bootargs", &def->os.bootloaderArgs) < 0)
|
||||||
@ -348,8 +350,18 @@ xenParseXM(virConfPtr conf, int xendConfigVersion,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (xenXMConfigCopyStringOpt(conf, "ramdisk", &def->os.initrd) < 0)
|
if (xenXMConfigCopyStringOpt(conf, "ramdisk", &def->os.initrd) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (xenXMConfigCopyStringOpt(conf, "extra", &def->os.cmdline) < 0)
|
if (xenXMConfigGetString(conf, "extra", &extra, "") < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
if (xenXMConfigGetString(conf, "root", &root, NULL) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
if (root) {
|
||||||
|
if (virAsprintf(&def->os.cmdline, "root=%s %s", root, extra) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
} else {
|
||||||
|
if (VIR_STRDUP(def->os.cmdline, extra) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xenXMConfigGetULongLong(conf, "memory", &def->mem.cur_balloon,
|
if (xenXMConfigGetULongLong(conf, "memory", &def->mem.cur_balloon,
|
||||||
|
Loading…
Reference in New Issue
Block a user