Ask Your Question
3

PXE/TFTP boot VM Instance within OpenStack

asked 2014-07-22 01:29:41 -0500

Thiru gravatar image

Hi there,

I am trying to PXE/TFTP Boot a Virtual Machine instance from inside my Open-stack Deployement, i have deployed a instance to PXE boot & TFTP inside my Openstack Compute Node & have disabled the DHCP Option for my Internal Networks.

I would like to know what further has to be Done for the instances to PXE boot.

My Deployment is based on Mirantis Fuel 5.0,comprising of 3 Controller Node,3 Ceph-OSD node & 2 Compute Nodes all in HA Configuration with Ubuntu 12.04.4 LTS with VLAN Networking Enabled.

Thanks!! Thiru

edit retag flag offensive close merge delete

Comments

Already heared about Ironic? Despite it is supposed to be used for baremetal deployment you can use it to start nested VMs described in this tutorial

Brenne gravatar imageBrenne ( 2014-07-22 02:13:20 -0500 )edit

Hi Brenne,

I have heard about Ironic in Mirantis 5.0 ,we dont have Ironic since its not production ready,I would like to know if there is any Hack in Openstack to get the PXE /TFTP boot working ?

Regards Thiru

Thiru gravatar imageThiru ( 2014-07-24 02:47:18 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-07-28 14:11:50 -0500

rooter gravatar image

updated 2014-10-30 15:47:08 -0500

As far as I know there's no way to force OpenStack to create a VM which simply PXE boots.

What we do is use a simple, custom, OpenStack image which contains a bootloader and an iPXE client. Works like a charm.

-- edit: we PXE boot from neutron's DHCP (to allow neutron to assign the IP to the VM, so that we don't have to worry about IP spoofing) and then via DHCP options we redirect the VMs to our own PXE/TFTP server. (Sorry, I don't have any code at hand to share).

edit flag offensive delete link more

Comments

Hi,

Can you share some more details. How did you build the image, was there any configuration changes on Openstack?

I've tried booting from an iPXE iso, the machine boots but does not receive any dhcp offers from my foreman. I was wondering if Openstack itself was blocking the dhcp offers

DaveJ gravatar imageDaveJ ( 2014-10-30 09:03:09 -0500 )edit

IceHouse blocks rouge DHCP servers. Basically you cannot start a VM and have it be a DHCP server. 1st, you have to patch the openstack code which creates the iptables rules, and have it not ban dhcp traffic. Then you need to disable openstack ip spoofing protection (or use allowed-address-pairs)

rooter gravatar imagerooter ( 2014-10-30 15:41:50 -0500 )edit

Alternatively, you can have your DHCP server be on the flat network (and be a physical node, not managed by neutron). Then you only have to take care of the IP spoofing protection (because by default iptables for VMs allows only traffic from the IP which has been assigned to it by Neutron)

rooter gravatar imagerooter ( 2014-10-30 15:43:09 -0500 )edit

Hi rooter. Juts saw your edit 'we PXE boot from neutron's DHCP'. If you have an opportunity to share how you set it up, I'd appreciate it. I assume its something along the lines of exit dnsmasq.conf and add dhcp-option=66,"192.168.254.20" ?

DaveJ gravatar imageDaveJ ( 2014-10-31 02:10:25 -0500 )edit

Hi rooter, I am trying to host DHCP server in one of the VMs. I want to create a flat NW with the DHCP server in one of the VMs providing IP. Currently, the DHCP server receives DHCP DISCOVER and also responds with DHCP OFFER. But the DHCP OFFER does not reach the VM that sent DHCP DISCOVER

rkbug gravatar imagerkbug ( 2015-09-04 05:40:48 -0500 )edit
3

answered 2014-10-31 00:16:09 -0500

Vinod Pandarinathan gravatar image

You can create pxe image as mentioned here http://kimizhang.wordpress.com/2013/08/26/create-pxe-boot-image-for-openstack/ (http://kimizhang.wordpress.com/2013/0...)

Also you might need to disable dhcp on neutron network and open up security groups (allow UDP)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

3 followers

Stats

Asked: 2014-07-22 01:29:41 -0500

Seen: 8,840 times

Last updated: Oct 31 '14