Upload files to "/"

This commit is contained in:
Matthew Fisher 2024-04-03 21:03:37 -05:00
parent 2e9536c34f
commit 1dc5a15fa7
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# installing libguestfs-tools only required once, prior to first run
apt update -y
apt install libguestfs-tools -y
# remove existing image in case last execution did not complete successfully
rm jammy-server-cloudimg-amd64.img
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
# Install required tools for virtualization
virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent
virt-customize -a jammy-server-cloudimg-amd64.img --run-command ""
virt-customize -a jammy-server-cloudimg-amd64.img --run-command "echo -n > /etc/machine-id"
sudo qm create 9000 --name "ubuntu-cloudinit-template" --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0
sudo qm importdisk 9000 jammy-server-cloudimg-amd64.img CEPH-SSD
sudo qm set 9000 --scsihw virtio-scsi-pci --scsi0 CEPH-SSD:vm-9000-disk-0
sudo qm set 9000 --boot c --bootdisk scsi0
sudo qm set 9000 --ide2 CEPH-SSD:cloudinit
sudo qm set 9000 --serial0 socket --vga serial0
sudo qm set 9000 --agent enabled=1
sudo qm template 9000
rm jammy-server-cloudimg-amd64.img

View File

@ -0,0 +1,19 @@
# installing libguestfs-tools only required once, prior to first run
apt update -y
apt install libguestfs-tools -y
# remove existing image in case last execution did not complete successfully
rm jammy-server-cloudimg-amd64.img
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
# Install required tools for virtualization
virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent
virt-customize -a jammy-server-cloudimg-amd64.img --run-command "echo -n > /etc/machine-id"
sudo qm create 9000 --name "ubuntu-cloudinit-template" --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0
sudo qm importdisk 9000 jammy-server-cloudimg-amd64.img CEPH-SSD
sudo qm set 9000 --scsihw virtio-scsi-pci --scsi0 CEPH-SSD:vm-9000-disk-0
sudo qm set 9000 --boot c --bootdisk scsi0
sudo qm set 9000 --ide2 CEPH-SSD:cloudinit
sudo qm set 9000 --serial0 socket --vga serial0
sudo qm set 9000 --agent enabled=1
sudo qm template 9000
rm jammy-server-cloudimg-amd64.img