KS-LIBVIRT(1)
π ks-libvirt β the manual, but make it bestie π
okay so. you know how you have a Fedora/CentOS/RHEL kickstart file just sitting there, being all text and potential? ks-libvirt takes that file and turns it into an actual VM. no cap. it's giving "automation main character energy" and honestly? we're obsessed. π
this is a User Contributed Perl Documentation page, and yes bestie, it's for ks-libvirt(1). let's get into it. β¨
πΈ NAME πΈ
ks-libvirt β Take a Fedora/CentOS/RHEL kickstart file and make a VM π¦
β¨ SYNOPSIS β¨
ks-libvirt [options] kickstart-file
At the end of install, if the VM is not shut down with --off and the guest agent is not excluded with --noaddga, the script waits until the VM is up and an IPv4 address is configured; it will clean any previous SSH host keys for that IP and then print the IP, so if you have an SSH key defined, you can do:
ssh -l root $(ks-libvirt kickstart-file)
the way that it just hands you the IP and you ssh straight inβ¦ iconic. periodt. π
π OPTIONS π
--addga|-aβ addqemu-guest-agentto%packages; default is to do this, use--noaddgato disable. without the agent, the hypervisor cannot get the IP of the VM (or do other VM management). so like, lowkey important π«Ά--anaconda|-Aarguments` β extra anaconda boot arguments- *
--arch*architecture** β use an alternate CPU architecture (this usually will require additionalqemu-system-<arch>` to be installed); this probably doesn't work with secureboot β οΈ - *
--config|-C*config** β config file for defaults; default is$HOME/.virtinst.cf` - *
--cpu|-c*count** β VM CPU cores; default is1` - *
--disk|-d*GB** β VM disk size in gigabytes; default is6`. can be specified more than once to create additional disks π --dnsDNS-IPs` β set the DNS server(s) (can be specified more than once for multiple servers); default: copy host DNS config when IPv4 address is set--dumpks|-Dβ generate a modified kickstart file and dump to standard out (don't build VM)--graphicsβ add a graphics console; default is to do this, use--nographicsto disable--gwIPv4-gateway` β set the IPv4 gateway--hostname|-hFQDN` β set the hostname; default is to not set unless network is set, then use the VM name- *
--ip*IPv4-address/mask** β set the IPv4 address and netmask (in bits, e.g.10.0.0.1/24`); default is to try DHCP (if network needed) --iso|-iISO` β ISO to boot from; default is pulled from KS or to use URL instead. handles a local ISO file (will be uploaded to same pool as VM storage if needed), or pool/volume for an ISO already in a storage pool. π- *
--libvirt|-l*URL** β connection to libvirt; default is$VIRTSH_DEFAULT_CONNECT_UIDorqemu:///system` - *
--machine*machine** β use an alternate machine type rather than the default (e.g.q35` for x86_64) - *
--mapfile|-m*file** β URL map file to use different source repos. the format of the file is one entry per line with a pair of URLs separated by a space. the first URL is the original (which can be a mirrorlist or metalink) followed by a target URL to replace it with (mirrorlist/metalink are turned into direct url entries). the default is$HOME/.virtinst-map` - *
--name|-n*name** β VM name; default is KS file name minus any leading"ks-"` - *
--net|-N*bridge -or- net spec** β network interface, can be specified more than once. if argument is a bridge interface, attach a VM NIC to the bridge. otherwise can be a full network description tovirt-install`, like:
--net direct,source=enp3s0
default is bridge interface with default route or none if that's not a bridge. set to "none" to disable default. use "DEFAULT" to get default bridge when creating more than one NIC. π§
--off|-Oβ leave the VM off at the end of install--pool|-ppool` β storage pool name; use pool default by default--os|-oOS` β OS name, used to set VM hardware config; default is autodetect--quiet|-qβ be very quiet - only show errors and IP at end π€«- *
--ram|-r*MB** β VM RAM size in megabytes; default is2048` unless specified in the KS --screen|-sβ open the VM console screen during install--secureboot|-Bβ enable Secure Boot (implies UEFI).--serial|-Sβ add a serial console; default is to do this, use--noserialto disable--sshβ add found SSH key(s) to the installed system; default is to do this, use--nosshto disable π--sshscanβ add VM's SSH host keys after boot; default is to do this, use--nosshscanto disable--tpmβ add TPM device--uefi|-uβ use UEFI boot instead of BIOS--vdeleteβ delete an existing VM with the same name before creating new (NOTE: will not ask for confirmation!) π--verbose|-vβ be more verbose- *
--virtinst|-V*arguments** β additionalvirt-install` arguments (can be used more than once) --vsockβ enable vsock for SSH access; default is to do this, use--novsockto disable
bestie. --vdelete does NOT ask first. it will just yeet that VM. be so careful. π
π¦ SPECIAL KICKSTART FILE LINES π¦
the KS file is parsed for lines that look like #<tag>:<value>. #include pulls in additional files, while the other options set default values (that can still be overridden on the command line).
supported tags:
#include:fileβ include another file - this can be a full path or relative to the kickstart file itself. HTTP/HTTPS URLs are also supported. includes can appear more than once, including in included files. π#CPU:coresβ number of CPU cores#RAM:MBβ RAM size in megabytes#DISK:GBβ disk size in gigabytes#ISO:[pool/]fileβ ISO file/volume to use for install#OS:OS stringβ operating system (only needed if not autodetected)#(NO)SSH:1β add/don't add SSH keys#(NO)TPM:1β add/don't add TPM device#(NO)UEFI:1β use/don't use UEFI boot#ARCH:architectureβ CPU architecture (for emulated system)#MACHINE:typeβ machine type (for emulated system)
π AUTHOR π
Written by Chris Adams π
πΈ COPYRIGHT πΈ
Copyright 2022 Chris Adams. License: GPLv3
and that's the whole page, bestie π this was perl v5.42.3, dated 2026-08-14. go build some VMs, you absolute icon. πβ¨π¦
π¦ where this page comes from
- fedora 43: ks-install 0-0.15.20260814git06dff32.fc43 Β· GPL-3.0-only
- fedora 44: ks-install 0-0.15.20260814git06dff32.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms