From fabecf92df2960e68624a32c7f0fc32fa480b53d Mon Sep 17 00:00:00 2001 From: laen Date: Wed, 5 Sep 2012 14:06:30 -0700 Subject: [PATCH] Add kernel-xen before removing kernel. Fixes https://issues.jboss.org/browse/BGBUILD-370 --- lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb b/lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb index b383f51..701f152 100644 --- a/lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb +++ b/lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb @@ -49,10 +49,10 @@ def execute @log.debug "'/etc/resolv.conf' uploaded." if (@appliance_config.os.name == 'rhel' or @appliance_config.os.name == 'centos') and @appliance_config.os.version == '5' - # Remove normal kernel - guestfs.sh("yum -y remove kernel") - # because we need to install kernel-xen package + # Install kernel-xen package guestfs_helper.sh("yum -y install kernel-xen", :arch => @appliance_config.hardware.arch) + # Then remove normal kernel. We don't need it anymore. + guestfs.sh("yum -y remove kernel") # and add require modules @linux_helper.recreate_kernel_image(guestfs, ['xenblk', 'xennet']) end