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:
parent
5b08b30d90
commit
7c701a524a
20
utils/create_vm
Normal file
20
utils/create_vm
Normal 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
|
Loading…
Reference in New Issue
Block a user