1
0
mirror of https://github.com/AlmaLinux/ks2rootfs.git synced 2024-12-23 04:23:08 +00:00

Create create_vm

This commit is contained in:
Bala Raman 2022-10-25 22:37:00 -04:00 committed by GitHub
parent 5b08b30d90
commit 7c701a524a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

20
utils/create_vm Normal file
View File

@ -0,0 +1,20 @@
#!/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