mirror of
https://github.com/AlmaLinux/ks2rootfs.git
synced 2024-11-22 01:23:08 +00:00
21 lines
467 B
Bash
21 lines
467 B
Bash
#!/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
|