add support for using pvgrub to boot paravms
authorAdam Glasgall <glasgall@mit.edu>
Mon, 9 Jun 2014 17:48:51 +0000 (13:48 -0400)
committerAdam Glasgall <glasgall@mit.edu>
Mon, 9 Jun 2014 17:51:25 +0000 (13:51 -0400)
debian/changelog
debian/control
invirt-database

index a4ab8b3..577bd69 100644 (file)
@@ -1,3 +1,9 @@
+invirt-xen-config (0.0.54) precise; urgency=low
+
+  * Add support for using pvgrub to boot paravms.
+
+ -- Adam Glasgall <glasgall@mit.edu>  Mon, 09 Jun 2014 13:47:59 -0400
+
 invirt-xen-config (0.0.53) unstable; urgency=low
 
   * Fix machine UUID assignment after SQLAlchemy started returning Unicode
index 3bb1dd0..60216a7 100644 (file)
@@ -10,7 +10,7 @@ Architecture: all
 Depends: ${misc:Depends}, dsniff, lvm2, grub-pc,
  xen-hypervisor-4.1, xen-utils-4.1, xen-tools, invirt-base,
  bridge-utils, python-sqlalchemy, python-psycopg2, invirt-database,
- ethtool
+ ethtool, pvgrub
 Provides: ${diverted-files}
 Conflicts: ${diverted-files}
 Description: Xen configuration for Invirt host
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))