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
# download ubuntu-cloud image | |
# NOTE: ubuntu-server won't properly work with cloud-init for some reason | |
wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img | |
# NOTE: no need for sudo because we already login as root | |
# install image customization tool | |
apt update -y && apt install libguestfs-tools -y | |
# install qemu-guest-agent inside of image |
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
1. Add a virtual serial port to the VM using PVE Web GUI and restart the VM | |
2. Enable and start the virtual serial port on VM, change tty number as needed (Reference: https://askubuntu.com/a/621209/838946) | |
$ sudo systemctl enable [email protected] | |
$ sudo systemctl start [email protected] | |
3. Done! You can now select xterm.js in the PVE Web GUI |
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
#!/bin/bash | |
set -o errexit | |
clear | |
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n" | |
### HOW TO USE | |
### Pre-req: | |
### - run on a Proxmox 6 server | |
### - a dhcp server should be active on vmbr1 |
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
#!/bin/bash | |
IPT="/sbin/iptables" | |
# Server IP | |
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')" | |
# Your DNS servers you use: cat /etc/resolv.conf | |
DNS_SERVER="8.8.4.4 8.8.8.8" | |
# Allow connections to this package servers |