-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig
22 lines (22 loc) · 956 Bytes
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#the libvirt storage pool where the iso will be uploaded
POOL="default"
#The libvirt connection url
CONNECTION="qemu:///system"
config_drive_tmpl="config_drive"
PUBKEY_PATH="$HOME/.ssh/id_rsa.pub"
#name of image available on libvirt to clone for the instance
IMAGE_URL="https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2"
#IMAGE_URL=http://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
#virt-install lets you set the operating system of the image, so that it can set up the best virtual hardware for it, check the list of available machines with 'osinfo-query os'
OS_VARIANT="ubuntu16.04"
#Set disk size with unit
SIZE='10G'
#Set memory with in megabytes
MEM="1024"
apt install libvirt-daemon-system libvirt-clients virtinst xorriso --no-install-recommends
if [ ! -f $PUBKEY_PATH ]; then
ssh-keygen
fi
PUBKEY=$(<$PUBKEY_PATH)
MKISOCMD=$(which mkisofs || which xorrisofs)
IMAGE=${IMAGE_URL##*/}