2024-08-10 18:46:48 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# plug in your variables and run file to create vm via commandline
|
|
|
|
# got tired of looking up man-pages everytime
|
|
|
|
|
2024-08-10 23:18:00 +00:00
|
|
|
name=rhel9m2
|
2024-08-10 18:46:48 +00:00
|
|
|
ram=2048
|
|
|
|
vcpu=2
|
2024-08-10 23:18:00 +00:00
|
|
|
path=/var/lib/libvirt/images/rhel9m2.qcow2
|
2024-08-10 18:46:48 +00:00
|
|
|
size=20
|
|
|
|
os_variant=rhel9.4
|
2024-08-10 23:18:00 +00:00
|
|
|
path_iso=/home/$USER/Downloads/iso/rhel-9.4-x86_64-dvd.iso
|
2024-08-10 18:46:48 +00:00
|
|
|
|
|
|
|
# you can add the following optional arguments
|
|
|
|
# --graphics none
|
|
|
|
# kickstart files and such via the --extra-args argument
|
|
|
|
virt-install --name $name --ram $ram --vcpus $vcpu \
|
|
|
|
--disk path=$path,size=$size --os-variant $os_variant \
|
2024-08-10 23:18:00 +00:00
|
|
|
--location $path_iso
|