Skip to content

proxmox ve

installation

use terminaal ui instead graphical install bc its easier to navigate with keyboard

configuration

apt

change the entries of those 3 lists directly or through pve gui node > updates > repos

/etc/apt/sources.list
deb http://ftp.ch.debian.org/debian bookworm main contrib
deb http://ftp.ch.debian.org/debian bookworm-updates main contrib
deb http://security.debian.org bookworm-security main contrib
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
/etc/apt/sources.list.d/pve-enterprise.list 
#deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
/etc/apt/sources.list.d/ceph.list
#deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise
deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription
deb http://download.proxmox.com/debian/ceph-reef bookworm no-subscription

qemu guest agent

handout

sudo apt install qemu-guest-agent
systemctl start qemu-guest-agent
systemctl enable qemu-guest-agent

vm > options > qemu quest agent

cloud init

handout

add new hdd to pve (virtual storage for vm)

node > disks > directory > create directory

disk: /dev/sdX
filesystem: ext4
name: <name>

add virtual storage to vm

vm > hardware > add harddisk

add new hdd to vm (passthrough)

handout 1

handout 2

apt install lshw

lshw -class disk -class storage
product: ST20000NM002H-3K serial: ZYD0FS4W
ls -la /dev/disk/by-id/
ata-ST20000NM002H-3KV133_ZYD0FS4W -> ../../sda or
ls -la /dev/disk/by-id/ | grep ZYD0FS4W
ls -la /dev/disk/by-id/ | grep ZYD0HAY9
qm set 100 -scsi1 /dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYD0FS4W
qm set 100 -virtio0 /dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYD0FS4W (if raid controller or raid activated)
qm set 100 -scsi2 /dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYD0HAY9

check if successfull

grep ZYD0FS4W /etc/pve/qemu-server/100.conf
scsi1: /dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYD0FS4W,size=18627G

grep ZYD0HAY9 /etc/pve/qemu-server/100.conf
scsi2: /dev/disk/by-id/
ata-ST20000NM002H-3KV133_ZYD0HAY9,size=18627G

to remove

qm unlink 100 --idlist scsi1
or
qm unlink 100 --idlist virtio0

afer its added, its available instand on OS without adding hardware through pve gui

cli vm start, stop, restart

Tip

qm --help
qm list
qm start <vmid> [options]
qm stop <vmid> [options]
qm reboot <vmid> [options]
qm shutdown <vmid> [options]

forcekill vm like unplug ac

will show you the kvm process id running your vmid

ps aux | grep <vmid> 

you can now kill it with the process ID

kill -9 <PID>

make free space if qemu-agent is enabled

fstrim --help 
fstrim -a

show location of each storage

pvesm status
or
cat /etc/pve/storage.cfg
cat /etc/pve/storage.cfg 
    dir: local
    path /var/lib/vz
    content backup,vztmpl,iso

lvmthin: local-lvm
    thinpool data
    vgname pve
    content images,rootdir

dir: extssd0
    path /mnt/pve/extssd0
    content backup,snippets,vztmpl,images,rootdir,iso
    is_mountpoint 1
    nodes pve

dir: m2280wd4tb
    path /mnt/pve/m2280wd4tb
    content iso,rootdir,images,vztmpl,backup,snippets
    is_mountpoint 1
    nodes pve

iso images location

/var/lib/vz/template/iso
/mnt/pve/m2280wd4tb/template/iso
etc.

troubleshoot

no connection

change adapter to realtek