You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Yiping Zhang <yz...@marketo.com> on 2014/06/18 01:01:01 UTC

pxeboot CloudStack VM with external tftp server

Hi, All:

I just figured out how to PXE boot a CS VM with external tftp server.

Here is my environment setup:  we use Puppet + Foreman to manage our existing physical nodes. Now we just added a  CloudStack (4.3.0) instance running basic network mode on the same network.  So on this network, I now have two DHCP servers, managed by Foreman and CloudStack respectively, and one TFTP server managed by Foreman.

To make CS’s internal DHCP server to serve “next-server” option for pxeboot,  I added following line to /etc/dnsmasq.conf file on cloudstack virtual router, and restarted dnsmasq service after modification:


          dhcp-boot=pxelinux.0,tftp.example.com,10.0.0.10


(use your own tftp server name and ip address accordingly)


Here are the steps to pxeboot a CS VM:

 1.  Create an instance in CS. I  used an empty template, but you should be able to use any template you have.  If the VM boots up with local disk immediately, then just wipe out boot disk’s MBR block with dd cmd to render it non bootable.
 2.  Connect to instance’s console, you should see the VM is trying to pxeboot and fail, write down VM's MAC address and IP address.
 3.  In Foreman, create a new host using these MAC and IP addresses, generate all templates required for pxeboot and kickstart for the new host.
 4.  Go back to VM’s console, click on “Ctrl+Alt+Del” to reboot VM.  This time, the VM should be able to pxeboot successfully and start kickstart.

I am surprised that I just need to make a very simple one line modification to make this to work.  Hopefully, this feature can be incorporated into default CS virtual router configurations.

Have a good day.

Yiping