Forrest logo
back to the virt-install tool

virt-install:tldr:58584

virt-install: Create a virtual machine and kickstart an automated deployment based on Fedora 35 using only remote resources (no ISO required).
$ virt-install --name ${vm_name} --memory ${2048} --disk path=${path-to-image-qcow2},size=${20} --location=${https:--download-fedoraproject-org-pub-fedora-linux-releases-35-Everything-x86_64-os-} --extra-args=${"inst-ks=https:--path-to-valid-kickstart-org"}
try on your machine

This command is using the "virt-install" utility to create a new virtual machine (VM) with specific settings. Let's break down the command:

  • virt-install: This is the command itself, used for creating virtual machines.

  • --name ${vm_name}: Specifies the name of the new virtual machine. "${vm_name}" is a placeholder that should be replaced with the desired name.

  • --memory ${2048}: Sets the amount of memory (RAM) for the virtual machine. "${2048}" is placeholder representing 2048 MB (2GB) of RAM.

  • --disk path=${path-to-image-qcow2},size=${20}: Defines the disk configuration for the virtual machine. "${path-to-image-qcow2}" should be replaced with the actual file path to the QCOW2 disk image file, and "${20}" represents the disk size in GB.

  • --location=${https:--download-fedoraproject-org-pub-fedora-linux-releases-35-Everything-x86_64-os-}: Specifies the installation media location for the virtual machine. "${https:--download-fedoraproject-org-pub-fedora-linux-releases-35-Everything-x86_64-os-}" is a placeholder that represents the URL from where the Fedora installation ISO can be downloaded.

  • --extra-args=${"inst-ks=https:--path-to-valid-kickstart-org"}: Provides additional arguments for the virtual machine installation process. "${inst-ks=https:--path-to-valid-kickstart-org}" represents the URL or file path to a valid Kickstart file, which is an automated installation script used by Fedora.

Overall, this command creates a virtual machine with a specified name, memory, disk configuration, installation media location, and additional installation arguments. It sets up the VM to install Fedora using a Kickstart file for automated configuration during the installation process.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the virt-install tool