Xenpvnetboot: Difference between revisions

From Xen
Jump to navigationJump to search
No edit summary
No edit summary
Line 3: Line 3:
'''xenpvnetboot''' supports getting boot images from the following locations:
'''xenpvnetboot''' supports getting boot images from the following locations:


<pre>
- http://host/path
- http://host/path
- https://host/path
- https://host/path
Line 15: Line 16:
- nfs+iso:host:/path/file.iso
- nfs+iso:host:/path/file.iso
- nfs+iso:host:/path/filesystem.img
- nfs+iso:host:/path/filesystem.img
</pre>


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


<pre>
bootloader = 'xenpvnetboot'
bootloader = 'xenpvnetboot'
</pre>


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


<pre>
bootloarder_args = ['--location=http://192.168.0.1/fedora/x86_64']
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=ftp://192.168.0.1/fedora/x86_64']
Line 30: Line 35:
bootloarder_args = ['--location=nfs:192.168.0.1:/fedora/x86_64']
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']
bootloarder_args = ['--location=nfs+iso:192.168.0.1:/fedora/Fedora-16-x86_64-DVD.iso']
</pre>


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:
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:


<pre>
kernel = 'images/pxeboot/vmlinuz'
kernel = 'images/pxeboot/vmlinuz'
ramdisk = 'images/pxeboot/initrd.img'
ramdisk = 'images/pxeboot/initrd.img'
Line 40: Line 47:
ramdisk = 'fedora/x86_64/images/pxeboot/initrd.img'
ramdisk = 'fedora/x86_64/images/pxeboot/initrd.img'
bootloarder_args = ['--location=http://192.168.0.1/']
bootloarder_args = ['--location=http://192.168.0.1/']
</pre>


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


<pre>
kernel = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/vmlinuz'
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'
ramdisk = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/initrd.img'
</pre>


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


<pre>
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']
</pre>
If only '''--location''' is specified and '''kernel''' and '''ramdisk''' are not specified, xenpvnetboot will search the following default paths under location for boot images:

<pre>
('images/xen/vmlinuz', 'images/xen/initrd.img'), # Fedora <= 10 and OL = 5
('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/i386/vmlinuz-xen', 'boot/i386/initrd-xen'), # openSUSE >= 10.2 and SLES >= 10
Line 56: Line 90:
('images/pxeboot/vmlinuz', 'images/pxeboot/initrd.img'), # Fedora >=10 and OL >= 6
('images/pxeboot/vmlinuz', 'images/pxeboot/initrd.img'), # Fedora >=10 and OL >= 6
('isolinux/vmlinuz', 'isolinux/initrd.img'), # Fedora >= 10 and OL >= 6
('isolinux/vmlinuz', 'isolinux/initrd.img'), # Fedora >= 10 and OL >= 6
</pre>


'''xenpvnetboot''' requires the python module [http://urlgrabber.baseurl.org urlgrabber].
'''xenpvnetboot''' requires python module [http://urlgrabber.baseurl.org urlgrabber].


[[Category:Xen]]
[[Category:Xen]]

Revision as of 19:48, 26 March 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.