Presentation is loading. Please wait.

Presentation is loading. Please wait.

Enabling Palacios PXE-Boot Chen Jin Bharath Pattabiraman Patrick Foley.

Similar presentations


Presentation on theme: "Enabling Palacios PXE-Boot Chen Jin Bharath Pattabiraman Patrick Foley."— Presentation transcript:

1 Enabling Palacios PXE-Boot Chen Jin Bharath Pattabiraman Patrick Foley

2 What is PXE? Preboot eXecution Environment - a standard for booting an OS from the network. Most machines’ BIOSes support PXE. But, the BIOS used by Palacios does not. Capability to boot independent of data storage devices (like hard disks) or installed OS'es. Defined on the foundation of widely used internet protocols such as DHCP, and TFTP.

3 Our Goal Add PXE network boot support to a Palacios guest so that we can network-boot VMs. o Change the BIOS (or) o Find any other alternative solution

4 How does it work? Step 1: Client makes DHCP request (broadcast) for IP address Step 2: DHCP Server responds with IP address and also the next-server, which is the IP address of the boot server that contains the bootloader. It also sends the file name that should be used for booting. Step 3: Client contacts the boot server (using the TFTP - Trivial FTP protocol)

5 How does it work? (contd...) Step 4: Boot server replies with bootloader. Step 5: Client loads bootloader into memory. Step 6: Boot loader retrieves other files needed for booting from boot server and starts the booting process. The files required to be present in the TFTP server are: pxelinux.0 - boot loader for linux-like OS for PXE bzImage - the compressed kernel image init_task - the initial root filesystem

6 How does it work?

7 Client and Server setup Server side o DHCP and TFTP server running on server side o Knoppix (debian-based OS) which has these servers preinstalled was used on one Qemu o Configured the servers and created a hard drive image Client side o Kitten/Palacios running on another Qemu

8 Server side Setup DHCP Server configuration: subnet 172.21.0.0 netmask 255.255.0.0 { range 172.21.0.3 172.21.0.100; option broadcast-address 172.21.0.255; } group { next-server 172.21.0.2; host test { fixed-address 172.21.0.50; hardware ethernet 52:54:00:12:34:57; filename "pxelinux.0"; }

9 Server side Setup TFTP Server setup: When a client boots up it will check if there is a file corresponding to its own MAC address in the /var/lib/tftpboot/pxelinux.cfg/ directory. However after trying several options it will fall back to requesting a default file. So, we simply changed to default file to contain the configuration we want. DEFAULT kitten LABEL kitten kernel bzImage append serial.baud=115200 console=serial initrd=init_task The pxelinux.0, bzImage and init_task files were placed in the tftpboot directory

10 Implementation Create a test bench for PXE booting, which need consider both server and client o Hard drive image o Tap device o VLAN Boot guest os in kitten o Boot PXE on client direcly to make sure rom omatic approcach working o NIC problems

11 Server Hard drive image o i n order to avoid reconfiguring the system every time we use the Qemu, we decided to create hard drive image which saves all the configuration status.

12 Server (cont'd) Default o "-net nic -net user Tap device o Host  Create the /dev/net/tun device node mkdir /dev/net mknod /dev/net/tun c 10 200  Setup the tap0 interface, sudo tunctl //Create the tap0 interface using tunctl sudo ifconfig tap0 192.168.100.1 up o guest -net tap,ifname=tap0 enter 192.168.100.2 as the ip address

13 Tap Device -net tap,ifname=tap0

14 VLAN -net nic,vlan=0,macaddr=52:54:00:12:34:56,model=e1000 Server-client connection NIC Guest OS VLAN 0 … tap socket

15 VLANs -net nic,vlan=0,macaddr=52:54:00:12:34:56,model=e1000 -net socket,vlan=0,listen=localhost:9000 -net nic,vlan=2,macaddr=52:54:00:12:34:57,model=ne2k_pci -net socket,vlan=2,connect=localhost:9000 NIC Guest A VLAN 0 … socket NIC Guest B VLAN 2 … tap socket tap

16 gPXE Reboot the client machine with gpxe iso image http://rom-o-matic.net/ It worked, yeah! Happiness didn’t last long

17 Final Step Is it possible to start a VM that contains just gpxe.

18 Reboot Guest in kitten/palacios PCI NICs o E1000 / rtl8139  DMA execution: the devices write to Guest physical memory directly. (offset is needed) o ne2k_pci (there is no gpxe iso image available) ne2k_isa o Requests from client are delivered, however the packets sent from server are dropped o Port I/O to receive the packets o NIC device interrupt is not handled Modification in Palacios o v3_hook_passthrough_irq(...) o v3_raise_irq(...)

19 A lot of thanks to Prof.Dinda and Lei Xia!


Download ppt "Enabling Palacios PXE-Boot Chen Jin Bharath Pattabiraman Patrick Foley."

Similar presentations


Ads by Google