aboutsummaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorIbrahim Mkusa <ibrahimmkusa@gmail.com>2024-08-10 14:46:48 -0400
committerIbrahim Mkusa <ibrahimmkusa@gmail.com>2024-08-10 14:46:48 -0400
commit05bc215be13604b5623167db3935b07a3acea04c (patch)
treed2e2eff2baf17d6f23e3e669b1bfa81dd570b6a6 /vms
parentde37038d1507a4906e260e5a2f2e47f85bf3b71d (diff)
virt-install quick reference script
Diffstat (limited to 'vms')
-rwxr-xr-xvms/virtinstall.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/vms/virtinstall.sh b/vms/virtinstall.sh
new file mode 100755
index 0000000..7ee13ae
--- /dev/null
+++ b/vms/virtinstall.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+# plug in your variables and run file to create vm via commandline
+# got tired of looking up man-pages everytime
+
+name=rhel9m1
+ram=2048
+vcpu=2
+path=/var/lib/libvirt/images/rhel9m1.qcow2
+size=20
+os_variant=rhel9.4
+path_iso=/home/$USER/Downloads/iso/rhel-9.4-x86_64-boot.iso
+
+# 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 \
+ --network bridge=virbr0,model=virtio \
+ --console pty,target_type=serial --location $path_iso