From 8c87c4bf76ca2c04db14498150d23fdfd56b45f0 Mon Sep 17 00:00:00 2001 From: Bala Raman <1273137+srbala@users.noreply.github.com> Date: Tue, 25 Oct 2022 22:41:19 -0400 Subject: [PATCH] Create create_hdd_vm --- utils/create_hdd_vm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 utils/create_hdd_vm diff --git a/utils/create_hdd_vm b/utils/create_hdd_vm new file mode 100644 index 0000000..19fbd35 --- /dev/null +++ b/utils/create_hdd_vm @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Author: @LKHN +# Desc: Create VM using HDD file +name='rhel-8.7-beta-1-test-1' +memory='4096' +vcpus='2' +os_variant='almalinux8' # almalinux8, almalinux9, rhel9.0, centos-stream9 +disk='/var/lib/libvirt/images/rhel-8.7-beta-1-snapshot.qcow2' +CI_DATA='/var/lib/libvirt/images/cidata.iso' + +virt-install \ + --connect qemu:///system \ + --name "${name}" \ + --memory "${memory}" \ + --vcpus "${vcpus}" \ + --cpu host-passthrough \ + --os-variant "${os_variant}" \ + --disk "${disk}" \ + --disk "${CI_DATA}",device=cdrom \ + --virt-type kvm