Log into the XCP-NG host and use lsblk to find disks available
On the XCP-NG host create a directory under /srv/ where you will be linking the drives
mkdir /srv/pass_drives
Create symbolic links to the drives within the created directory, this example uses sda and sdb. Be careful not to use a drive in use either XCP-NG or any other local storage setup.
Absolutely, I agree. However, I am beginning to rip my movie collect for Plex and it would be nice to use a VM on a more powerful server rather than my laptop. So I am trying to pass through DVDs to be ripped by software on a VM. Is this something thatās even possible? Appreciate your help Tom!
Most hypervisors support hardware pass-through such as a DVD natively. I usually console to a VM and from their I can mount a host DVD drive to a VM. If that is not an option, PCI pass-through might be your answer. https://github.com/xcp-ng/xcp/wiki/PCI-Passtrough
Is there any way to use /dev/disk/by-id instead of /dev/sdX? /dev/sd can change the disks and then it wonāt pass through the right disk. When I tried this, it just gave me an error in xen-orchestra that itās not not the right bus type, even though itās the same as /dev/sdX. Does XCP-NG not follow links?
Thanks, FredFerrell! This is what I needed to do. However, I had to purchase a separate SATA PCI card, connect the Blu-ray drive to that card and pass that PCI slot through to the VM. It worked perfectly. Thanks again!
is there a way to remove a certain drive from the pass-through list, a drive got degraded in freenas and i had to remove it physically so i could boot up, but freenas canāt see my hds in the right order now
Edit: solution is to remove the link that was made in the pass-through folder
I have followed the instructions but not able to see the drives in the storage repository āPass_Drivesā in xen orchestra or xcp-nc center.
I see the drives in the console when i type ālsblkā.
I can use cfdisk and see the drives sizes there.
The simbolic links are made and checked in the console.
The storage repository āPass_Drivesā is made and visible in xen orchestra and xcp-nc center.
Also the rescan is not working.
Has somebody a clue what i am missing?
am I going through the right way?
I connected a second disk in EXT everything is ok it is visible in the storage list
if I would like to add a local iso library on the installation disk by any problem I create a directory /opt/isoslib (for example) and I give the path in xoa
the problem is that my directory is on the first disk, I would prefer to have it on the second disk
my system
XCP-ng 8.2.0 with xoa
xcp-ng is installed on a first 240GB disk
I would like to use the second disk (2TB) to store the isoās, to share data storage disk space from the VMs (the VMs will be deployed on the first disk)
information on both discs
first ssd disk (2xssd 250Go RAID1)
second HDD drive
(2xhdd 2TB Raid1)
I thought about creating the directory /opt/isoslib and mounted it on the second disk but the problem is that I have this error mount: unknown filesystem type āLVM2_memberā
I suspected that it would not pass since disk two is already in use via xe sr-create host-uuid ā¦
I have a question regarding whole disk Passthrough, but not sure you can answer it. As a bit of a lark, Iāve been trying to set up a TrueNAS system under XCP-ng as in your video. I followed your instructions to the letter, but ended up with something I cannot figure out.
My system has 4 hard drives installed; 1 4TB IronWolf and 3 3TB IronWolfs. Using lsblk, they show up as sda, sdb, sdc and sdd. I want to pass through the sdb, sdc and sdd drives (3TBs) so did the mkdir, then the symbolic links and finally xe sr-create command. All this worked as expected. The three drives showed up in XOA and I connected them to the TrueNAS vm.
TrueNAS then installed, so after a few housekeeping things, I then went into Storage and created a new pool and telling TrueNAS to make a zfs1 pool using the 3 3TB drives. However, instead of the the drives being named sdb, sdc and sdd, they were named sdb, sdc and xbd! The zpool was created successfully and I was able to populate it, but just couldnāt understand why the third drive was labeled xdb instead of sdb.
Also, after rebooting the TrueNAS system, if I went into Storage then Disks, no drives were displayed. The pool still existed and was accessible, but no drives were shown?
I realize that you said running FreeNAS in a VM with Disk Passthrough wasnāt something you would do in production, but I was curious none the less.
I did this as a demo but itās not something I have ever or would ever run outside of a lab so I have only this system that I tested. Might want to post in their forums to get more insight Home | XCP-ng and XO forum
Long time viewer of the youtube channel,
first time poster.
So first up, i know to not use this for production, i just want to try something for fun and learning.
i work in industrial automation, and in this space we just yet started to put ethernet ports on the logic programmable controllers for comms and programming.
Thatās where i come in, i am setting up a dell R720 SFF 16bay with an H310 flashed to it mode,
on the internal USB i have XCP-NG running, and on Sata ssd disk 0 i have XOA-from source running, and on Sata SSD 0 i have windows running with a Scada software called Ignition maker edition.
this al to learn how to log data to databases and read them back and such.
this al works, now the part that doesnāt work,
on disk slot 1 i have installed Truenas V12
slot 7 i have a free Sata SSD to use as a cache disk for truenas, passed through to Truenas
slot 8-15 i have SAS 1tb Drives to use as storage for truenas, also passed through.
All drives report their exact size in XOA, but when i login truenas, i get no data about these drives, and al the sizes except the boot drive are the size of the ssdās eg 240gb.
what am i doing wrong ?
i have a feeling i know whats up, but i want to hear from more knowledgeable people
Yesterday my proxmox SSD had an unfortunately problem due to a system lockup and my server setup was ruinedā¦ I thought letās reinstall xcp-ng againā¦ All went fineā¦
Now I get a wrong vga mode on boot and canāt see anything. But that is not the main problem.
In proxmox you could easily passthough a physical disk almost the same way like with xcp-ngā¦ I tried Tomās way by watching the video (I believe from 2020)ā¦ That methos seems to work for whole disks but not for partitionsā¦
In proxmox I could easily passthrough a partition and use them in truenas for a slog or cache diskā¦
Anyone know how to do this in xcp-ngā¦ Passing through the /dev/disk/by-id/ links doenāt workā¦ Only for full disks.
Also I think it would be better to pasthrough them not by /dev/xxx but with their long unique identifier
but in any case it doesnā't workā¦ Not sure if there is a direct way (like with proxmox) to edit each VMās config file? In proxmox you simply edit the xxx.conf file.
update >>> nvm. I got it to workā¦ It was a booboo on my endā¦ sorry about thatā¦
Thanks for the great video Tom been following them all lately. To add on to your video in case anyone ever have a disk that dies and need to look them up using lsblk along with serial numbers as it was not available on the web so I looked up the cmd myself and modify it to provide as much data as possible:
Reason for this is because NAME (sdX) and HCTL (0:0:X:0) changes if you unplug the drive while the system is on so you need something that doesnāt change.
[18:20 xcp-ng-testingunit pass_drives]# lsblk --nodeps -o NAME,FSTYPE,HCTL,VENDOR,MODEL,SERIAL,SIZE,REV,STATE
NAME FSTYPE HCTL VENDOR MODEL SERIAL SIZE REV STATE
sdf ddf_raid_member 0:0:7:0 TOSHIBA MG03SCA300 5001232432342F79 2.7T DG04 running
sdd ddf_raid_member 0:0:3:0 TOSHIBA MG03SCA300 50S13234253340f9 2.7T DG04 running
sdb linux_raid_member 0:0:1:0 ATA Micron_M600_MTFD 123423C23423 953.9G MU03 running
tdc 20G
tda zfs_member 20G
sde 0:0:6:0 ATA ST3250824AS 5ND3M7W0 232.9G H running
sda linux_raid_member 0:0:0:0 ATA Micron_M600_MTFD 123423C23423 953.9G MU03 running
tdd iso9660 16M
tdb 20G
(If anyone has a better idea let me know. I prefer if the blinking lights work in IT MODE for the Dell R720XD but blinking leds doesnāt work when flashing the H710P. You can flash it back but obviously TrueNAS, passthrough doesnāt work unless you flash the raid controller.)
you said you got it to work do you be by-id? Or just the regular passthrough. I notice if you add another disk during failure the sdX will just move forward letter wise and if you shutdown the system in the future the letter all reset and all the number gets screwup. Not sure if this affects TrueNAS though when drives move around.