Xenpvnetboot: Difference between revisions
ZhigangWang (talk | contribs) No edit summary |
Cechevarne (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
A network bootloader for Xen PV guests. |
=A network bootloader for Xen PV guests.= |
||
'''xenpvnetboot''' supports getting boot images from the following locations: |
'''xenpvnetboot''' supports getting boot images from the following locations: |
||
Line 93: | Line 93: | ||
'''xenpvnetboot''' requires python module [http://urlgrabber.baseurl.org urlgrabber]. |
'''xenpvnetboot''' requires python module [http://urlgrabber.baseurl.org urlgrabber]. |
||
=Common problems= |
|||
Xen by default tries to write the bootloader files into "/run/". This size of this partition is determined by the RAM size of dom0. In some cases this partition has not enough space to allocate kernel and ramdisk files. In this cases you can specificy another directory with the following option: |
|||
--output-directory=OUTPUT_DIRECTORY |
|||
[[Category:Xen]] |
[[Category:Xen]] |
Revision as of 11:17, 8 May 2015
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 = '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'
These 4 ways are equivalent:
bootloader_args = ['--location', 'http://192.168.0.1/'] kernel = 'OL6/images/pxeboot/vmlinuz' ramdisk = 'OL6/images/pxeboot/initrd.img' ---- bootloader_args = ['--location', 'http://192.168.0.1/OL6'] kernel = 'images/pxeboot/vmlinuz' ramdisk = 'images/pxeboot/initrd.img' ---- kernel = 'http://192.168.0.1/OL6/images/pxeboot/vmlinuz' ramdisk = 'http://192.168.0.1/OL6/images/pxeboot/initrd.img' ---- bootloader_args = ['--location', 'http://192.168.0.1/OL6', '--kernel', 'images/pxeboot/vmlinuz', '--ramdisk', '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 python module urlgrabber.
Common problems
Xen by default tries to write the bootloader files into "/run/". This size of this partition is determined by the RAM size of dom0. In some cases this partition has not enough space to allocate kernel and ramdisk files. In this cases you can specificy another directory with the following option:
--output-directory=OUTPUT_DIRECTORY