XCP-ng Disk Pass Through Won't Persist

Hi Tom,

I followed your guide on the topic of passing through disks on XCP-ng as per the embedded video’s instructions. It worked and I could access my passed through disk (which I will be referring to as “disk A”). Unfortunately however, upon, passing disks through via the use of a symbolic link (eg: Disk A “/dev/sde” to the “/srv/pass_drives”) as you indicated, a serious problem arose:

After a hypervisor system reboot or after a temporary disk A reinsertion, the desired disk A changes from being identified as “/dev/sde” to, for instance, “/dev/sdg”, whereas other disks may then take on the place, name and role of “/dev/sde”. This leads Xen Orchestra or XCP-ng’s “Pass_Drives” storage repository to think there’s either no disk, or worse, points to the a different disk B that, after a reboot, has now taken the location of “/dev/sde”.

This is a major nuisance and security risk.

I think I know what the solution could be. That said, I don’t know how to implement it.
The ideal scenario would be that disk A be passed through based on said disk A’s UUID so that the association between the symbolic link (“srv/pass_drives/”) and the desired disk A itself persists after a restart.

If possible, how can this be achieved?

Thanks a million, Tom! No words describe your contributions. You’re a godsend. :heart:

I am in the same boat and am currently researching on how this can be done

A while back i wanted to do the same thing and also noticed the reboot thing what i ended up doing was creating a software raid 1 with that disk and then edited the /etc/udev/rules.d/65-md-incremental.rules to make xcp-ng see that specific md array as a usb device and then pass that device to the vm as a usb disk that way all settings remain after reboots but be carefull on upgrading xcp-ng as it will repalce the file to its original and you will have to do this after the upgrade, all files remain on the passedthrough disk unchanged. Found that method here for reference https://mangolassi.it/topic/17831/attach-drive-to-vm-in-xenserver-not-as-storage-repository/6