December 16, 2023

Proxmox USB virtual drive

Создаем пустой usb flash образ (файлstick.img) :

dd if=/dev/zero of=/rpool/data2/stick.img bs=8M count=1000

Подключаем его в конфиге vm, /etc/pve/qemu-server/xxx.conf

args: -device piix3-usb-uhci,addr=0x18 -drive id=usb_disk,file=/rpool/data2/sto.img,if=none,format=raw -device usb-storage,drive=usb_disk,removable=on

xxx - номер виртуальной машины в PVE

Для q35 "чипсета" команда немного другая:

args: -drive id=stick,if=none,format=raw,file=/rpool/data2/sto.img -device usb-storage,drive=stick,bootindex=1