Demo about Edge Computing in the Retail vertical using Red Hat products
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
747 B

#!/bin/bash
set -Eeuo pipefail
if [[ $# -ne 1 ]]; then
echo "Usage: $0 <vm-name>"
exit 1
fi
VM="${1}"
cp -a "/usr/local/libvirt/images/nextcloud/qcow2/disk.qcow2" "/var/lib/libvirt/images/${VM}/root.qcow2"
virt-install --name "${VM}" \
--autostart \
--cpu=host-passthrough \
--vcpus=${DOMAIN_VCPUS} \
--ram=${DOMAIN_RAM} \
--os-variant=${DOMAIN_OS_VARIANT} \
--disk=path=/var/lib/libvirt/images/${VM}/root.qcow2,bus=virtio,format=qcow2,size=${DOMAIN_DISK_SIZE}G \
--console=pty,target_type=virtio \
--serial=pty \
--graphics=none \
--import \
--network=network=bridged,mac=${DOMAIN_MAC_ADDRESS}