From 2f310f865b2a264bcad2a9fe15535e0d0df56f7a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Instructions for building a PXE boot image. --- .hgignore | 2 ++ Makefile.in | 24 ++++++++++++++++++++++++ TODO | 2 -- configure.ac | 3 +++ virt-p2v.1 | 41 ++++++++++++++++++++++++++++++++--------- virt-p2v.1.html | 35 +++++++++++++++++++++++++++-------- virt-p2v.1.txt | 34 +++++++++++++++++++++++++++------- virt-p2v.pod | 36 +++++++++++++++++++++++++++++------- 8 files changed, 144 insertions(+), 33 deletions(-) diff --git a/.hgignore b/.hgignore index d31fe3a..7b3d0f6 100644 --- a/.hgignore +++ b/.hgignore @@ -3,6 +3,7 @@ \.iso$ \.img$ ^virt-p2v-.*\.tar\.gz$ +^virt-p2v-.*\.tar$ ^livecd\.ks$ ^livecd-test\.ks$ ^livecd-post\.sh$ @@ -13,3 +14,4 @@ ^config\.status$ ^Makefile$ ^p2v\.ks$ +^tftpboot/ \ No newline at end of file diff --git a/Makefile.in b/Makefile.in index 413c43c..aa8d8b4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -30,6 +30,7 @@ HAVE_PERLDOC := @HAVE_PERLDOC@ HAVE_QEMU := @HAVE_QEMU@ HAVE_QEMU_KVM := @HAVE_QEMU_KVM@ HAVE_LIVECD_CREATOR := @HAVE_LIVECD_CREATOR@ +HAVE_LIVECD_ISO_TO_PXEBOOT := @HAVE_LIVECD_ISO_TO_PXEBOOT@ LABEL := $(PACKAGE)-$(VERSION) ISO := $(LABEL).iso @@ -42,6 +43,7 @@ all: @echo " Boot built/named ISO (uses qemu)" @echo "make update Update an existing live CD ISO with new" @echo " virt-p2v script, without doing full rebuild" + @echo "make pxe Build a PXE image (in tftpboot/ subdirectory)" @echo "make man Make man pages (needs POD)" # Build live CD. @@ -87,6 +89,15 @@ update: checkroot checkscript -./iso-attach delete $(ISO) 2>/dev/null ./iso-attach add $(ISO) virt-p2v +# PXE boot. + +ifeq ($(HAVE_LIVECD_ISO_TO_PXEBOOT),livecd-iso-to-pxeboot) + +pxe: checkroot checkscript + livecd-iso-to-pxeboot $(ISO) + +endif + # Check that we are root. checkroot: @@ -158,9 +169,22 @@ website: man dist cp virt-p2v.1.css $(WEBSITE_DIR) cp $(PACKAGE)-$(VERSION).tar.gz $(WEBSITE_DIR) +# Upload everything. + +upload: upload_iso upload_pxe + # Upload ISO. upload_iso: scp -l 300 $(ISO) et.redhat.com:public_html/tmp/ +# Upload PXE image. + +PXE_TAR := $(PACKAGE)-$(VERSION)-pxeboot.tar + +upload_pxe: + tar cf $(PXE_TAR) tftpboot + scp -l 300 $(PXE_TAR) et.redhat.com:public_html/tmp/ + rm $(PXE_TAR) + .PHONY: build boot checkroot \ No newline at end of file diff --git a/TODO b/TODO index 87c5a3a..c2b0d8e 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,3 @@ -PXE boot shell script, documentation, upload to site. - # Detect if network is already present, and don't try to set it up again # (for PXE boot case). diff --git a/configure.ac b/configure.ac index 6f147e5..1fa4752 100644 --- a/configure.ac +++ b/configure.ac @@ -81,6 +81,9 @@ fi dnl Check for recommended livecd-creator (for building ISOs). AC_CHECK_PROG(HAVE_LIVECD_CREATOR,livecd-creator,livecd-creator) +dnl Check for optional livecd-iso-to-pxeboot. +AC_CHECK_PROG(HAVE_LIVECD_ISO_TO_PXEBOOT,livecd-iso-to-pxeboot,livecd-iso-to-pxeboot) + dnl Check for optional perldoc (for building manual pages). AC_CHECK_PROG(HAVE_PERLDOC,perldoc,perldoc) diff --git a/virt-p2v.1 b/virt-p2v.1 index 9020837..67c5e15 100644 --- a/virt-p2v.1 +++ b/virt-p2v.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "VIRT-P2V 1" -.TH VIRT-P2V 1 "2008-02-07" "virt-p2v-0.9.3" "Virtualization Support" +.TH VIRT-P2V 1 "2008-02-12" "virt-p2v-0.9.6" "Virtualization Support" .SH "NAME" virt\-p2v \- P2V (physical to virtual machine) migration tool .SH "SUMMARY" @@ -156,13 +156,17 @@ machine over the network to the virtualization host machine over ssh. Therefore \f(CW\*(C`sshd\*(C'\fR must be running on the virtualization host, and must be accessible to that host. See \fB\s-1SERVER\s0 \s-1REQUIREMENTS\s0\fR section below. .PP -The \f(CW\*(C`virt\-p2v\*(C'\fR script must only be run from the live \s-1CD\s0. It isn't -designed to run outside this environment and could do Bad Things to -your machine if you try it. The script contains some checks to try to -stop you from doing this. +The \f(CW\*(C`virt\-p2v\*(C'\fR script must only be run from the live \s-1CD\s0 environment. +It isn't designed to run outside this environment and could do Bad +Things to your machine if you try it. The script contains some checks +to try to stop you from doing this. .PP Virt\-p2v does not modify the physical machine, its disks, configuration etc. +.PP +\&\s-1USB\s0 key and \s-1PXE\s0 boot options are also available. See sections +\&\fB\s-1PXE\s0 \s-1BOOTING\s0\fR and \fB\s-1BOOTING\s0 \s-1FROM\s0 A \s-1USB\s0 \s-1KEY\s0\fR +below. .SH "STANDARD USAGE" .IX Header "STANDARD USAGE" After booting the live \s-1CD\-R\s0, you are presented with a series of @@ -574,10 +578,29 @@ or the equivalent manual command: .Vb 1 \& ./iso-attach virt-p2v-VERSION.iso virt-p2v .Ve -.SH "BOOTING FROM A USB KEY INSTEAD OF A CD" -.IX Header "BOOTING FROM A USB KEY INSTEAD OF A CD" -If you wish to boot from a \s-1USB\s0 keydrive, use the livecd-iso-to-disk -tool: +.PP +Note that \s-1ISO\s0 attachments only work with real (and emulated) CD\-Rs, +not with other methods of booting such as \s-1USB\s0 keys and \s-1PXE\s0. +.SH "PXE BOOTING" +.IX Header "PXE BOOTING" +If you wish to boot over the network using \s-1PXE\s0, use the +\&\f(CW\*(C`livecd\-iso\-to\-pxeboot\*(C'\fR script (part of \f(CW\*(C`livecd\-tools\*(C'\fR). +.PP +.Vb 1 +\& livecd-iso-to-pxeboot virt-p2v-$VERSION.iso +.Ve +.PP +then copy the generated subdirectory \f(CW\*(C`tftpboot/\*(C'\fR to the +right place for your \s-1PXE\s0 configuration. +.PP +Pre-built \s-1PXE\s0 boot images are also available on the website. +.PP +General configuration of \s-1DHCP\s0, \s-1TFTP\s0 and \s-1PXE\s0 for network booting are +outside the scope of this document. +.SH "BOOTING FROM A USB KEY" +.IX Header "BOOTING FROM A USB KEY" +If you wish to boot from a \s-1USB\s0 keydrive, use the \f(CW\*(C`livecd\-iso\-to\-disk\*(C'\fR +script (part of \f(CW\*(C`livecd\-tools\*(C'\fR): .PP .Vb 1 \& livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1 diff --git a/virt-p2v.1.html b/virt-p2v.1.html index a4fa6e5..579808f 100644 --- a/virt-p2v.1.html +++ b/virt-p2v.1.html @@ -38,7 +38,8 @@
  • ISO ATTACHMENTS
  • -
  • BOOTING FROM A USB KEY INSTEAD OF A CD
  • +
  • PXE BOOTING
  • +
  • BOOTING FROM A USB KEY
  • TESTING AN ISO UNDER QEMU OR KVM
  • MAILING LIST
  • SEE ALSO
  • @@ -77,12 +78,15 @@ CUSTOM LIVE CD section below.

    machine over the network to the virtualization host machine over ssh. Therefore sshd must be running on the virtualization host, and must be accessible to that host. See SERVER REQUIREMENTS section below.

    -

    The virt-p2v script must only be run from the live CD. It isn't -designed to run outside this environment and could do Bad Things to -your machine if you try it. The script contains some checks to try to -stop you from doing this.

    +

    The virt-p2v script must only be run from the live CD environment. +It isn't designed to run outside this environment and could do Bad +Things to your machine if you try it. The script contains some checks +to try to stop you from doing this.

    Virt-p2v does not modify the physical machine, its disks, configuration etc.

    +

    USB key and PXE boot options are also available. See sections +PXE BOOTING and BOOTING FROM A USB KEY +below.


    @@ -601,12 +605,27 @@ built an existing virt-p2v-*.iso, you can just do:

    or the equivalent manual command:

      ./iso-attach virt-p2v-VERSION.iso virt-p2v
    +

    Note that ISO attachments only work with real (and emulated) CD-Rs, +not with other methods of booting such as USB keys and PXE.


    -

    BOOTING FROM A USB KEY INSTEAD OF A CD

    -

    If you wish to boot from a USB keydrive, use the livecd-iso-to-disk -tool:

    +

    PXE BOOTING

    +

    If you wish to boot over the network using PXE, use the +livecd-iso-to-pxeboot script (part of livecd-tools).

    +
    + livecd-iso-to-pxeboot virt-p2v-$VERSION.iso
    +

    then copy the generated subdirectory tftpboot/ to the +right place for your PXE configuration.

    +

    Pre-built PXE boot images are also available on the website.

    +

    General configuration of DHCP, TFTP and PXE for network booting are +outside the scope of this document.

    +

    +

    +
    +

    BOOTING FROM A USB KEY

    +

    If you wish to boot from a USB keydrive, use the livecd-iso-to-disk +script (part of livecd-tools):

      livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1

    (Replace /dev/sdX1 with the actual USB device).

    diff --git a/virt-p2v.1.txt b/virt-p2v.1.txt index 81ded16..22682f8 100644 --- a/virt-p2v.1.txt +++ b/virt-p2v.1.txt @@ -24,14 +24,17 @@ DESCRIPTION Therefore "sshd" must be running on the virtualization host, and must be accessible to that host. See SERVER REQUIREMENTS section below. - The "virt-p2v" script must only be run from the live CD. It isn't - designed to run outside this environment and could do Bad Things to your - machine if you try it. The script contains some checks to try to stop - you from doing this. + The "virt-p2v" script must only be run from the live CD environment. It + isn't designed to run outside this environment and could do Bad Things + to your machine if you try it. The script contains some checks to try to + stop you from doing this. Virt-p2v does not modify the physical machine, its disks, configuration etc. + USB key and PXE boot options are also available. See sections PXE + BOOTING and BOOTING FROM A USB KEY below. + STANDARD USAGE After booting the live CD-R, you are presented with a series of questions. This section explains each question. @@ -396,9 +399,26 @@ BUILDING A CUSTOM LIVE CD ./iso-attach virt-p2v-VERSION.iso virt-p2v -BOOTING FROM A USB KEY INSTEAD OF A CD - If you wish to boot from a USB keydrive, use the livecd-iso-to-disk - tool: + Note that ISO attachments only work with real (and emulated) CD-Rs, not + with other methods of booting such as USB keys and PXE. + +PXE BOOTING + If you wish to boot over the network using PXE, use the + "livecd-iso-to-pxeboot" script (part of "livecd-tools"). + + livecd-iso-to-pxeboot virt-p2v-$VERSION.iso + + then copy the generated subdirectory "tftpboot/" to the right place for + your PXE configuration. + + Pre-built PXE boot images are also available on the website. + + General configuration of DHCP, TFTP and PXE for network booting are + outside the scope of this document. + +BOOTING FROM A USB KEY + If you wish to boot from a USB keydrive, use the "livecd-iso-to-disk" + script (part of "livecd-tools"): livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1 diff --git a/virt-p2v.pod b/virt-p2v.pod index 6978b2f..5b57631 100644 --- a/virt-p2v.pod +++ b/virt-p2v.pod @@ -27,14 +27,18 @@ machine over the network to the virtualization host machine over ssh. Therefore C must be running on the virtualization host, and must be accessible to that host. See B section below. -The C script must only be run from the live CD. It isn't -designed to run outside this environment and could do Bad Things to -your machine if you try it. The script contains some checks to try to -stop you from doing this. +The C script must only be run from the live CD environment. +It isn't designed to run outside this environment and could do Bad +Things to your machine if you try it. The script contains some checks +to try to stop you from doing this. Virt-p2v does not modify the physical machine, its disks, configuration etc. +USB key and PXE boot options are also available. See sections +B and B +below. + =head1 STANDARD USAGE After booting the live CD-R, you are presented with a series of @@ -469,10 +473,28 @@ or the equivalent manual command: ./iso-attach virt-p2v-VERSION.iso virt-p2v -=head1 BOOTING FROM A USB KEY INSTEAD OF A CD +Note that ISO attachments only work with real (and emulated) CD-Rs, +not with other methods of booting such as USB keys and PXE. + +=head1 PXE BOOTING + +If you wish to boot over the network using PXE, use the +C script (part of C). + + livecd-iso-to-pxeboot virt-p2v-$VERSION.iso + +then copy the generated subdirectory C to the +right place for your PXE configuration. + +Pre-built PXE boot images are also available on the website. + +General configuration of DHCP, TFTP and PXE for network booting are +outside the scope of this document. + +=head1 BOOTING FROM A USB KEY -If you wish to boot from a USB keydrive, use the livecd-iso-to-disk -tool: +If you wish to boot from a USB keydrive, use the C +script (part of C): livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1 -- 1.8.3.1