Upload files to "/"
This commit is contained in:
parent
2e9536c34f
commit
1dc5a15fa7
20
cloud-init_agent_creation.sh
Normal file
20
cloud-init_agent_creation.sh
Normal 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
|
19
cloud-init_template_creation.sh
Normal file
19
cloud-init_template_creation.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user