add support for using pvgrub to boot paravms
[invirt/packages/invirt-xen-config.git] / invirt-database
index b99b548..31e4b85 100644 (file)
@@ -50,6 +50,10 @@ if machine_type.hvm:
     codepath = 'hvm'
 else:
     codepath = 'paravm'
+    if machine_type.type_id = 'linux-pvgrub':
+        use_pvgrub = True
+    else:
+        use_pvgrub = False
 
 if 'installer_options' in locals(): #Installer
     import shlex
@@ -116,8 +120,10 @@ if codepath == 'hvm':
     device_model = '/usr/sbin/qemu-dm-invirt'
     serial = "pty"
 elif codepath == 'paravm':
-    bootloader = '/usr/bin/pygrub'
-
+    if use_pvgrub:
+        kernel = '/usr/lib/grub/grub.xen'
+    else:
+        bootloader = '/usr/bin/pygrub'
 
 for n in machine.nics:
     check(re.match('^[0-9a-fA-F:]+$', n.mac_addr) and re.match('^[0-9.]*$', n.ip))