1KS-LIBVIRT(1)         User Contributed Perl Documentation        KS-LIBVIRT(1)
2
3
4

NAME

6       ks-libvirt - Take a Fedora/CentOS/RHEL kickstart file and make a VM
7

SYNOPSIS

9       ks-libvirt [options] kickstart-file
10
11       At the end of install, if the VM is not shut down with --off and the
12       guest agent is not excluded with --noaddga, the script waits until the
13       VM is up and an IPv4 address is configured; it will clean any previous
14       SSH host keys for that IP and then print the IP, so if you have an SSH
15       key defined, you can do:
16
17               ssh -l root $(ks-libvirt kickstart-file)
18

OPTIONS

20       --addga | -a
21               Add qemu-guest-agent to %packages; default is to do this, use
22               --noaddga to disable. Without the agent, the hypvervisor cannot
23               get the IP of the VM (or do other VM management).
24
25       --anaconda | -A arguments
26               Additional anaconda boot arguments
27
28       --arch architecture
29               Use an alternate CPU architecture (this usually will require
30               additional qemu-system-<arch> to be installed); this probably
31               doesn't work with secureboot
32
33       --config | -C config
34               Config file for defaults; default is $HOME/.virtinst.cf
35
36       --cpu | -c count
37               VM CPU cores; default is 1
38
39       --disk | -d GB
40               VM disk size in gigabytes; default is 6
41
42       --disk2 GB
43               VM second disk size in gigabytes; default is to not use a
44               second disk (this is mostly just useful for testing kickstart
45               RAID handling)
46
47       --dns DNS-IPs
48               Set the DNS server(s) (can be specified more than once for
49               multiple servers); default: copy host DNS config when IPv4
50               address is set
51
52       --dumpks | -D
53               Generate a modified kickstart file and dump to standard out
54               (don't build VM)
55
56       --gw IPv4-gateway
57               Set the IPv4 gateway
58
59       --hostname | -h FQDN
60               Set the hostname; default is to not set unless network is set,
61               then use the VM name
62
63       --ip IPv4-address/mask
64               Set the IPv4 address and netmask (in bits, e.g. 10.0.0.1/24);
65               default is to try DHCP (if network needed)
66
67       --iso | -i ISO
68               ISO to boot from; default is pulled from KS or to use URL
69               instead.  Handles a local ISO file (will be uploaded to same
70               pool as VM storage if needed), or pool/volume for an ISO
71               already in a storage pool.
72
73       --libvirt | -l URL
74               Connection to libvirt; default is $VIRTSH_DEFAULT_CONNECT_UID
75               or qemu:///system
76
77       --machine machine
78               Use an alternate machine type rather than the default (e.g. q35
79               for x86_64)
80
81       --mapfile | -m file
82               URL map file to use different source repos.  The format of the
83               file is one entry per line with a pair of URLs separated by a
84               space.  The first URL is the original (which can be a
85               mirrorlist or metalink) followed by a target URL to replace it
86               with (mirrorlist/metalink are turned into direct url entries).
87               The default is $HOME/.virtinst-map
88
89       --name | -n name
90               VM name; default is KS file name minus any leading "ks-"
91
92       --net | -N interface
93               Bridge network interface to attach to; default is interface
94               with default route
95
96       --off | -O
97               Leave the VM off at the end of install
98
99       --pool | -p pool
100               Storage pool name; use pool default by default
101
102       --os | -o OS
103               OS name, used to set VM hardware config; default is autodetect
104
105       --quiet | -q
106               Be very quiet - only show errors and IP at end
107
108       --ram | -r MB
109               VM RAM size in megabytes; default is 2048 unless specified in
110               the KS
111
112       --screen | -s
113               Open the VM console screen during install
114
115       --secureboot | -B
116               Enable Secure Boot (implies UEFI).
117
118       --securepath [path]
119               Specify the path to the Secure Boot loader/NVRAM files (default
120               is /usr/share/edk2/ovmf)
121
122       --serial | -S
123               Add a serial console; default is to do this, use --noserial to
124               disable
125
126       --ssh   Add found SSH key(s) to the installed system; default is to do
127               this, use --nossh to disable
128
129       --tpm   Add TPM device
130
131       --uefi | -u
132               Use UEFI boot instead of BIOS
133
134       --vdelete
135               Delete an existing VM with the same name before creating new
136               (NOTE: will not ask for confirmation!)
137
138       --verbose | -v
139               Be more verbose
140
141       --virtinst | -V arguments
142               Additional virt-install arguments (can be used more than once)
143

SPECIAL KICKSTART FILE LINES

145       The KS file is parsed for lines that look like #<tag>:<value>.
146       #include pulls in additional files, while the other options set default
147       values (that can still be overridden on the command line).
148
149       Supported tags:
150
151       #include:file
152               Include another file - this can be a full path or relative to
153               the kickstart file itself.  HTTP/HTTPS URLs are also supported.
154               Includes can appear more than once, including in included
155               files.
156
157       #CPU:cores
158               Number of CPU cores
159
160       #RAM:MB RAM size in megabytes
161
162       #DISK:GB
163               Disk size in gigabytes
164
165       #DISK2:GB
166               Second disk size in gigabytes
167
168       #ISO:[pool/]file
169               ISO file/volume to use for install
170
171       #OS:OS string
172               Operating system (only needed if not autodetected)
173
174       #(NO)SSH:1
175               Add/don't add SSH keys
176
177       #(NO)TPM:1
178               Add/don't add TPM device
179
180       #(NO)UEFI:1
181               Use/don't use UEFI boot
182

AUTHOR

184       Written by Chris Adams
185
187       Copyright 2022 Chris Adams. License: GPLv3
188
189
190
191perl v5.38.0                      2023-07-20                     KS-LIBVIRT(1)
Impressum