From aa50d02f36015f1367974dfe4ed0a239cf5a374b Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 9 Jun 2015 11:57:13 +0200 Subject: [PATCH] builder: add a doc snippet about firstboot scripts Document basic information about them for Linux and Windows guests. --- builder/virt-builder.pod | 39 +++++++++++++++++++++++++++++++++++++++ generator/customize.ml | 6 ++++++ 2 files changed, 45 insertions(+) diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod index b68845bcb..aa19ea2ad 100644 --- a/builder/virt-builder.pod +++ b/builder/virt-builder.pod @@ -805,6 +805,45 @@ In any case, the C<~USER/.ssh> directory and the C<~USER/.ssh/authorized_keys> file will be created if not existing already. +=head2 FIRST BOOT SCRIPTS + +The I<--firstboot> and I<--firstboot-command> options allow you to +execute commands at the first boot of the guest. To do so, an init +script for the guest init system is installed, which takes care of +running all the added scripts and commands. + +Supported operating systems are: + +=over 4 + +=item Linux + +Init systems supported are: systemd, System-V init (known also as sysvinit), +and Upstart (using the System-V scripts). + +Note that usually init scripts run as root, but with a more limited +environment than what could be available from a normal shell: +for example, C<$HOME> may be unset or empty. + +The output of the first boot scripts is available in the guest as +F<~root/virt-sysprep-firstboot.log>. + +=item Windows + +F, available from sources at +L, is installed to run the +first boot scripts. It is required, and the setup of first boot +scripts will fail if it is not present. + +F is copied from the location pointed to by the +C environment variable; if not set, a compiled-in +default will be used (something like F). + +The output of the first boot scripts is available in the guest as +F. + +=back + =head2 INSTALLATION PROCESS When you invoke virt-builder, installation proceeds as follows: diff --git a/generator/customize.ml b/generator/customize.ml index 2980d3966..f57aba64a 100644 --- a/generator/customize.ml +++ b/generator/customize.ml @@ -148,6 +148,9 @@ conveniently wraps the command up in a single line script for you. You can have multiple I<--firstboot> options. They run in the same order that they appear on the command line. +Please take a look at L for more +information and caveats about the first boot scripts. + See also I<--run>."; }; @@ -162,6 +165,9 @@ boots up (as root, late in the boot process). You can have multiple I<--firstboot> options. They run in the same order that they appear on the command line. +Please take a look at L for more +information and caveats about the first boot scripts. + See also I<--run>."; };