Xenpvnetboot

From Xen
Revision as of 10:49, 27 March 2012 by StefanoStabellini (talk | contribs) (Created page with "= xenpvnetboot = A network bootloader for Xen PV guests. '''xenpvnetboot''' supports getting boot images from the following locations: - http://host/path - https://host/path …")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

xenpvnetboot

A network bootloader for Xen PV guests.

xenpvnetboot supports getting boot images from the following locations:

- http://host/path
- https://host/path
- ftp://host/path
- file:///path
- tftp://host/path
- nfs:host:/path
- /path
- /path/file.iso
- /path/filesystem.img
- /dev/sda1
- nfs+iso:host:/path/file.iso
- nfs+iso:host:/path/filesystem.img

To use it, set xenpvnetboot as bootloader in the VM config file:

   bootloader = '/usr/bin/xenpvnetboot'

To get boot images from various locations, set the right bootloader arguments:

   bootloarder_args = ['--location=http://192.168.0.1/fedora/x86_64']
   bootloarder_args = ['--location=ftp://192.168.0.1/fedora/x86_64']
   bootloarder_args = ['--location=file:///fedora/x86_64']
   bootloarder_args = ['--location=tftp://192.168.0.1/fedora/x86_64']
   bootloarder_args = ['--location=/fedora/x86_64']
   bootloarder_args = ['--location=/fedora/Fedora-16-x86_64-DVD.iso']
   bootloarder_args = ['--location=nfs:192.168.0.1:/fedora/x86_64']
   bootloarder_args = ['--location=nfs+iso:192.168.0.1:/fedora/Fedora-16-x86_64-DVD.iso']

You can use kernel and ramdisk in the VM config file to specify the relative path of the boot kernel and ramdisk: xenpvnetboot will join them with --location to find them:

   kernel = 'images/pxeboot/vmlinuz'
   ramdisk = 'images/pxeboot/initrd.img'
   bootloarder_args = ['--location=http://192.168.0.1/fedora/x86_64']
   kernel = 'fedora/x86_64/images/pxeboot/vmlinuz'
   ramdisk = 'fedora/x86_64/images/pxeboot/initrd.img'
   bootloarder_args = ['--location=http://192.168.0.1/']

You can also omit the --location option and specify the full URL for kernel and ramdisk directly:

   kernel = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/vmlinuz'
   ramdisk = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/initrd.img'

If only --location is specified and kernel and ramdisk are not specified, xenpvnetboot will search the following default paths under location for boot images:

   ('images/xen/vmlinuz', 'images/xen/initrd.img'), # Fedora <= 10 and OL = 5
   ('boot/i386/vmlinuz-xen', 'boot/i386/initrd-xen'), # openSUSE >= 10.2 and SLES >= 10
   ('boot/x86_64/vmlinuz-xen', 'boot/x86_64/initrd-xen'), # openSUSE >= 10.2 and SLES >= 10
   ('current/images/netboot/xen/vmlinuz', 'current/images/netboot/xen/initrd.gz'), # Debian
   ('images/pxeboot/vmlinuz', 'images/pxeboot/initrd.img'), # Fedora >=10 and OL >= 6
   ('isolinux/vmlinuz', 'isolinux/initrd.img'), # Fedora >= 10 and OL >= 6

xenpvnetboot requires the python module urlgrabber.