This file contains hidden or 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
# based on https://gist.github.com/reluce/797515dc8b906eb07f54393a119df9a7 | |
# https://techbythenerd.com/posts/creating-an-ubuntu-cloud-image-in-proxmox/ | |
# All commands will be executed on a Proxmox host | |
apt update -y && 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. | |
virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent,neovim,tmux,exa,git | |
# Read and set root user password from file. | |
virt-customize -a jammy-server-cloudimg-amd64.img --root-password file:password_root.txt | |
# Create an additional user. |
This file contains hidden or 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
# https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/setup-nat-network | |
New-VMSwitch -SwitchName "NAT" -SwitchType Internal | |
Get-NetAdapter | |
New-NetIPAddress -IPAddress 172.30.0.1 -PrefixLength 24 -InterfaceIndex 24 | |
New-NetNat -Name MyNATnetwork -InternalIPInterfaceAddressPrefix 172.30.0.0/24 |