Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
snf-image-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
snf-image-creator
Commits
7094b43e
Commit
7094b43e
authored
Aug 05, 2014
by
Nikos Skalkotos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the documentation with the latest changes
parent
d97aa927
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
73 deletions
+86
-73
docs/overview.rst
docs/overview.rst
+1
-1
docs/usage.rst
docs/usage.rst
+85
-72
No files found.
docs/overview.rst
View file @
7094b43e
...
@@ -22,7 +22,7 @@ Those operations will:
...
@@ -22,7 +22,7 @@ Those operations will:
* Shrink the image
* Shrink the image
* Clear out sensitive user data (passwords, ssh keys, history files, etc.)
* Clear out sensitive user data (passwords, ssh keys, history files, etc.)
* Prepare the guest OS for being deployed on a virtual environment (change
* Prepare the guest OS for being deployed on a virtual environment (change
device names, remove persistent net rules, etc.)
device names, remove persistent net rules,
install VirtIO drivers,
etc.)
Creation
Creation
========
========
...
...
docs/usage.rst
View file @
7094b43e
...
@@ -49,14 +49,16 @@ snf-mkimage receives the following options:
...
@@ -49,14 +49,16 @@ snf-mkimage receives the following options:
--disable-sysprep=SYSPREP
--disable-sysprep=SYSPREP
prevent SYSPREP operation from running on the input
prevent SYSPREP operation from running on the input
media
media
--install-virtio=DIR install VirtIO drivers hosted under DIR (Windows only)
--print-sysprep-params
--print-sysprep-params
print the
needed sysprep parameters for this input
print the
defined system preparation parameters for
media
this input
media
--sysprep-param=SYSPREP_PARAMS
--sysprep-param=SYSPREP_PARAMS
A
dd KEY=VALUE system preparation parameter
a
dd KEY=VALUE system preparation parameter
--no-sysprep don't perform any system preparation operation
--no-sysprep don't perform any system preparation operation
--no-shrink don't shrink any partition
--public register image with the cloud as public
--public register image with the cloud as public
--allow-unsupported proceed with the image creation even if the media is
not supported
--tmpdir=DIR create large temporary image files under DIR
--tmpdir=DIR create large temporary image files under DIR
Most input options are self-describing. If you want to save a local copy of
Most input options are self-describing. If you want to save a local copy of
...
@@ -65,10 +67,9 @@ image to the storage service of a cloud, provide valid cloud API access info
...
@@ -65,10 +67,9 @@ image to the storage service of a cloud, provide valid cloud API access info
(by either using a token and a URL with *-t* and *-a* respectively, or a cloud
(by either using a token and a URL with *-t* and *-a* respectively, or a cloud
name with *-c*) and a remote filename using *-u*. If you also want to register
name with *-c*) and a remote filename using *-u*. If you also want to register
the image with the compute service of the cloud, in addition to *-u* provide a
the image with the compute service of the cloud, in addition to *-u* provide a
registration name using *-r*. All images are
registration name using *-r*. All images are registered as *private*. Only the
registered as *private*. Only the user that registers the image can create
user that registers the image can create VM's out of it. If you want the image
VM's out of it. If you want the image to be visible by other user too, use the
to be visible by other user too, use the *--public* option.
*--public* option.
By default, before extracting the image, snf-mkimage will perform a
By default, before extracting the image, snf-mkimage will perform a
number of system preparation operations on the snapshot of the media and will
number of system preparation operations on the snapshot of the media and will
...
@@ -81,69 +82,74 @@ input media. The user can enable or disable specific *syspreps*, using
...
@@ -81,69 +82,74 @@ input media. The user can enable or disable specific *syspreps*, using
*-{enable,disable}-sysprep* options. The user may specify those options
*-{enable,disable}-sysprep* options. The user may specify those options
multiple times.
multiple times.
Running *snf-mkimage* with *--print-sysprep* on a raw file that hosts a
Running *snf-mkimage* with *--print-sysprep* on a raw file that hosts a
n
Debian system, we
print the following output:
Ubuntu system, will
print the following output:
.. _sysprep:
.. _sysprep:
.. code-block:: console
.. code-block:: console
$ snf-mkimage --print-syspreps ubuntu.raw
$ snf-mkimage --print-syspreps ubuntu.raw
snf-image-creator 0.6
=====================
snf-image-creator 0.7
Examining source media `ubuntu_hd.raw' ... looks like an image file
===========================
Snapshotting media source ... done
Examining source media `ubuntu.raw' ... looks like an image file
Enabling recovery proc
Snapshotting media source ... done
Launching helper VM (may take a while) ... done
Enabling recovery proc
Inspecting Operating System ... ubuntu
Launching helper VM (may take a while) ... done
Mounting the media read-only ... done
Inspecting Operating System ... ubuntu
Collecting image metadata ... done
Collecting image metadata ... done
Umounting the media ... done
Running OS inspection:
Enabled system preparation operations:
Checking if the media contains logical volumes (LVM)... no
cleanup-cache:
Remove all regular files under /var/cache
Enabled system preparation operations:
cleanup-tmp:
cleanup-log:
Remove all files under /tmp and /var/tmp
Empty all files under /var/log
remove-swap-entry:
cleanup-passwords:
Remove swap entry from /etc/fstab. If swap is the last partition
Remove all passwords and lock all user accounts
then the partition will be removed when shrinking is performed. If the
swap partition is not the last partition in the disk or if you are not
cleanup-tmp:
going to shrink the image you should probably disable this.
Remove all files under /tmp and /var/tmp
cleanup-cache:
cleanup-userdata:
Remove all regular files under /var/cache
Delete sensitive userdata
cleanup-userdata:
fix-acpid:
Delete sensitive user data
Replace acpid powerdown action scripts to immediately shutdown the
system without checking if a GUI is running.
cleanup-passwords:
Remove all passwords and lock all user accounts
remove-persistent-net-rules:
Remove udev rules that will keep network interface names persistent
cleanup-log:
after hardware changes and reboots. Those rules will be created again
Empty all files under /var/log
the next time the image runs.
remove-persistent-net-rules:
remove-swap-entry:
Remove udev rules that will keep network interface names persistent
Remove swap entry from /etc/fstab. If swap is the last partition
after hardware changes and reboots. Those rules will be created again
then the partition will be removed when shrinking is performed. If the
the next time the image runs.
swap partition is not the last partition in the disk or if you are not
going to shrink the image you should probably disable this.
use-persistent-block-device-names:
Scan fstab & grub configuration files and replace all non-persistent
use-persistent-block-device-names:
device references with UUIDs.
Scan fstab & grub configuration files and replace all non-persistent
device references with UUIDs.
fix-acpid:
Replace acpid powerdown action scripts to immediately shutdown the
Disabled system preparation operations:
system without checking if a GUI is running.
cleanup-mail:
Remove all files under /var/mail and /var/spool/mail
shrink:
Shrink the last file system and update the partition table
remove-user-accounts:
Remove all user accounts with id greater than 1000
Disabled system preparation operations:
remove-user-accounts:
Remove all user accounts with id greater than 1000
cleaning up ...
cleanup-mail:
Remove all files under /var/mail and /var/spool/mail
cleaning up ...
If you want the image to have all normal user accounts and all mail files
If you want the image to have all normal user accounts and all mail files
removed, you should use *--enable-sysprep* option like this:
removed, you should use *--enable-sysprep* option like this:
...
@@ -152,6 +158,15 @@ removed, you should use *--enable-sysprep* option like this:
...
@@ -152,6 +158,15 @@ removed, you should use *--enable-sysprep* option like this:
$ snf-mkimage --enable-sysprep cleanup-mail --enable-sysprep remove-user-accounts ...
$ snf-mkimage --enable-sysprep cleanup-mail --enable-sysprep remove-user-accounts ...
Sysprep parameters are parameters used by some sysprep tasks. In most cases you
don't need to change their value. You can see the available sysprep parameters
and the default values they have by using the *--print-sysprep-params* option.
You can update their values by using the *--sysprep-param* option.
If the media is a Windows image, you can install or update its VirtIO drivers
by using the *--install-virtio* option. With this option you can point to a
directory that hosts a set of extracted Windows VirtIO drivers.
Dialog-based version
Dialog-based version
====================
====================
...
@@ -191,6 +206,7 @@ provide the following basic information:
...
@@ -191,6 +206,7 @@ provide the following basic information:
* Name: A short name for the image (ex. "Slackware")
* Name: A short name for the image (ex. "Slackware")
* Description: An one-line description for the image
* Description: An one-line description for the image
(ex. "Slackware Linux 14.0 with KDE")
(ex. "Slackware Linux 14.0 with KDE")
* VirtIO: A directory that hosts VirtIO drivers (for Windows images only)
* Registration Type: Private or Public
* Registration Type: Private or Public
After confirming, the image will be extracted, uploaded to the storage service
After confirming, the image will be extracted, uploaded to the storage service
...
@@ -209,8 +225,8 @@ process. The main menu can be seen in the picture below:
...
@@ -209,8 +225,8 @@ process. The main menu can be seen in the picture below:
In the *Customize* sub-menu the user can control:
In the *Customize* sub-menu the user can control:
* The installation of VirtIO drivers (only for Windows images)
* The system preparation operations that will be applied on the media
* The system preparation operations that will be applied on the media
* Whether the image will be shrunk or not
* The properties associated with the image
* The properties associated with the image
* The configuration tasks that will run during image deployment
* The configuration tasks that will run during image deployment
...
@@ -338,11 +354,8 @@ if a system can boot with para-virtualized disk controller by launching it with
...
@@ -338,11 +354,8 @@ if a system can boot with para-virtualized disk controller by launching it with
kvm using the *if=virtio* option (see the kvm command in the
kvm using the *if=virtio* option (see the kvm command in the
`Creating a new image`_ section).
`Creating a new image`_ section).
For Windows and older FreeBSD systems (prior to 9.2), the needed drivers need
For Windows the program supports installing VirtIO drivers. You may download
to be manually downloaded and installed on the media before the image creation
the latest drivers from the
process takes place. For *FreeBSD* the virtio drivers can be found
`here <http://people.freebsd.org/~kuriyama/virtio/>`_. For Windows the drivers
are hosted by the
`Fedora Project <http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/>`_.
`Fedora Project <http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/>`_.
Some caveats on image creation
Some caveats on image creation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment