File: fai-diskimage.8

package info (click to toggle)
fai 6.5.5
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 2,072 kB
  • sloc: sh: 6,722; perl: 5,622; makefile: 138
file content (94 lines) | stat: -rw-r--r-- 3,154 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.\"                                      Hey, EMACS: -*- nroff -*-
.TH fai-diskimage 8 "December 2023" "FAI 6"

.SH NAME
fai-diskimage \- create a disk image for booting a VM
.SH SYNOPSIS
.B fai-diskimage \fIimagename\fR
.SH DESCRIPTION
.B fai-diskimage
creates a disk image that can be used with Qemu/KVM, VirtualBox,
VMware, Xen, Android device or by your cloud infrastructure. It runs the Fully
Automatic Installation using a list of FAI classes. In the end you
have a bootable disk image. Following formats are
supported: .raw, .raw.xz, .raw.zst, .qcow2, .qcow2.zst, .vdi, .vhdx, .vmdk, .simg.
.SH OPTIONS
.TP
.B \-c, --class \fICLASS\fR[,\fICLASS\fR]
Define list of FAI classes
.TP
.B \-C CFDIR
Use CFDIR as the configuration directory. Default is /etc/fai.
.TP
.B -h, --help
Print help
.TP
.B -N, --new
This option will be passed to the fai call. It then executes the
scripts in class/[0-9]* for defining classes.
.TP
.B -S, --size \fISIZE\fR
Set size of raw image (suffixes k M G T are supported)
.TP
.B -s, \--cspace \fIURI\fR
Location of the config space. If location starts with /, the prefix
file:// will be added. See fai.conf(5) for all supported
protocols. Default is /srv/fai/config.
.TP
.B -u, --hostname \fIname\fR
Set hostname to name
.TP
.B -v, --verbose
Be verbose

.SH EXAMPLES

First, setup the configuration space. You will get an initial
configuration including several examples.

 # fai-mk-configspace

You can now build your fist disk image.

 # export FAI_BASEFILEURL=https://fai-project.org/download/basefiles/
 # cl="DEBIAN,BOOKWORM64,AMD64,FAIBASE,GRUB_PC,DHCPC,DEMO,CLOUD,LAST"
 # fai-diskimage -vu cloud3 -S2G -c$cl cloud.raw

Creates a Debian system with a small set of software packages without
a graphical desktop. The disk image cloud.raw will be of size 2 GB and
the host is called cloud3.


 # export FAI_BASEFILEURL=https://fai-project.org/download/basefiles/
 # export NIC1=ens3
 # cl=DEBIAN,FAIBASE,UBUNTU,JAMMY64,AMD64,GRUB_PC,DHCPC,XORG,DEMO,LAST
 # fai-diskimage -vNu ubuntu -S15G -c$cl ubuntu.qcow2

Creates a disk image of size 15GB called ubuntu.qcow2 for a Ubuntu 22.04 desktop.
You have to set the variable NIC1 to the name of the network
interface inside the environment you will run this disk image. Here,
ens3 is the network name inside a KVM/QEMU virtual machine.

.SH NOTES
fai-diskimage will use zerofree if it's available on the host for
getting better compression of the raw images.

fai-diskimage is not limited to creating images for virtual
machines. The raw images can also be copied (via dd) onto a real disk
for booting bare metal hosts.

You can start fai-diskimage in a clean shell environment by calling:

 # env -i /usr/sbin/fai-diskimage -vNu cloudhost -S5G -cBOOKWORM64,CLOUD disk.raw


You can also build cross-architecture disk images using
fai-disimage. See the chapter "Building cross-architecture disk
images" in the FAI guide for details.

.SH SEE ALSO
.br
This program is part of FAI (Fully Automatic Installation).  See the FAI manual
for more information on how to use fai-monitor.  The FAI homepage is https://fai-project.org.
.SH AUTHOR
Thomas Lange <lange@cs.uni-koeln.de>