Skip to content

Instantly share code, notes, and snippets.

View Aabayoumy's full-sized avatar
🎯
Focusing

Ahmed M. Bayoumy Aabayoumy

🎯
Focusing
View GitHub Profile
@Aabayoumy
Aabayoumy / jammy-server-cloudimg-template.sh
Last active May 4, 2023 12:08
jammy-server-cloudimg-amd64 template on ProxMox
# 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.
@Aabayoumy
Aabayoumy / 01-VMSwitch.ps1
Last active May 6, 2022 16:12
Active Directory LAB - 01-VM Setup
# 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