1KS-LIBVIRT(1) User Contributed Perl Documentation KS-LIBVIRT(1)
2
3
4
6 ks-libvirt - Take a Fedora/CentOS/RHEL kickstart file and make a VM
7
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
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 --config | -C config
29 Config file for defaults; default is $HOME/.virtinst.cf
30
31 --cpu | -c count
32 VM CPU cores; default is 1
33
34 --disk | -d GB
35 VM disk size in gigabytes; default is 6
36
37 --disk2 GB
38 VM second disk size in gigabytes; default is to not use a
39 second disk (this is mostly just useful for testing kickstart
40 RAID handling)
41
42 --dns DNS-IPs
43 Set the DNS server(s) (can be specified more than once for
44 multiple servers); default: copy host DNS config when IPv4
45 address is set
46
47 --dumpks | -D
48 Generate a modified kickstart file and dump to standard out
49 (don't build VM)
50
51 --gw IPv4-gateway
52 Set the IPv4 gateway
53
54 --hostname | -h FQDN
55 Set the hostname; default is to not set unless network is set,
56 then use the VM name
57
58 --ip IPv4-address/mask
59 Set the IPv4 address and netmask (in bits, e.g. 10.0.0.1/24);
60 default is to try DHCP (if network needed)
61
62 --iso | -i ISO
63 ISO to boot from; default is pulled from KS or to use URL
64 instead. Handles a local ISO file (will be uploaded to same
65 pool as VM storage if needed), or pool/volume for an ISO
66 already in a storage pool.
67
68 --libvirt | -l URL
69 Connection to libvirt; default is $VIRTSH_DEFAULT_CONNECT_UID
70 or qemu:///system
71
72 --mapfile | -m file
73 URL map file to use different source repos. The format of the
74 file is one entry per line with a pair of URLs separated by a
75 space. The first URL is the original (which can be a
76 mirrorlist or metalink) followed by a target URL to replace it
77 with (mirrorlist/metalink are turned into direct url entries).
78 The default is $HOME/.virtinst-map
79
80 --name | -n name
81 VM name; default is KS file name minus any leading "ks-"
82
83 --net | -N interface
84 Bridge network interface to attach to; default is interface
85 with default route
86
87 --off | -O
88 Leave the VM off at the end of install
89
90 --pool | -p pool
91 Storage pool name; use pool default by default
92
93 --os | -o OS
94 OS name, used to set VM hardware config; default is autodetect
95
96 --quiet | -q
97 Be very quiet - only show errors and IP at end
98
99 --ram | -r MB
100 VM RAM size in megabytes; default is 2048 unless specified in
101 the KS
102
103 --screen | -s
104 Open the VM console screen during install
105
106 --secureboot | -B
107 Enable Secure Boot (implies UEFI).
108
109 --securepath [path]
110 Specify the path to the Secure Boot loader/NVRAM files (default
111 is /usr/share/edk2/ovmf)
112
113 --serial | -S
114 Add a serial console; default is to do this, use --noserial to
115 disable
116
117 --ssh Add found SSH key(s) to the installed system; default is to do
118 this, use --nossh to disable
119
120 --tpm Add TPM device
121
122 --uefi | -u
123 Use UEFI boot instead of BIOS
124
125 --vdelete
126 Delete an existing VM with the same name before creating new
127 (NOTE: will not ask for confirmation!)
128
129 --verbose | -v
130 Be more verbose
131
132 --virtinst | -V arguments
133 Additional virt-install arguments (can be used more than once)
134
136 The KS file is parsed for lines that look like #<tag>:<value>.
137 #include pulls in additional files, while the other options set default
138 values (that can still be overridden on the command line).
139
140 Supported tags:
141
142 #include:file
143 Include another file - this can be a full path or relative to
144 the kickstart file itself. HTTP/HTTPS URLs are also supported.
145 Includes can appear more than once, including in included
146 files.
147
148 #CPU:cores
149 Number of CPU cores
150
151 #RAM:MB RAM size in megabytes
152
153 #DISK:GB
154 Disk size in gigabytes
155
156 #DISK2:GB
157 Second disk size in gigabytes
158
159 #ISO:[pool/]file
160 ISO file/volume to use for install
161
162 #OS:OS string
163 Operating system (only needed if not autodetected)
164
165 #(NO)SSH:1
166 Add/don't add SSH keys
167
168 #(NO)TPM:1
169 Add/don't add TPM device
170
171 #(NO)UEFI:1
172 Use/don't use UEFI boot
173
175 Written by Chris Adams
176
178 Copyright 2022 Chris Adams. License: GPLv3
179
180
181
182perl v5.34.1 2022-04-15 KS-LIBVIRT(1)