Migrate to Proxmox VE v1

Download Proxmox and Write to USB

sudo fdisk -l
lsblk -o NAME,SIZE,MODEL,TRAN

dd if=proxmox-ve_9.0-1.iso of=/dev/sdb bs=4M status=progress oflag=sync
lsblk

Migrate VMware Workstation VM to Proxmon

You can use VMware Convert to convert a Physical machine as well.

# 1. Create a new VM in Proxmox (via GUI), stop it, and note its VM ID (e.g. 100)

# 2. Copy all .vmdk files to Proxmox

scp /path/to/MyVM*.vmdk root@<PROXMOX-IP>:/var/lib/vz/images/100/

# 3. SSH into Proxmox

ssh root@<PROXMOX-IP>

# 4. Go to VM image folder

cd /var/lib/vz/images/100/

# 5. Convert the descriptor VMDK (small file) to qcow2

qemu-img convert -f vmdk -O qcow2 MyVM.vmdk vm-100-disk-0.qcow2

# 6. Import the disk to local-lvm storage

qm importdisk 100 vm-100-disk-0.qcow2 local-lvm

# 7. Attach the disk as SATA (optional: use VirtIO or SCSI if preferred)

qm set 100 --sata0 local-lvm:vm-100-disk-0

# 8. Set the boot device

qm set 100 --boot order=sata0

# 9. Start the VM

qm start 100

#List all VMs
qm config 202 | grep -E '^ide|^sata|^scsi|^virtio' | awk -F= '{print $2}' | while read disk; do
  storage=$(echo $disk | cut -d: -f1)
  volume=$(echo $disk | cut -d: -f2)
  echo "Storage: $storage"
  echo "Volume: $volume"
  pvesm path $storage:$volume
done

qm config 202

Convert VM to Proxmon


# Convert VMware Workstation VM to Proxmox (qcow2 format)

1. Identify your VMware VM files:
   Example contents of your VM directory:
     samurai.vmx
     samurai.vmdk
     samurai.nvram
     vmware.log
     etc.


3. Convert the VMDK to QCOW2:
   Command:
     qemu-img convert -p -f vmdk -O qcow2 samurai.vmdk samurai.qcow2
   - `-p` shows progress.
   - Replace filenames as needed.
   - If running over SSH, use `nohup` or `screen` to keep it running:
     Example:
       nohup qemu-img convert -p -f vmdk -O qcow2 samurai.vmdk samurai.qcow2 > convert.log 2>&1 &

4. Create a VM in Proxmox:
   - Use the Web UI or:
     qm create 9000 --name samurai --memory 4096 --net0 virtio,bridge=vmbr0 --cores 2

5. Import the QCOW2 disk into Proxmox storage:
   - Move or copy `samurai.qcow2` to a Proxmox storage directory, e.g. `/var/lib/vz/images/9000/`
   - Then attach it:
     qm importdisk 9000 samurai.qcow2 local-lvm --format qcow2
   - Add the disk to the VM config:
     qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0

6. Boot and test:
   - Start the VM in Proxmox Web UI or with:
     qm start 9000

7. (Optional) Enable display:
   - Add a display if needed:
     qm set 9000 --vga std

---

Notes:
- Replace `9000` with your desired VM ID.
- Replace `local-lvm` with your target storage name.
- If the original VMware VM uses multiple `.vmdk` files (split disk), ensure `qemu-img` uses the `.vmdk` referenced by the `.vmx`.

Add exFat Disk




# exFAT Mounting Commands Reference

1. Install exFAT support on Debian/Proxmox:
   Command:
     apt update
     apt install exfat-fuse exfat-utils -y
   Description:
     Installs the necessary packages to mount exFAT filesystems.

2. Identify the disk and partition:
   Command:
     lsblk -f
   Description:
     Lists all disks and their filesystems to help identify the exFAT partition.

3. Create a mount point:
   Command:
     mkdir -p /mnt/backup
   Description:
     Creates a directory where the exFAT partition will be mounted.

4. Mount the exFAT partition manually:
   Command:
     mount -t exfat /dev/sda2 /mnt/backup
   Description:
     Mounts the exFAT partition at /mnt/backup.

5. Verify th

Update Proxmon

# Proxmox Update Commands Reference

1. Update package lists:
   Command:
     apt update
   Description:
     Downloads the latest package lists from configured repositories.

2. Upgrade installed packages:
   Command:
     apt full-upgrade -y
   Description:
     Upgrades all installed packages to their latest versions, including kernel and Proxmox packages.

3. Clean up unused packages and cache:
   Command:
     apt autoremove -y
     apt clean
   Description:
     Removes unnecessary packages and cleans local repository cache to free disk space.

4. Reboot the system if a new kernel or critical update was installed:
   Command:
     reboot
   Description:
     Restarts the Proxmox server to apply updates fully.

5. Verify Proxmox version:
   Command:
     pveversion -v
   Description:
     Displays the current Proxmox VE version and installed package versions.

Install Screen for background conversion

# Screen Commands Reference


Create a Screen session

screen -S Backup
screen -r Backup
screen -ls
screen -D -r <session_id>
screen -D -r 4679
CNTRL -A -D

Move Copy VM



rsync -avh --progress /mnt/backup/WindowsDesktop/ /var/lib/vz/images/
chown -R root:root /var/lib/vz/images/


If your VM folder is named `samurai`, here's how it works in Proxmox VE:

Important Notes:

1. Folder Name ≠ VM ID
   Proxmox stores VM data in:
   /var/lib/vz/images/<VMID>/
   That <VMID> is always numeric. You cannot use `samurai` as a VMID or VM folder name directly.

