1
0
mirror of https://github.com/AlmaLinux/ks2rootfs.git synced 2024-11-22 09:33:08 +00:00
ks2rootfs/utils/create_iso_vm

21 lines
467 B
Plaintext
Raw Permalink Normal View History

2022-10-26 02:37:00 +00:00
#!/usr/bin/env bash
# Author: @LHKN
# Desc: Handy util to create VMs for testing
vm_name=$1
iso=$2
disk_size=$3
sudo virt-install \
--connect qemu:///system \
--name "$vm_name" \
--memory 16384 \
--vcpus "4" \
--cdrom "$iso" \
--os-variant almalinux8 \
--disk size="$disk_size",format=qcow2 \
--network network=default,model=virtio \
--video model=virtio \
--graphics vnc,listen=0.0.0.0 --noautoconsole \
--virt-type kvm