public:virt-install_examples
This is an old revision of the document!
Table of Contents
virt-install examples
Windows 98
virt-install \ --virt-type kvm \ --name windows98-test \ --cdrom /Windows98.iso \ --os-variant win98 \ --graphics vnc,listen=0.0.0.0,password=foobar --noautoconsole \ --disk size=50 \ --memory 512 \ --network network=bridged
Windows Server 2022
virt-install \ --virt-type kvm \ --name windows2022-test \ --cdrom /SW_DVD9_Win_Server_STD_CORE_2022_2108.32_64Bit_English_DC_STD_MLF_X23-73837.ISO \ --os-variant win2k22 \ --graphics vnc,listen=0.0.0.0,password=foobar --noautoconsole \ --disk size=50 \ --memory 4096 \ --tpm backend.type=emulator,backend.version=2.0,model=tpm-tis \ --boot loader=/usr/share/OVMF/OVMF_CODE.secboot.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/OVMF/OVMF_VARS.ms.fd \ --network network=bridged
Windows 11
This example installs Windows 11 on a host with an emulated TPM, a 50 GB hard disk and 4 GB of memory.
virt-install \ --virt-type kvm \ --name windows11-test \ --cdrom /path/to/Win11Multi_21H2_English_x64v1.iso \ --os-variant win11 \ --graphics vnc,listen=0.0.0.0,password=foobar --noautoconsole \ --disk size=50 \ --memory 4096 \ --tpm backend.type=emulator,backend.version=2.0,model=tpm-tis \ --boot loader=/usr/share/OVMF/OVMF_CODE.secboot.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/OVMF/OVMF_VARS.ms.fd
Windows 10
See Windows 11 example, but you can ignore the tpm and boot options if you don't need them. Use win10 for the os-variant.
Debian 11
virt-install \ --virt-type kvm \ --name debian11-test \ --cdrom /debian11.iso \ --os-variant /debian11.iso \ --graphics vnc,listen=0.0.0.0,password=foobar --noautoconsole \ --disk size=50 \ --memory 4096 \ --tpm backend.type=emulator,backend.version=2.0,model=tpm-tis \ --boot loader=/usr/share/OVMF/OVMF_CODE.secboot.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/OVMF/OVMF_VARS.ms.fd \ --network network=bridged
Common useful options
This is the default option that is used for a network adapter. You can use it explicitly to e.g. generate a network adapter with a specific MAC address:
--network network=default,model=e1000,mac=00:11:22:33:44:55
public/virt-install_examples.1715627848.txt.gz · Last modified: by thomas
