man page changes for imgimport and imgexport

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7406 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
linggao 2010-09-10 15:19:06 +00:00
parent 0df1f553e4
commit c648a14178
2 changed files with 118 additions and 29 deletions

View File

@ -6,28 +6,57 @@ B<imgexport> - Exports an xCAT image.
B<imgexport [-h| --help]>
B<imgexport [-v| --verbose] imagename exported_file_name >
B<imgexport> I<imagename>
B<imgexport image_name [destination] [[-e|--extra file:dir] ... ] [-p|--postscripts node_name] [-v|--verbose]>
=head1 DESCRIPTION
The imgexport command will export an image that is being used by xCAT. To export images, you must have the images defined in the osimage table.
The following columns must be filled out for an image to be exported:
osimage.imagename
osimage.profile
osimage.provmethod
osimage.osvers
osimage.osarch
The imgexport command will export an image that is being used by xCAT. To export images, you must have the images defined in the I<osimage> table. All the columns in the I<osimage> and I<linuximage> tables will be exported. In addition, the following files will also be exported.
For statefull:
x.pkglist
x.otherpkgs.pkglist
x.tmpl
x.synclist
For stateless:
kernel
intied.gz
rootimg.gz
x.pkglist
x.otherpkgs.pkglist
x.synclist
x.postinstall
x.exlist
For statelite:
intied.gz
x.pkglist
x.synclist
x.otherpkgs.pkglist
x.postinstall
x.exlist
where x is the name of the profile.
Any files specified by the -e flag will also be exported. If -p flag is specified, the postscripts and the postbootscripts for the given node will be exported.
=head1 OPTIONS
B<-h> Display usage message.
B<-e|--extra> I<srcfile:destdir> Pack up extra files. If I<destdir> is omitted, the destination directory will be the same as the source directory.
B<-v> Verbose output.
B<-h|--help> Display usage message.
B<-p|--postscripts> I<node_name> Get the postscripts for the given node and pack it into the image.
B<-v|--verbose> Verbose output.
I<image_name> The name of the image. Use I<lsdef -t> osimage to find out all the image names.
I<destination> The output bundle file name.
B<-extra srcfile:destdir> Pack up extra files
=head1 RETURN VALUE
@ -41,17 +70,19 @@ B<-extra srcfile:destdir> Pack up extra files
B<imgexport foo>
foo.tgz will be built in the current working directory. Make sure that you have enough space in the directory
that you are in to run imgexport if you have a big image to tar up.
foo.tgz will be built in the current working directory. Make sure that you have enough space in the directory that you are in to run imgexport if you have a big image to tar up.
2. To include extra files with your image:
B<imgexport Default_Stateless_1265981465 foo.tgz --extra=/opt/xcat/share/xcat/netboot/centos/compute.centos5.4.pkglist:/install/custom/netboot/centos --extra=/opt/xcat/share/xcat/netboot/centos/compute.exlist:/install/custom/netboot/centos>
B<imgexport Default_Stateless_1265981465 foo.tgz -e /install/postscripts/myscript1 -e /tmp/mydir:/usr/mydir>
This will export the image Default_stateless_1265981465 into a file called foo.tgz. In addition, it will package up extra files as well:
compute.centos5.4.pkglist
compute.exlist
It will also place the contents of the file in the manifest.xml file that is part of the bundle.
In addition to all the default files, this will export I</install/postscripts/myscript1> and the whole directory I</tmp/dir> into the file called foo.tgz. And when imgimport is called I</install/postscripts/myscript1> will be copied into the same directory and I</tmp/mydir> will be copied to I</usr/mydir>.
3. To include postscripts with your image:
B<imgexport Default_Stateless_1265981465 foo.tgz -p node1>
The I<postscripts> and the I<postbootscripts> specified in the I<postscripts> table for node1 will be exported into the image.
=head1 FILES

View File

@ -1,25 +1,75 @@
=head1 NAME
B<imgimport> - Imports an xCAT image or configuration file into the xCAT tables so that you can immediately begin
deploying with it..
B<imgimport> - Imports an xCAT image or configuration file into the xCAT tables so that you can immediately begin deploying with it.
=head1 SYNOPSIS
B<imgimport [-h| --help]>
B<imgimport [-h|--help]>
B<imgimport> I<imagename> [-v]
B<imgimport> bundle_file_name [-p|--postscripts nodelist] [-f|--profile new_profile] [-v|--verbose]>
=head1 DESCRIPTION
The imgimport command will import an image that has been exported by imgexport from xCAT. This is the easiest way
to transfer/backup/ or share images created by xCAT whether they be stateless or stateful.
The imgimport command will import an image that has been exported by I<imgexport> from xCAT. This is the easiest way to transfer/backup/, change or share images created by xCAT whether they be stateless or stateful. The bundle file will be unpacked in the current working directory. The xCAT configuration such as I<osimage> and I<linuximage> tables will then be updated.
For statefull, the following files will be copied to the appropriate directories.
x.pkglist
x.otherpkgs.pkglist
x.tmpl
x.synclist
For stateless, the following files will be copied to the appropriate directories.
kernel
intied.gz
rootimg.gz
x.pkglist
x.otherpkgs.pkglist
x.synclist
x.postinstall
x.exlist
For statelite, the following files will be copied to the appropriate directories.
intied.gz
x.pkglist
x.synclist
x.otherpkgs.pkglist
x.postinstall
x.exlist
where x is the profile name.
Any extra files, included by --extra flag in the imgexport command, will also be copied to the appropriate directories.
If -p flag is specified, the I<postscripts> table will be updated with the postscripts and the postbootscripts from the image for the nodes given by this flag.
If -f flag is not specified, all the files will be copied to the same directories as the source. If it is specified, the old profile name x will be changed to the new and the files will be copied to the appropriate directores for the new profiles. For example, I</opt/xcat/share/xcat/netboot/sles/x.pkglist> will be copied to I</install/custom/netboot/sles/compute_new.pkglist> and I</install/netboot/sles11/ppc64/x/kernel> will be copied to I</install/netboot/sles11/ppc64/compute_new/kernel>. This flag is commonly used when you want to copy the image on the same xCAT mn so you can make modification on the new one.
After this command, you can run the I<nodeset> command and then start deploying the nodes. You can also choose to modify the files and run the following commands before the node depolyment.
For statefull:
nodeset
For stateless:
genimage
packimage
nodeset
For statelite
genimage
liteimg
nodeset
=head1 OPTIONS
B<-h> Display usage message.
B<-f|--profile> I<new_prof> Import the image with a new profile name.
B<-v> Verbose output.
B<-h|--help> Display usage message.
B<-p|--postscripts> I<nodelist> Import the postscripts. The postscripts contained in the image will be set in the postscripts table for I<nodelist>.
B<-v|--verbose> Verbose output.
=head1 RETURN VALUE
@ -34,8 +84,16 @@ B<-v> Verbose output.
I<imgimport foo.gz>
foo.tgz will be unpacked in the current working directory. The xCAT configuration will then be updated and the
files will be copied to the appropriate directories.
2. Import the image with postscripts
I<imgimport foo.gz -p node1,node2>
3. Import the image with a new profile name
I<imgimport foo.gz -f compute_test>
=head1 FILES