Letztens habe ich aus Versehen bei einer sehr kleinen VM innerhalb von Proxmox die Festplatte mit dem normalen Resize Tool vergrößert und zwar viel zu groß. Aber auch schnell bemerkt die Proxmox GUI lässt einen natürlich nicht zurück und das RAW Device hat dann halt die ausgewählte größe und Ende. Also schnell mal gucken wie man das verkleinern kann.

Wenn es sich wie bei mir nur um ein RAW-Device handelt, dann ist der Weg sehr einfach.

# Finde den Pfad deines RAW Devices auf deinem System und verkleiner die Disk #
# --shrink - steht für die Zielgröße und nicht um wieviel kleiner gemacht werden soll #

qemu-img resize -f raw /var/lib/vz/images/100/vm-100-disk-0.raw --shrink 5G

Damit ist das RAW Device physikalisch schon mal kleiner, aber Proxmox weis das noch nicht so wirklich. Also ändern wir händisch in der Proxmox Umgebung diesen Status.

# QM Files liegen unter /var/pve/qemu-server/<vm-id>.conf #
nano /etc/pve/qemu-server/100.conf

# Ändere die Zeile in deine korrekt Größe der RAW Disk #
scsi0: local:100/vm-100-disk-0.raw,iothread=1,size=5G

Jetzt müssen wir nur noch „qm“ auch Bescheid geben, dass die Disk sich verkleinert hat. Ein „qm rescan“ löst auch das Problem.

# qm rescan guckt über ALLE Disks und passt ggf. die Größen an #

qm rescan

Jetzt ist deine Disk verkleinert und wird auch im Backup wieder normal mit dieser Größe erkannt.

# Vorschau Produkt Bewertung Preis
1 MINIS FORUM MS-01 Mini Workstation Intel Core i5-12600H (vPro Enterprise Support) Mini PC,2X 10Gbps SFP+/2X 2.5G RJ45/2x USB4/HDIM/1x PCIe4.0x16 Slot/Support 3X M.2 2280/22110/U.2 SSD,Pas de RAM/SSD MINIS FORUM MS-01 Mini Workstation Intel Core i5-12600H (vPro Enterprise Support) Mini PC,2X 10Gbps… Aktuell keine Bewertungen 439,00 EUR
2 MNBOXCONET S2 Mini PC N150 10GBE SFP+, Firewall Appliance Micro Büro Hardware, Barebone No RAM No SSD, 2xi226V 2.5Gbit LAN, USB C, TF Card Slot, Support Proxmox OPNsense, SPK/MIC MNBOXCONET S2 Mini PC N150 10GBE SFP+, Firewall Appliance Micro Büro Hardware, Barebone No RAM No… Aktuell keine Bewertungen 339,99 EUR
3 MINIS FORUM Mini PC MS-A2, AMD Ryzen 9 8945HX 16 Kerne/32 Threads Prozessor bis zu 5,4 GHz, Barebone ohne DDR5 RAM(Max bis zu 96GB)/SSD/OS, HDMI/USB-C x 2, 2,5G RJ45 x 2/10G SFP+ x 2, Wi-Fi 6E, BT5.2 MINIS FORUM Mini PC MS-A2, AMD Ryzen 9 8945HX 16 Kerne/32 Threads Prozessor bis zu 5,4 GHz, Barebone… Aktuell keine Bewertungen 599,00 EUR
4 MNBOXCONET S2 Mini PC N150 10GBE SFP+, Firewall Appliance Micro Büro Hardware, DDR5 8GB RAM 128GB SSD, 2xi226V 2.5Gbit LAN, USB C, TF Card Slot, Support Proxmox OPNsense, SPK/MIC MNBOXCONET S2 Mini PC N150 10GBE SFP+, Firewall Appliance Micro Büro Hardware, DDR5 8GB RAM 128GB… Aktuell keine Bewertungen 519,99 EUR
5 MINIS FORUM MS-A2 Mini PC, AMD Ryzen 9 8945HX (16C/32T bis 5,4 GHz, 64 MB Cache), PCIe x16, 8K Triple Display (HDMI + 2X USB-C), 2X 10G SFP+, 2X 2,5G LAN, 3X M.2, ohne RAM/SSD MINIS FORUM MS-A2 Mini PC, AMD Ryzen 9 8945HX (16C/32T bis 5,4 GHz, 64 MB Cache), PCIe x16, 8K… Aktuell keine Bewertungen 599,00 EUR
6 MINIS FORUM MS-01 Mini PC, Prozessor Core i5-12600H 12C/16T bis zu 4,5 GHz, Barebone ohne DDR5 SODIMM/M.2 2280 NVME SSD/3x M.2 2280/22110/U.2 SSD/OS, HDMI/2 x USB4/Port SFP+ 10G×2/2,5G RJ45x2 MINIS FORUM MS-01 Mini PC, Prozessor Core i5-12600H 12C/16T bis zu 4,5 GHz, Barebone ohne DDR… Aktuell keine Bewertungen 439,00 EUR
7 ROUAFWIT Mini PC 10Gbe Firewall 13th Gen U300E, 2 x 10 Gigabit SFP Micro Router Appliance Computer, 4 x i226V 2.5GbE Support Windows OPNsense, Barebone, NO RAM NO Storage NO System ROUAFWIT Mini PC 10Gbe Firewall 13th Gen U300E, 2 x 10 Gigabit SFP Micro Router Appliance Computer… Aktuell keine Bewertungen 439,45 EUR
8 MINIS FORUM MS-A2 Mini PC, AMD Ryzen 7 7745HX (8C/16T bis 5,1 GHz), PCIe x16, 8K Triple Display, 2X 10G SFP+, 2X 2,5G LAN, 3X M.2, ohne RAM/SSD MINIS FORUM MS-A2 Mini PC, AMD Ryzen 7 7745HX (8C/16T bis 5,1 GHz), PCIe x16, 8K Triple Display, 2X… Aktuell keine Bewertungen 499,00 EUR
9 CWWK N150 Mini PC Firewall Appliance (Upgrade von N100), Mini Computer mit 2×10GbE SFP+ und 4×2.5GbE LAN, S3 OPNsense Barebone ohne RAM/SSD/OS, USB-C, TF, SIM, AES-NI CWWK N150 Mini PC Firewall Appliance (Upgrade von N100), Mini Computer mit 2×10GbE SFP+ und… Aktuell keine Bewertungen 319,42 EUR
10 SJRC N150 Firewall Appliance (bis zu 3.6GHz), Dual 10GbE SFP+ Mini PC mit 2 x i226V 2.5GbE LAN, Barebone Micro Router Computer 4K, USB3.2, Support OPNsense/Win (No RAM/SSD/System) SJRC N150 Firewall Appliance (bis zu 3.6GHz), Dual 10GbE SFP+ Mini PC mit 2 x i226V 2.5GbE LAN… Aktuell keine Bewertungen