Wednesday, November 7, 2012

KVM with PXE boot

I have done this in ubuntu 12.04 version.


It is not very tough to boot a kvm image with PXE server...

if you have a pxe server ready in your network then you can go ahead with the following steps.

=>First install the following things..
      qemu, kvm-qemu, bridge-utils, uml-utilities
      sudo apt-get install qemu kvm-qemu bridge-utils uml-utilities

=>Then on the host machine create the bridge interface and tap interface..
      this work is done in my last post-- http://thelinuxtricks.blogspot.in/2012/07/creating-and-binding-bridge-interface.html

=> After creating the interfaces, now you are ready with the weapons, its time to use them
   1.  open terminal
   2.  create a hard disk image
      qemu-img create -f vmdk  testpxe.vmdk 10G
   3. type in terminal
      sudo kvm -hda testpxe.vmdk -boot n -option-rom /usr/share/kvm/pxe-rtl8139.rom -net nic,model=rtl8139 -net tap,ifname=tap0,script=no,downscript=no

That's All, now a screen will come up with pxe boot enable, and will start booting from pxe server.
      

  

No comments:

Post a Comment