Hey guys,
I'm trying to get UNRAID working in a VM, specifically trying to figure out how to virtualise the USB stick aspect.
I've looked at similar issues (https://forum.proxmox.com/threads/setup-usb-disk-image-for-tailsguest.38824/ and https://forum.proxmox.com/threads/attach-a-raw-image-as-a-usb-disk-to-the-vm.27306/) but neither seem to allow UNRAID to write to the virtual usb disk.
Steps performed:
1. Create VHD and SCP it across to Proxmox.
1a. VHD created as required by unraid instructions.
2. Run the following script:
I've tried both:
and
And whilst the VM boots into UNRAID with both, it throws up a warning that it cannot write to the "disk".
Is img/raw the right way to go here?
Has anyone successfully managed to pass through a writeable disk image as a virtual USB disk (regardless if unraid or not)?
I'm trying to get UNRAID working in a VM, specifically trying to figure out how to virtualise the USB stick aspect.
I've looked at similar issues (https://forum.proxmox.com/threads/setup-usb-disk-image-for-tailsguest.38824/ and https://forum.proxmox.com/threads/attach-a-raw-image-as-a-usb-disk-to-the-vm.27306/) but neither seem to allow UNRAID to write to the virtual usb disk.
Steps performed:
1. Create VHD and SCP it across to Proxmox.
1a. VHD created as required by unraid instructions.
2. Run the following script:
Bash:
VMNUM=1112
VMSCSINUM=0
VMDISKLOC=/mnt/prox/images
DISK_STOR=Proxmox
USBARG="args: -drive 'file=$VMDISKLOC/$VMNUM/vm-$VMNUM-disk-$VMSCSINUM.raw,if=none,id=drive-usb0,format=raw,cache=none,aio=io_uring,detect-zeroes=on' -device 'usb-storage,drive=drive-usb0,bootindex=1,removable=on'"
cd $VMDISKLOC/$VMNUM/
qemu-img convert -O raw UNRAID.vhd unraid.img && \
rm UNRAID.vhd && \
qm importdisk $VMNUM unraid.img $DISK_STOR && \
qm set $VMNUM --scsihw virtio-scsi-pci --scsi$VMSCSINUM $DISK_STOR:$VMNUM/vm-$VMNUM-disk-$VMSCSINUM.raw && \
sed -i -e "1i${USBARG} ${1}" /etc/pve/qemu-server/$VMNUM.conf
I've tried both:
Code:
args: -drive 'file=/mnt/prox/images/1112/vm-1112-disk-0.raw,if=none,id=drive-usb0,format=raw,cache=none,aio=io_uring,detect-zeroes=on' -device 'usb-storage,drive=drive-usb0,bootindex=1,removable=on'
and
Code:
args: -drive id=stick,if=none,format=raw,file=/mnt/prox/images/1112/unraid.img -device usb-storage,drive=stick,bootindex=1,removable=on
And whilst the VM boots into UNRAID with both, it throws up a warning that it cannot write to the "disk".
Is img/raw the right way to go here?
Has anyone successfully managed to pass through a writeable disk image as a virtual USB disk (regardless if unraid or not)?
Last edited: