This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All commands will be executed on a Proxmox host | |
sudo apt update -y && sudo apt install libguestfs-tools -y | |
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img | |
# Install qemu-guest-agent on the image. Additional packages can be specified by separating with a comma. | |
sudo virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent | |
# Read and set root user password from file. | |
sudo virt-customize -a jammy-server-cloudimg-amd64.img --root-password file:password_root.txt | |
# Create an additional user. | |
sudo virt-customize -a jammy-server-cloudimg-amd64.img --run-command "useradd -m -s /bin/bash myuser" | |
# Set password for that user. |