Add jammy
This commit is contained in:
parent
0a9a5d0968
commit
5ef9d31387
|
@ -104,6 +104,32 @@ focal()
|
|||
rm -f "$xml" /var/lib/libvirt/ephemeral/focal_libvirt_"${hostname}_${id}".{iso,qcow2}
|
||||
}
|
||||
|
||||
jammy()
|
||||
{
|
||||
id="$1"
|
||||
qemu-img create -b /var/lib/libvirt/backingstore/jammy.qcow2 \
|
||||
-f qcow2 -F qcow2 \
|
||||
/var/lib/libvirt/ephemeral/jammy_libvirt_"${hostname}_${id}".qcow2
|
||||
cloud-localds /var/lib/libvirt/ephemeral/jammy_libvirt_"${hostname}_${id}".iso \
|
||||
/var/lib/libvirt/backingstore/jammy.user
|
||||
|
||||
virsh undefine jammy_libvirt_"${hostname}_${id}"
|
||||
|
||||
xml=$(mktemp)
|
||||
|
||||
virt-install -r "$mempercore" --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \
|
||||
-n jammy_libvirt_"${hostname}_${id}" -w network=default --nographics \
|
||||
--disk path=/var/lib/libvirt/ephemeral/jammy_libvirt_"${hostname}_${id}".qcow2 \
|
||||
--disk path=/var/lib/libvirt/ephemeral/jammy_libvirt_"${hostname}_${id}".iso,device=cdrom \
|
||||
--import --noautoconsole \
|
||||
--print-xml --dry-run --check disk_size=off,path_in_use=off \
|
||||
--boot=hd --os-type=Linux --os-variant ubuntu18.04 > "$xml"
|
||||
|
||||
virsh define "$xml"
|
||||
|
||||
rm -f "$xml" /var/lib/libvirt/ephemeral/jammy_libvirt_"${hostname}_${id}".{iso,qcow2}
|
||||
}
|
||||
|
||||
elcapitan()
|
||||
{
|
||||
local id
|
||||
|
@ -163,4 +189,7 @@ wait
|
|||
for i in $(seq "$cores"); do
|
||||
focal "$i" &
|
||||
done
|
||||
for i in $(seq "$cores"); do
|
||||
jammy "$i" &
|
||||
done
|
||||
wait
|
||||
|
|
Loading…
Reference in New Issue
Block a user