From 67bdb231bbbc0dd6c8a8d6bf54ba12f4c4ff2ce9 Mon Sep 17 00:00:00 2001 From: Pablo Acevedo Montserrat Date: Tue, 6 Jun 2023 11:44:30 +0200 Subject: [PATCH 1/2] USHIFT-1297: Customize the iso in create-vm for image builder --- scripts/image-builder/create-vm.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/image-builder/create-vm.sh b/scripts/image-builder/create-vm.sh index 82fffe7feb..ac80442079 100755 --- a/scripts/image-builder/create-vm.sh +++ b/scripts/image-builder/create-vm.sh @@ -1,27 +1,24 @@ #!/bin/bash set -e -ROOTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )" -ISODIR=${ROOTDIR}/_output/image-builder - -if [ $# -ne 2 ] ; then - echo "Usage: $(basename "$0") " +if [ $# -ne 3 ] ; then + echo "Usage: $(basename "$0") " exit 1 fi VMNAME=$1 NETNAME=$2 -CDROM=$(ls -1 "${ISODIR}/microshift-installer-*.$(uname -m).iso" 2>/dev/null || true) +CDROM=$3 if [ ! -e "${CDROM}" ] ; then - echo "The image ISO '${CDROM}' file does not exist. Run 'make iso' to create it" + echo "The image ISO '${CDROM}' file does not exist." exit 1 fi sudo dnf install -y libvirt virt-manager virt-install virt-viewer libvirt-client qemu-kvm qemu-img sshpass if [ "$(systemctl is-active libvirtd.socket)" != "active" ] ; then - echo "Restart your host to initialize the virtualization environment" - exit 1 + echo "Enabling libvirtd" + sudo systemctl enable --now libvirtd fi # Necessary to allow remote connections in the virt-viewer application sudo usermod -a -G libvirt "$(whoami)" From 2953c2230a9baeb0ecc64ea53b6beaec5d69e3ef Mon Sep 17 00:00:00 2001 From: Pablo Acevedo Montserrat Date: Tue, 6 Jun 2023 14:14:59 +0200 Subject: [PATCH 2/2] USHIFT-1297: Add to docs --- docs/devenv_cloud.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/devenv_cloud.md b/docs/devenv_cloud.md index e67d998e6f..bb01aa062e 100644 --- a/docs/devenv_cloud.md +++ b/docs/devenv_cloud.md @@ -116,8 +116,9 @@ In the [Install MicroShift for Edge](./rhel4edge_iso.md#install-microshift-for-e ```bash VMNAME=microshift-edge NETNAME=default +ISO=$(ls -1 "_output/image-builder/microshift-installer-*.$(uname -m).iso") -./scripts/image-builder/create-vm.sh $VMNAME $NETNAME +./scripts/image-builder/create-vm.sh $VMNAME $NETNAME $ISO ``` > The RHEL for Edge host is created with 2 cores and 3 GB of RAM to allow for a better performance in a nested virtualization environment.