Boot guest OS with PXE [closed]

asked 2013-05-23 17:08:26 -0500

David Hill gravatar image

updated 2013-05-24 17:24:37 -0500

smaffulli gravatar image

I was trying to PXE boot a guest for quite some time now and I think I’ve found a solution that is kind of hackish but pretty simple. I’m not quite sure it’s good to go in trunk but felt like I’d share it since I’ve been messing a while on this. If anybody have a better solution, I would really like to hear/see/try it …

Here is how I did it:

First, patch the libvirt/ file:

 --- /usr/lib/python2.6/site-packages/nova/virt/libvirt/ 2013-05-10 16:25:17.787862177 +0000
 +++ /usr/lib/python2.6/site-packages/nova/virt/libvirt/ 2013-05-10 16:26:39.442022870 +0000
 @@ -87,6 +87,9 @@
 LOG = logging.getLogger(__name__)

libvirt_opts = [
 + cfg.StrOpt('default_guest_boot_dev',
 + default='hd',
 + help='Sets the default guest boot device'),
                 help='Rescue ami image'),
 @@ -1792,7 +1795,7 @@
 - guest.os_boot_dev = "hd"
 + guest.os_boot_dev = FLAGS.default_guest_boot_dev

         if FLAGS.libvirt_type != "lxc" and FLAGS.libvirt_type != "uml":
              guest.acpi = True

And add to nova.conf:


And finally add to /etc/dnsmasq.conf


And restart dnsmasq.conf

In my actual setup, the guest will PXE boot, show the menu 60 seconds and then boot from hard disk after the 60 seconds timeout.

edit retag flag offensive reopen merge delete

Closed for the following reason not a real question by smaffulli
close date 2013-05-24 17:25:50.957623


Hi Dave,

Thanks for posting your work - a useful feature for many, I'm sure.

Since this is related to extending OpenStack, I think a post on the development mailing list might get some good attention and help plan a way forward:

fifieldt gravatar imagefifieldt ( 2013-05-23 17:32:42 -0500 )edit

I've did that... Hopefully, I'll have some sort of answers because I don't want to have to maintain a parallel branch with my own set of patches for Nova!

David Hill gravatar imageDavid Hill ( 2013-05-24 09:11:32 -0500 )edit

Thanks Deechill! This was post was right on time. Very useful!

syspimp gravatar imagesyspimp ( 2013-06-02 09:46:04 -0500 )edit