2. But you can label it:
   - Use `samurai` as the VM name:
     qm create 105 --name samurai --memory 2048 --net0 virtio,bridge=vmbr0
   - Then Proxmox stores the disk as:
     /var/lib/vz/images/105/vm-105-disk-0.raw
   - You can rename the disk (not recommended unless you know what you're doing), but the folder will still be `105`.

3. Advanced Workaround (Symbolic Link):
   You could create a symbolic link for easier navigation:
   ln -s /var/lib/vz/images/105 /var/lib/vz/images/samurai
   But this is just cosmetic for the file system, not supported officially, and might confuse backups or UI operations.

Recommended:
- Keep `samurai` as the VM name
- Use a numeric ID (105, 9999, etc.)
- Use tags, notes, or symbolic links if needed for context

Let me know if you want help automating this with a script.

Tutorials

Cloudflare Tunnels + UniFi Firewall Setup (the right way) –

List and Download LXC Templates

Linux Container - https://pve.proxmox.com/wiki/Linux_Container

https://syd1lxdmirror01.do.letsbuildthe.cloud/images

https://www.turnkeylinux.org/all

http://download.proxmox.com/images/system/
https://images.linuxcontainers.org/images/
https://linuxcontainers.org/


# List all QEMU (KVM) virtual machines
qm list

# List all LXC containers
pct list

# Stop the LXC container with VMID 100
pct stop 100

# Destroy (delete) the LXC container with VMID 100
pct destroy 100

pveam update 
pveam available
pveam download local ubuntu-25.04-standard_25.04-1.1_amd64.tar.zst

Android-86 on Proxmox

OSX Deployment

Build Ubuntu Desktop

All of the Helper scripts install Unbuntu Server, in order to delpy Unbuntu Desktop you need to use the USB, once its deployed.

Deployment script – https://github.com/RockAfeller2013/proxmox_helperscripts/blob/main/omakub.sh

  • Enable RDP first, so you can RDP into and copy and paste, otherwise the Proxmox Console doesn’t allow copy/paste via MacOSX
  • Install QEMU / Proxmox Agent
  • Instal Omakub An Omakase Developer Setup for Ubuntu 24.04+ by DHH – https://omakub.org/
  • Enable Nvidia PCI Pass-throu and install the drivers
  • Instal Bottles – https://usebottles.com/
  • Install Anaconda
# Install QEMU Tools

sudo apt update && sudo apt upgrade -y
sudo apt install -y qemu-guest-agent spice-vdagent
sudo systemctl enable qemu-guest-agent
sudo systemctl start qemu-guest-agent
sudo reboot
sudo systemctl status qemu-guest-agent


'Go to your VM > Options

Set QEMU Guest Agent → Enabled: Yes

You can also go to Hardware > Display and choose SPICE if using spice-vdagent for clipboard and resolution syncing.'

# Install OMAKUB

wget -qO- https://omakub.org/install | bash
#!/bin/bash
# chmod +x proxmox-create-ubuntu-gui.sh
# ./proxmox-create-ubuntu-gui.sh

set -e

# ===== Ensure required tools =====
for tool in whiptail wget genisoimage; do
  if ! command -v $tool >/dev/null 2>&1; then
    echo "Missing required tool: $tool"
    exit 1
  fi
done

# ===== Constants =====
DISK_STORAGE="local-lvm"
ISO_DIR="/var/lib/vz/template/iso"
DEFAULT_ISO="ubuntu-25.04-desktop-amd64.iso"
ISO_URL="https://releases.ubuntu.com/25.04/${DEFAULT_ISO}"

# ===== Collect user input =====
VMID=$(whiptail --inputbox "Enter VM ID (e.g. 2504)" 10 60 2504 --title "VM ID" 3>&1 1>&2 2>&3) || exit 1
VMNAME=$(whiptail --inputbox "Enter VM name" 10 60 "ubuntu-2504-desktop" --title "VM Name" 3>&1 1>&2 2>&3) || exit 1
USERNAME=$(whiptail --inputbox "Enter default username" 10 60 "ubuntu" --title "Username" 3>&1 1>&2 2>&3) || exit 1
PASSWORD=$(whiptail --passwordbox "Enter password for user" 10 60 --title "Password" 3>&1 1>&2 2>&3) || exit 1
MEMORY=$(whiptail --inputbox "Memory in MB" 10 60 4096 --title "Memory" 3>&1 1>&2 2>&3) || exit 1
DISK_SIZE=$(whiptail --inputbox "Disk size in GB" 10 60 32 --title "Disk Size" 3>&1 1>&2 2>&3) || exit 1
CORES=$(whiptail --inputbox "Number of CPU cores" 10 60 2 --title "CPU Cores" 3>&1 1>&2 2>&3) || exit 1
BRIDGE=$(whiptail --inputbox "Network bridge (e.g. vmbr0)" 10 60 "vmbr0" --title "Network Bridge" 3>&1 1>&2 2>&3) || exit 1
ENABLE_OMAKUB=$(whiptail --title "Omakub Installer" --yesno "Install Omakub automatically?" 8 60 && echo "yes" || echo "no")
ENABLE_AUTOLOGIN=$(whiptail --title "GNOME Auto-login" --yesno "Enable GNOME auto-login for $USERNAME?" 8 60 && echo "yes" || echo "no")

# ===== Ensure ISO exists =====
mkdir -p "$ISO_DIR"
if [ ! -f "$ISO_DIR/$DEFAULT_ISO" ]; then
  echo "==> ISO not found. Downloading $DEFAULT_ISO..."
  wget -O "$ISO_DIR/$DEFAULT_ISO" "$ISO_URL"
else
  echo "==> Using existing ISO: $DEFAULT_ISO"
fi

ISO_NAME="$DEFAULT_ISO"
ISO_PATH="$ISO_DIR/$ISO_NAME"
CI_ISO="/var/lib/pve/template/iso/ci-$VMID.iso"

# ===== Create VM =====
echo "==> Creating VM $VMID..."
qm create $VMID \
  --name "$VMNAME" \
  --memory $MEMORY \
  --cores $CORES \
  --net0 virtio,bridge=$BRIDGE \
  --serial0 socket \
  --vga std \
  --ostype l26 \
  --scsihw virtio-scsi-pci \
  --boot order=ide2 \
  --agent enabled=1

qm set $VMID --scsi0 ${DISK_STORAGE}:${DISK_SIZE}G
qm set $VMID --ide2 local:iso/$ISO_NAME,media=cdrom
qm set $VMID --efidisk0 ${DISK_STORAGE}:0,format=qcow2,efitype=4m,pre-enrolled-keys=1

# ===== Create cloud-init ISO =====
TMPDIR=$(mktemp -d)
cat > "$TMPDIR/user-data" <<EOF
#cloud-config
hostname: $VMNAME
users:
  - name: $USERNAME
    groups: sudo
    shell: /bin/bash
    sudo: ALL=(ALL) NOPASSWD:ALL
    lock_passwd: false
    passwd: $(openssl passwd -6 "$PASSWORD")
chpasswd:
  expire: false
package_update: true
package_upgrade: true
runcmd:
  - apt update
  - apt install -y gnome-session gdm3 wget curl
EOF

if [ "$ENABLE_AUTOLOGIN" = "yes" ]; then
cat >> "$TMPDIR/user-data" <<EOF
  - mkdir -p /etc/gdm3
  - echo "[daemon]" > /etc/gdm3/custom.conf
  - echo "AutomaticLoginEnable = true" >> /etc/gdm3/custom.conf
  - echo "AutomaticLogin = $USERNAME" >> /etc/gdm3/custom.conf
  - systemctl set-default graphical.target
EOF
fi

if [ "$ENABLE_OMAKUB" = "yes" ]; then
cat >> "$TMPDIR/user-data" <<EOF
  - wget -qO- https://omakub.org/install | bash
EOF
fi

cat >> "$TMPDIR/user-data" <<EOF
  - echo "[Unit]" > /etc/systemd/system/cleanup-ci.service
  - echo "Description=Cleanup cloud-init ISO" >> /etc/systemd/system/cleanup-ci.service
  - echo "After=multi-user.target" >> /etc/systemd/system/cleanup-ci.service
  - echo "" >> /etc/systemd/system/cleanup-ci.service
  - echo "[Service]" >> /etc/systemd/system/cleanup-ci.service
  - echo "ExecStart=/usr/bin/systemd-run --on-active=5 /bin/bash -c 'umount /dev/sr1 && eject /dev/sr1'" >> /etc/systemd/system/cleanup-ci.service
  - echo "Type=oneshot" >> /etc/systemd/system/cleanup-ci.service
  - echo "RemainAfterExit=true" >> /etc/systemd/system/cleanup-ci.service
  - echo "" >> /etc/systemd/system/cleanup-ci.service
  - echo "[Install]" >> /etc/systemd/system/cleanup-ci.service
  - echo "WantedBy=multi-user.target" >> /etc/systemd/system/cleanup-ci.service
  - systemctl enable cleanup-ci.service
EOF

cat > "$TMPDIR/meta-data" <<EOF
instance-id: $VMNAME
local-hostname: $VMNAME
EOF

echo "==> Creating cloud-init ISO..."
genisoimage -output "$CI_ISO" -volid cidata -joliet -rock "$TMPDIR/user-data" "$TMPDIR/meta-data"
qm set $VMID --ide3 local:iso/ci-$VMID.iso,media=cdrom

# ===== Start VM =====
echo "==> Starting VM..."
qm start $VMID

# ===== Summary =====
echo
echo "✅ VM $VMID ($VMNAME) created with:"
echo "🧑  User: $USERNAME"
echo "💻  Memory: $MEMORY MB | Cores: $CORES | Disk: ${DISK_SIZE}G"
echo "📦  Disk Storage: $DISK_STORAGE"
echo "📀  ISO: $ISO_NAME"
echo "🖥️  GNOME auto-login: $ENABLE_AUTOLOGIN"
echo "✨  Omakub auto-install: $ENABLE_OMAKUB"
echo "🧹  Cloud-init ISO will auto-eject after boot"
echo "🔑  Login via Proxmox VNC Console"
#!/bin/bash
# chmod +x create-ubuntu-2504.sh
# ./create-ubuntu-2504.sh


# Configurable parameters
TEMPLATE_OS="ubuntu-25.04-standard_25.04-1.1_amd64.tar.zst"
STORAGE="local"
CTID=101
HOSTNAME="ubuntu-2504"
DISK_SIZE="8G"
MEMORY="2048"
CPU_CORES="2"
BRIDGE="vmbr0"
IP_CONFIG="ip=dhcp"
PASSWORD="changeme"  # required if no SSH key is set

echo "==> Updating template index..."
pveam update

echo "==> Downloading Ubuntu 25.04 LXC template..."
pveam download $STORAGE $TEMPLATE_OS

echo "==> Creating the LXC container..."
pct create $CTID \
  $STORAGE:vztmpl/$TEMPLATE_OS \
  --hostname $HOSTNAME \
  --storage $STORAGE \
  --rootfs ${STORAGE}:${DISK_SIZE} \
  --memory $MEMORY \
  --cores $CPU_CORES \
  --net0 name=eth0,bridge=${BRIDGE},${IP_CONFIG} \
  --ostype ubuntu \
  --password $PASSWORD \
  --features nesting=1 \
  --start 1

echo "==> Waiting for container to boot..."
sleep 10

echo "==> Installing Omakub inside container..."
pct exec $CTID -- bash -c "apt update && apt install -y wget curl && wget -qO- https://omakub.org/install | bash"

echo "✅ Done: Container $CTID is ready with Ubuntu 25.04 and Omakub installed."

Lets Encrypt

https://chatgpt.com/c/68648e7e-d708-800e-8965-1122faa3b93d

# Export CA certificate and install in browser
openssl x509 -in /etc/pve/local/pve-ssl.pem -out /tmp/proxmox-ca.crt

Then import proxmox-ca.crt into your browser or OS trusted store.

NixOS DevEnv

https://nixos.wiki/wiki/Python

https://joinemm.dev/blog/development-environments-with-nix

https://python-poetry.org

https://github.com/nix-community/dream2nix/tree/main

https://devenv.sh

https://opensource.com/article/17/2/quick-introduction-tmux
https://opensource.com/article/17/5/4-terminal-apps

Proxmox Directories

ls -l /etc/pve/qemu-server/100.conf

/etc/pve/qemu-server/100.conf
/etc/pve/nodes/proxmon/qemu-server
/var/lib/vz/template/iso
/var/lib/vz/images/

lvs | grep 100

# Important Proxmox Directories

# VM Configuration Files (Cluster-wide)
/etc/pve/qemu-server/100.conf                   # Config for VM ID 100
/etc/pve/nodes/proxmon/qemu-server/            # All VM configs on node 'proxmon'

# ISO and VM Disk Storage (Default Directory Storage)
/var/lib/vz/template/iso/                      # ISO images used for VM installation
/var/lib/vz/images/                            # Main VM disk image directory
/var/lib/vz/images/100/                        # Disk images for VM ID 100

# Additional Critical Configs
/etc/network/interfaces                        # Proxmox network configuration
/etc/pve/storage.cfg                           # Proxmox storage definitions
/etc/pve/firewall/                             # Cluster-wide firewall rules
/etc/pve/datacenter.cfg                        # Global datacenter config

# Logs
/var/log/pve/                                  # Proxmox-specific logs
/var/log/syslog                                # System log
/var/log/journal/                              # Systemd journal logs

# LXC (if used)
/etc/pve/lxc/                                  # LXC container configuration
/var/lib/lxc/                                  # LXC container storage

# /dev
/dev/pve/root             → LVM volume for root filesystem
/dev/pve/swap             → LVM swap partition
/dev/pve/vm-204-disk-0    → LVM disk for VM 204
/dev/pve/vm-203-disk-0    → LVM disk for VM 203
/dev/pve/vm-204-disk-2    → TPM state disk for VM 204

# /VM Configs
/nodes/proxmon/qemu-server/

ProxMenu

bash -c "$(wget -qLO - https://raw.githubusercontent.com/MacRimi/ProxMenux/main/install_proxmenux.sh)"

ASCIINEMA

# Install via Homebrew (macOS)


# Install via APT (Debian/Ubuntu)
sudo apt update
sudo apt install asciinema


# Start a new recording
asciinema rec

# Start a new recording with a filename
asciinema rec demo.cast
asciinema stream -r demo.cast
asciinema stream -r jUc8


# Stop recording (press Ctrl-D or type 'exit')

# Play a recording
asciinema play demo.cast

# Upload a recording
asciinema upload demo.cast

# Autoplay from URL
asciinema play https://asciinema.org/a/12345.cast
asciinema play https://asciinema.org/s/jUc8St6jGOsEHAdZ

Convert VMware VM to Proxmox VM

Convert VMware VM to Proxmox VM.

- Uninstall VMware Tools (Its better to do this first as it becomes difficult inside Proxmox) and shutdown the VMware VM. 

$regpath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
$regkey = $regpath | Get-ChildItem | Get-ItemProperty | Where-Object { 'VMware Tools' -contains $_.DisplayName }
msiexec.exe /x $regkey.PSChildName /passive /norestart
shutdown -s -t 120 -f


- Copy the VMware Folder with the VMDK files to Proxmox.
- Create a Proxmox corresponding VM folder 

mkdir /var/lib/vz/images/205/

- Convert the VMDK file using following command and transfer the qcow2 file to above folder. 

cd /mnt/backup/Data/vm/virtual machines/CbAppControl_Demo1

qemu-img convert -p -f vmdk -O qcow2 CbAppControl_Demo1-disk1.vmdk /var/lib/vz/images/205/2045.qcow2

qemu-img info /var/lib/vz/images/205/205.qcow2

- Verify Commands
lvs
lvs | grep local-lvm
lvdisplay local-lvm
pvesm status
qm list
lvs | grep vm-
pvesm list local-lvm
lvs | grep vm-203-disk-0
lvdisplay /dev/pve/vm-203-disk-0



- Create Windows VM using ProxMox UI. It's diffcult to figure out which ProxMox VM qm create settings are required. What worked for me, is to use the UI to create a VM and select all the right options, then use qm config command to export the settings, so you can reuse them inside the command line.


3. qm config 204

bios: ovmf
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
description: Working
efidisk0: local-lvm:vm-204-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
ide2: none,media=cdrom
machine: pc-q35-9.2+pve1
memory: 4096
meta: creation-qemu=9.2.0,ctime=1751605805
name: Windows
net0: virtio=BC:24:11:EF:5F:84,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
scsi0: local-lvm:vm-203-disk-0,size=60G
scsihw: pvscsi
smbios1: uuid=7f1738bf-7eaf-4cd0-90f5-dbfa7f6484c8
sockets: 1
tpmstate0: local-lvm:vm-204-disk-2,size=4M,version=v2.0
unused0: local-lvm:vm-204-disk-1
vmgenid: 7afc6655-0bbe-4717-97b4-5fe0946ddce2

# Doen't need this lvcreate -L 4M -n vm-205-efidisk0 pve
## Not sure why but the following doesnt work with create command, so need set it afterwards.
  --efidisk0 local-lvm:vm-205-efidisk0,efitype=4m,pre-enrolled-keys=1,size=4M \
  --tpmstate0 local-lvm:vm-205-tpm0,size=4M,version=v2.0 \

### Create persistent EFI disk to your VM so the UEFI variables are stored persistently.
# qm set 205 --efidisk0 local-lvm:vm-205-efidisk0,size=4M,efitype=4m,pre-enrolled-keys=1


#  Create VM definition


qm create 205 \
  --name CbAppControl205 \
  --description "CbAppControl205" \
  --memory 4096 \
  --cores 1 \
  --sockets 1 \
  --cpu x86-64-v2-AES \
  --numa 0 \
  --net0 virtio,bridge=vmbr0,firewall=1 \
  --ostype win11 \
  --scsihw pvscsi \
  --machine pc-q35-9.2+pve1 \
  --bios ovmf \
  --boot order=scsi0 \
  --agent enabled=1

# Import the qcow2 disk into local-lvm
qm importdisk 205 /var/lib/vz/images/205/205.qcow2 local-lvm

# Attach the imported disk as scsi0
qm set 205 --scsi0 local-lvm:vm-205-disk-0
cat /nodes/proxmon/qemu-server/205.conf

qm start 205

# If you're not making any changes to UEFI settings that need to be saved, you can likely ignore the warning. 
# WARN: no efidisk configured! Using temporary efivars disk.

## Install Guest Tools

Install VirtIO Drivers
Open File Explorer inside Windows.
Navigate to the VirtIO CD-ROM drive (the attached ISO).
Install drivers from the following folders as needed:
NetKVM for network driver (if network not working).
Balloon for memory ballooning.
viostor for SCSI controller.
vioserial for serial devices.
Others as required.
You can use Device Manager to find devices with missing drivers and manually update from the ISO.
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/


curl -o /var/lib/vz/template/iso/virtio-win.iso https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso

qm set 205 --ide2 local:iso/virtio-win.iso,media=cdrom
qm agent 205 get-time

Proxmox Clean up VM/Disk

ls -l /etc/pve/qemu-server/
lvs -a -o +devices | grep vm-
pvesm list local-lvm

rm -r /var/lib/vz/images/204

Enable Proxmox VM Nesting.

# https://pve.proxmox.com/wiki/Nested_Virtualization

cat /sys/module/kvm_intel/parameters/nested 
cat /sys/module/kvm_amd/parameters/nested


# Intel
echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf

# AMD
echo "options kvm-amd nested=1" >> /etc/modprobe.d/kvm-amd.conf

modprobe -r kvm_intel
modprobe kvm_intel

# Set the CPU type to "host"
qm set <vmid> --cpu host
egrep '(vmx|svm)' --color=always /proc/cpuinfo

Build Windows Template

Windows inside Docker

Manual Install Windows 11 using ISO

#!/bin/bash
# Fetch specific VirtIO ISO and verify integrity

ISO_URL="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.271-1/virtio-win-0.1.271.iso"
CHECKSUM_URL="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.271-1/CHECKSUM"

# Detect content=iso storage path
ISO_STORAGE=$(pvesm status --content iso | head -n 2 | tail -n 1 | awk '{print $2}')

if [[ -z "$ISO_STORAGE" ]]; then
  echo "No ISO-capable storage found."
  exit 1
fi

# Map storage name to path using Proxmox directory layout
ISO_PATH="/var/lib/vz/template/iso"
# Replace above if custom config is used:
# For ZFS-based or other storage adjust as needed.

cd "$ISO_PATH" || { echo "Failed to cd to ISO path"; exit 1; }

# Download files if not present
[[ -f "virtio-win-0.1.271.iso" ]] || wget -c "$ISO_URL"
[[ -f "CHECKSUM" ]] || wget -c "$CHECKSUM_URL"

echo "Verifying checksum..."
sha256sum -c CHECKSUM --ignore-missing || { echo "Checksum mismatch"; exit 1; }

echo "Download complete. ISO stored at $ISO_PATH/virtio-win-0.1.271.iso"
# Download VirtIO from - https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.271-1/
# Check Space, local is the only storage that supports content iso.

pvesm status
cp /mnt/backup/Data/ISOs/en-us_windows_11_business_editions_version_23h2_updated_dec_2023_x64_dvd_d9da936d.i


ls /var/lib/vz/template/iso/

# After install, use the VirtIO drivers ISO for network and storage drivers.


# Boot VM, press space to BIOS, then you need to load the drivers by selecting the VirtIO CD, amd64/Win11

- Install D:\virtio-win-guest-tools.exe to enable Network Card
- Activate License
- Setup GPU passthrough
- Install NVidia drivers https://chatgpt.com/c/68ad3184-e364-8325-9774-403f825b13e4 
- Install Apps - https://github.com/RockAfeller2013/setup_workstation/blob/main/setup.ps1
- SYSPREP
- Make into a Template


## Activate Windows

slmgr /dlv
slmgr /ipk serial
slmgr /ato

slmgr /skms kms8.msguides.com
DISM /online /Set-Edition:Enterprise /ProductKey: /AcceptEula


## Create VM

pvesm status
cp /mnt/backup/Data/ISOs/en-us_windows_11_business_editions_version_23h2_updated_dec_2023_x64_dvd_d9da936d.iso /var/lib/vz/template/iso/
ls /var/lib/vz/template/iso/



qm set 1000 --bios ovmf
qm set 1000 --boot order=ide2;ide0
qm set 1000 --cores 16
qm set 1000 --cpu host
qm set 1000 --efidisk0 local-lvm:vm-1000-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
qm set 1000 --ide0 local:iso/virtio-win-0.1.271.iso,media=cdrom,size=709474K
qm set 1000 --ide2 local:iso/en-us_windows_11_business_editions_version_23h2_updated_dec_2023_x64_dvd_d9da936d.iso,media=cdrom,size=6527808K
qm set 1000 --machine pc-q35-9.2+pve1
qm set 1000 --memory 32768
qm set 1000 --name WIN11
qm set 1000 --net0 virtio=BC:24:11:69:E2:A7,bridge=vmbr0,firewall=1
qm set 1000 --numa 0
qm set 1000 --ostype win11
qm set 1000 --scsi0 local-lvm:vm-1000-disk-1,iothread=1,size=300G
qm set 1000 --scsihw virtio-scsi-single
qm set 1000 --smbios1 uuid=3fc8729a-31c9-4246-96a0-bfc84687e61f
qm set 1000 --sockets 2
qm set 1000 --tpmstate0 local-lvm:vm-1000-disk-2,size=4M,version=v2.0
qm set 1000 --vmgenid 0938c839-8ef4-428d-87c6-c822ce2b9fd2

Automated Windows Build

Build a Proxmox Windows Template

Ansible playbook to create Windows templates for Proxmox (PVE) based lab environment 
https://github.com/clayshek/ans-pve-win-templ
Download Windows 10 Disc Image (ISO File) - https://www.microsoft.com/en-au/software-download/windows10iso

One-Click VM Templates -https://hsve.cc/templates
TKLdev - https://www.turnkeylinux.org/tkldev
Proxmox Template by a Script - https://homelab.casaursus.net/making-a-proxmox-template/
proxmox-windows-template - https://github.com/thundervm/proxmox-windows-template
packer-windows-proxmox - https://github.com/EnsoIT/packer-windows-proxmox
🚀 OSX-PROXMOX - Run macOS on ANY Computer (AMD & Intel) - https://github.com/luchina-gabriel/OSX-PROXMOX
Linux VM Templates in Proxmox on EASY MODE using Prebuilt Cloud Init Images! - https://www.apalrd.net/posts/2023/pve_cloud/

Windows Server 2022 One Click Install Proxmox Template. https://www.youtube.com/watch?v=i41EnpeXF1w
Click Paste - https://github.com/Collective-Software/ClickPaste
QEMU images - https://portal.cloud.hashicorp.com/vagrant/discover/stromweld
Packer Windows Proxmox - https://github.com/EnsoIT/packer-windows-proxmox
Windows Server Template - https://mattglass-it.com/windows-server-template/
Fully Automate Windows Installation on Proxmox - #28 - https://www.youtube.com/watch?v=-6y2bTKXUD8

https://github.com/rgl/windows-vagrant
https://github.com/rgl/proxmox-ve
https://github.com/telcat/vagrant-proxmox

Mido The Secure Microsoft Windows Downloader - https://github.com/ElliotKillick/Mido

An utility to convert Unified Update Platform file sets into Windows Media files - https://github.com/gus33000/UUPMediaCreator
UUP dump Download UUP files from Windows Update servers with ease https://uupdump.net/

Microsoft Activation Scripts (MAS) - https://massgrave.dev/

Linux VM Templates in Proxmox on EASY MODE using Prebuilt Cloud Init Images! - https://www.apalrd.net/posts/2023/pve_cloud/

AlmaLinux OS Generic Cloud (Cloud-init) image - https://wiki.almalinux.org/cloud/Generic-cloud.html

Debian Official Cloud Images - https://cdimage.debian.org/images/cloud/

Ubuntu Cloud Images - https://cloud-images.ubuntu.com/

Automatic OS installation on VM - https://www.reddit.com/r/Proxmox/comments/1kcaj2q/automatic_os_installation_on_vm/

## Packer Proxmox 

-https://developer.hashicorp.com/packer/integrations/hashicorp/proxmox/latest/components/builder/iso

Packer Windows Template. -packer-proxmox-windows2022-template
- https://github.com/build-boxes/packer-proxmox-windows2022-template

Install Proxmox Guest Tools

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.271-1/
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/

Install LUDUS

## Build Ludus

## Requirements
https://www.youtube.com/watch?v=RyKjnsWA_Mo
x86_64 (aka amd64 aka 64-bit "Intel") 
Debian 12
Supports nested virtualization is supported
32 GB of RAM
400 GB of disk space (fast NVMe recommended)
ISO bootable

# ISO
https://cloud.debian.org/images/cloud/bookworm/latest/
https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2

curl -o /var/lib/vz/template/iso/debian-12.11.0-amd64-netinst.iso https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.11.0-amd64-netinst.iso

qm create 9004 --name Ludus2 --description "" --boot "order=ide2;scsi0" --cores 16 --cpu host --machine q35 --bios ovmf --ide2 local:iso/debian-12.11.0-amd64-netinst.iso,media=cdrom, --memory 32768 --net0 virtio,bridge=vmbr0,firewall=1 --numa 0 --ostype l26 --scsi0 local-lvm:500,iothread=1 --scsihw virtio-scsi-single --sockets 1 --efidisk0 local-lvm:1,efitype=4m,format=raw --bootdisk scsi0 --agent

qm create 9004 --name Ludus2 --description "" --boot "order=ide2;scsi0" --cores 16 --cpu host,+vmx --machine q35 --bios ovmf --ide2 local:iso/debian-12.11.0-amd64-netinst.iso,media=cdrom --memory 32768 --net0 virtio,bridge=vmbr0,firewall=1 --numa 0 --ostype l26 --scsi0 local-lvm:vm-9004-disk-0,size=500G,iothread=1 --scsihw virtio-scsi-single --sockets 1 --efidisk0 local-lvm:1,efitype=4m,format=raw --bootdisk scsi0 --agent enabled=1

qm set 9004 --agent enabled=1

pvesm status
ps -auwx | grep <VMID>



###################################################################################
# Run this on the Physical Console, otherwise the Install GUI doesnt work.
# Debian 12 disables root SSH login by default for security. Here are a few ways 

##########################
## SSH into the VM
ssh-keygen -R 192.168.1.28
ssh root@192.168.1.38
scp * root@19@192.168.1.30/user/root

usermod -aG sudo ghost
su - ghost

su -

apt update
sudo apt install -y qemu-guest-agent
sudo systemctl enable --now qemu-guest-agent
systemctl status qemu-guest-agent

grep -E 'vmx|svm' /proc/cpuinfo
apt install -y libvirt-clients
virt-host-validate


# Basic Checks
ip -4 -o addr show | awk '{print $4}' | cut -d/ -f1 | paste -sd' '
cat /etc/os-release
uname -r
cat /etc/resolv.conf
hostname

su -
apt update && apt install curl sudo -y
curl -s https://ludus.cloud/install | bash

systemctl restart ludus
systemctl restart ludus-admin
###################################################################################

Install UNRAR

wget https://www.rarlab.com/rar/rarlinux-x64-712.tar.gz
tar -xvzf rarlinux-x64-712.tar.gz
cd rar
sudo install -v -m755 rar unrar /usr/local/bin/


unrar x -p'liansec.net' -o+ yourfile.part1.rar

Build omakub / https://omarchy.org/

https://github.com/RockAfeller2013/proxmox_helperscripts/blob/main/omakub.sh

Import Virtual Box OVA

https://www.netacad.com/resources/lab-downloads?courseLang=en-US

# Step 1: Extract the OVA file
tar --no-same-owner -xvf Ethical-Hacker-Kali.ova

# Step 2: Convert VMDK to QCOW2 or RAW
# (choose one output format depending on your Proxmox storage)
qemu-img convert -f vmdk -O qcow2 your-disk.vmdk vm-disk.qcow2
# or
qemu-img convert -f vmdk -O raw your-disk.vmdk vm-disk.raw

# Step 3: Create a new VM in Proxmox (via GUI) with matching specs (CPU, RAM, etc.)
# Do not start the VM yet. Note the VM ID (e.g., 101)

# Step 4: Replace the VM disk

## If using 'local' storage:
mv vm-disk.qcow2 /var/lib/vz/images/101/vm-101-disk-0.qcow2

## If using 'local-lvm' and you converted to RAW:
qm importdisk 101 vm-disk.raw local-lvm

# Step 5: Attach the imported disk (via GUI)
# - Go to VM > Hardware
# - Add > Hard Disk > Use existing imported disk
# - Set as boot disk if needed

# Step 6: Set boot order (via GUI)
# - Go to VM > Options > Boot Order
# - Ensure imported disk is first

# Step 7: Start the VM

Network PXE Boot

iSCSI Target to nVME 10 GB

Low Latency Storage Optimizations for Proxmox, KVM, & QEMU – https://kb.blockbridge.com/technote/proxmox-tuning-low-latency-storage

Hardware

  • Samsung 990 PRO 4TB M.2 2280 NVMe PCIe 4.0 SSD – $515 Link
  • Samsung 9100 PRO 4TB 2280 M.2 NVMe 2.0 Gen 5 SSD PCI 5 $765 – Link

Ubiquiti Cloud Gateway Fiber – 599 Link

Access Point

Switch Link

CM3588 Link

Ugreen NAS Link

MinisForum Link

CRON

cat /etc/cron.d/*
30 3 * * 0 root test -e /run/systemd/system || SERVICE_MODE=1 /usr/lib/x86_64-linux-gnu/e2fsprogs/e2scrub_all_cron
10 3 * * * root test -e /run/systemd/system || SERVICE_MODE=1 /sbin/e2scrub_all -A -r
#
# cron.d/mdadm -- schedules periodic redundancy checks of MD devices
#
# Copyright © martin f. krafft <madduck@madduck.net>
# distributed under the terms of the Artistic Licence 2.0
#

# By default, run at 00:57 on every Sunday, but do nothing unless the day of
# the month is less than or equal to 7. Thus, only run on the first Sunday of
# each month. crontab(5) sucks, unfortunately, in this regard; therefore this
# hack (see #380425).
57 0 * * 0 root if [ -x /usr/share/mdadm/checkarray ] && [ $(date +\%d) -le 7 ]; then /usr/share/mdadm/checkarray --cron --all --idle --quiet; fi
# cluster wide vzdump cron schedule
# Automatically generated file - do not edit

PATH="/usr/sbin:/usr/bin:/sbin:/bin"

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# TRIM the first Sunday of every month.
24 0 1-7 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/trim ]; then /usr/lib/zfs-linux/trim; fi

# Scrub the second Sunday of every month.
24 0 8-14 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/scrub ]; then /usr/lib/zfs-linux/scrub; fi

Gigabyte.


Bare metal 

Z790 AORUS ELITE (rev. 1.0) - https://www.gigabyte.com/Motherboard/Z790-AORUS-ELITE-rev-10/sp#sp


10 GbE (10 Gigabit Ethernet)
✅ Examples of Gigabyte motherboards with 10 GbE LAN:
Gigabyte Z790 AORUS XTREME

Aquantia® AQC113C 10GbE LAN

Also includes 2.5GbE Intel® LAN

High-end enthusiast board (~$1000+)

Gigabyte TRX50 AERO D (for AMD Threadripper)

Marvell AQtion AQC113 10GbE

Also includes 2.5GbE Realtek LAN

For workstation-class CPUs

Gigabyte Z690 AORUS XTREME WATERFORCE

10GbE Aquantia® + 2.5GbE Intel®

E-ATX, liquid-cooled premium board
Here’s a no-nonsense AMD build focused on:

✅ DDR5 support

✅ PCIe 5.0 M.2

✅ No onboard graphics or Wi-Fi

✅ 2.5 GbE or 10 GbE LAN

✅ No GPU included

✅ Quality PSU suggestion

🔧 Option A – 2.5 GbE LAN (Mainstream Performance)
🟣 Motherboard:
Gigabyte B650 AORUS ELITE AX (rev. 1.0) (look for non-AX if avoiding Wi-Fi entirely)

✅ DDR5 support (up to DDR5-8000+ OC)

✅ 1x PCIe 5.0 x4 M.2 (CPU direct)

✅ Realtek 2.5 GbE LAN

❌ Onboard Wi-Fi (AX version has it — non-AX preferred)

❌ No integrated graphics (rely on CPU or add GPU)

Form Factor: ATX

🔗 Gigabyte B650 AORUS ELITE product page

🔧 Option B – 10 GbE LAN (High-End Workstation)
🔴 Motherboard:
Gigabyte TRX50 AERO D (for AMD Threadripper 7000)

✅ DDR5 ECC/non-ECC up to 1TB

✅ 2x PCIe 5.0 x4 M.2

✅ Marvell AQtion 10 GbE + Realtek 2.5 GbE

❌ No Wi-Fi

❌ No onboard graphics

Designed for HEDT/Workstation builds

Form Factor: E-ATX

🔗 Gigabyte TRX50 AERO D product page

🛑 Requires a Threadripper 7000 CPU (not Ryzen 7000) — expensive but ideal for high-throughput work.

⚡️ Power Supply Suggestions (PSU)
Tier	PSU	Wattage	Notes
🔹 Mid-High	Corsair RM850e (850W, 80+ Gold)	850W	Fully modular, quiet, reliable
🔸 High-End	Seasonic PRIME TX-1000 (1000W, 80+ Titanium)	1000W	Extreme efficiency, premium build
🔹 Budget	be quiet! Pure Power 12 M 750W (80+ Gold)	750W	Solid, quiet, ATX 3.0 ready

🧩 Summary
Spec	2.5 GbE Option	10 GbE Option
CPU	AMD Ryzen 7000 (e.g. 7600X)	AMD Threadripper 7000
Mobo	Gigabyte B650 AORUS ELITE (non-AX)	Gigabyte TRX50 AERO D
PCIe 5.0 M.2	✅	✅ (2x)
DDR5	✅	✅ (ECC/non-ECC)
LAN	Realtek 2.5GbE	Marvell AQtion 10GbE + Realtek 2.5GbE
Wi-Fi	❌ (non-AX version)	❌
PSU	Corsair RM850e (850W)	Seasonic PRIME TX-1000 (1000W)

Import OVA into Proxmox

# Step 1: Extract the OVA file
tar -xvf yourfile.ova

# Step 2: Convert VMDK to QCOW2 or RAW
# (choose one output format depending on your Proxmox storage)
qemu-img convert -f vmdk -O qcow2 your-disk.vmdk vm-disk.qcow2
# or
qemu-img convert -f vmdk -O raw your-disk.vmdk vm-disk.raw

# Step 3: Create a new VM in Proxmox (via GUI) with matching specs (CPU, RAM, etc.)
# Do not start the VM yet. Note the VM ID (e.g., 101)

# Step 4: Replace the VM disk

## If using 'local' storage:
mv vm-disk.qcow2 /var/lib/vz/images/101/vm-101-disk-0.qcow2

## If using 'local-lvm' and you converted to RAW:
qm importdisk 101 vm-disk.raw local-lvm

# Step 5: Attach the imported disk (via GUI)
# - Go to VM > Hardware
# - Add > Hard Disk > Use existing imported disk
# - Set as boot disk if needed

# Step 6: Set boot order (via GUI)
# - Go to VM > Options > Boot Order
# - Ensure imported disk is first

# Step 7: Start the VM

Mount CIFS share

apt install -y cifs-utils
mkdir -p /mnt/nas
sudo mount -t cifs //192.168.1.146/Disk2 /mnt/nas -o guest,vers=2.0


rsync -avz --progress --partial --inplace --timeout=600 \
  /mnt/backup/DL/dl.liangroup.net/SANS/ /mnt/nas/ROSHAN/eLearning/

Docker inside Proxmox

## Setup Docker VM 

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/vm/docker-vm.sh)"


## Enable root SSH

ssh-keygen -R 192.168.1.37

username: root
Password: root

dpkg --configure -a
apt update && apt install -y openssh-server && mkdir -p /var/run/sshd && sed -i 's/^#PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config && sed -i 's/^#PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config && /usr/sbin/sshd -D &
sudo passwd root


## Setup Protainer inside Docker VM

docker volume create portainer_data

docker run -d \
  --name portainer \
  --restart=always \
  -p 9000:9000 \
  -p 9443:9443 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:latest
  https://<docker-vm-ip>:9443

Rack

Link

RackStack – https://blog.briancmoses.com/2025/03/rackstack-an-open-source-modular-and-3d-printed-miniature-rack.html

BIOS

https://download.gigabyte.com/FileList/Manual/mb_manualjp_z790m-aorus-elite-ax_1203_e.pdf?v=9eb73abef06ad2a0b626cf5eed31d8d1

https://www.gigabyte.com/Motherboard/Z790M-AORUS-ELITE-AX-rev-12/support#dl

https://chatgpt.com/c/684f6a2b-2b24-800e-808f-eed17ee32add

https://www.gigabyte.com/Motherboard/Z790M-AORUS-ELITE-AX-rev-12

https://esupport.gigabyte.com/#id:1863082


ToDo

iPhone App

Reference