#endif
static int
-xenParseXLOS(virConfPtr conf, virDomainDefPtr def)
+xenParseXLOS(virConfPtr conf, virDomainDefPtr def, virCapsPtr caps)
{
size_t i;
if (STREQ(def->os.type, "hvm")) {
const char *boot;
- if (VIR_ALLOC(def->os.loader) < 0 ||
- xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0)
- return -1;
+ for (i = 0; i < caps->nguests; i++) {
+ if (STREQ(caps->guests[i]->ostype, "hvm") &&
+ caps->guests[i]->arch.id == def->os.arch) {
+ if (VIR_ALLOC(def->os.loader) < 0 ||
+ VIR_STRDUP(def->os.loader->path,
+ caps->guests[i]->arch.defaultInfo.loader) < 0)
+ return -1;
+ }
+ }
if (xenConfigGetString(conf, "boot", &boot, "c") < 0)
return -1;
if (xenParseConfigCommon(conf, def, caps, xendConfigVersion) < 0)
goto cleanup;
- if (xenParseXLOS(conf, def) < 0)
+ if (xenParseXLOS(conf, def, caps) < 0)
goto cleanup;
if (xenParseXLDisk(conf, def) < 0)
if (xenConfigSetString(conf, "builder", "hvm") < 0)
return -1;
- if (def->os.loader && def->os.loader->path &&
- xenConfigSetString(conf, "kernel", def->os.loader->path) < 0)
- return -1;
-
for (i = 0; i < def->os.nBootDevs; i++) {
switch (def->os.bootDevs[i]) {
case VIR_DOMAIN_BOOT_FLOPPY:
if ((machines = virCapabilitiesAllocMachines(x86_machines, nmachines)) == NULL)
goto cleanup;
if ((guest = virCapabilitiesAddGuest(caps, "hvm", VIR_ARCH_X86_64,
- "/usr/lib/xen/bin/qemu-dm", NULL,
+ "/usr/lib/xen/bin/qemu-system-i386",
+ "/usr/lib/xen/boot/hvmloader",
nmachines, machines)) == NULL)
goto cleanup;
machines = NULL;
goto cleanup;
if ((guest = virCapabilitiesAddGuest(caps, "xen", VIR_ARCH_X86_64,
- "/usr/lib/xen/bin/qemu-dm", NULL,
- nmachines, machines)) == NULL)
+ "/usr/lib/xen/bin/qemu-system-i386",
+ NULL,
+ nmachines, machines)) == NULL)
goto cleanup;
machines = NULL;
parallel = "none"
serial = "none"
builder = "hvm"
-kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
disk = [ "/dev/HostVG/XenGuest2,raw,hda,w,backendtype=phy", "/root/boot.iso,raw,hdc,r,backendtype=qdisk,devtype=cdrom" ]
usb = 1
parallel = "none"
serial = "none"
builder = "hvm"
-kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
disk = [ "/dev/HostVG/XenGuest2,raw,hda,w,backendtype=phy", "/var/lib/libvirt/images/XenGuest2-home,qcow2,hdb,w,backendtype=qdisk", "/root/boot.iso,raw,hdc,r,backendtype=qdisk,devtype=cdrom" ]
parallel = "none"
serial = "none"
builder = "hvm"
-kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
disk = [ "/dev/HostVG/XenGuest2,raw,hda,w,backendtype=phy", "/root/boot.iso,raw,hdc,r,backendtype=qdisk,devtype=cdrom" ]
sdl = 0