User Tools

Site Tools


public:virt-install_examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:virt-install_examples [2024/05/06 18:43] thomaspublic:virt-install_examples [2024/05/16 21:27] (current) – [MS-DOS 6.0] thomas
Line 1: Line 1:
 ====== virt-install examples ====== ====== virt-install examples ======
  
 +===== MS-DOS 6.0 =====
 +
 +<code>
 +virt-install \
 +--virt-type kvm \
 +--name msdos-test \
 +--os-variant msdos6.22 \
 +--graphics vnc,listen=0.0.0.0,password=foobar --noautoconsole \
 +--disk size=2 \
 +--memory 32 \
 +--disk path=/dos/Disk1.img,device=floppy \
 +--boot fd,hd,menu=on \
 +--import
 +</code>
 +
 +You can switch to a next floppy disk during installation with this command:
 +
 +<code>
 +virsh change-media msdos-test /dos/Disk1.img /dos/Disk2.img 
 +</code>
 +
 +===== Windows 98 =====
 +
 +Note that not all Windows 98 CD-ROMS are bootable. Most require a boot floppy. However, [[https://winworldpc.com/product/windows-98/98-second-edition|the OEM version of Windows 98 SE]] is bootable.
 +
 +<code>
 +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 128 \
 +--network model=rtl8139,network=bridged
 +</code>
 +
 +You need to connect to the guest before 10 seconds have passed to choose the correct boot option. If that is too short, then you can temporarily suspend the guest immediately after the virt-install command, connect via VNC, then resume the guest.
 +
 +Also, multiple reboots may be required to install this OS. You may need to set the CDROM as boot device for longer than just the first boot.
 +===== Windows XP =====
 +
 +<code>
 +virt-install \
 +--virt-type kvm \
 +--name windowsxp-test \
 +--cdrom /WindowsXP.iso \
 +--os-variant winxp \
 +--graphics vnc,listen=0.0.0.0,password=foobar \
 +--noautoconsole \
 +--disk pool=kvm,size=100 \
 +--memory 2048 \
 +--network model=rtl8139,network=bridged
 +</code>
 +
 +Special about this case, is that we use the ''winxp'' os variant, and the rtl8139 network adapter. The i1000 network adapter does not seem to be supported by default.
 +
 +===== Windows Server 2022 =====
 +
 +<code>
 +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
 +</code>
 ===== Windows 11 ===== ===== Windows 11 =====
  
Line 22: Line 94:
 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''. 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 =====
 +
 +<code>
 +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
 +</code>
 +
 +===== 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:
 +
 +<code>
 +--network network=default,model=e1000,mac=00:11:22:33:44:55
 +</code>
  
 {{tag>libvirt virt-install virsh kvm}} {{tag>libvirt virt-install virsh kvm}}
public/virt-install_examples.1715021010.txt.gz · Last modified: by thomas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki