Disk Passthrough with XCP-NG - mdadm raid1 - Unrecognised bus type

Which is better?

  1. Passthrough device and create raid inside VM
  2. create raid on dom0 and passthrough mdadm array to VM

I have a RAID1 created on dom0 with mdadm.

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      7813832334   3.6 TiB     FD00  Linux RAID

NAME                                                  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sdb                                                     8:16   0   3.7T  0 disk  
└─sdb1                                                  8:17   0   3.7T  0 part  
  └─md127                                               9:127  0   3.7T  0 raid1 
sdc                                                     8:32   0   3.7T  0 disk  
└─sdc1                                                  8:33   0   3.7T  0 part  
  └─md127                                               9:127  0   3.7T  0 raid1 

# xe sr-create name-label=drivepass type=udev content-type=disk device-config:location=/srv/drivepass
0c35436b-501f-14b5-b2db-b6a2a7d9d7b8

With direct disk devices

/srv/drivepass
└── raid4tb -> /dev/md127


# xe sr-scan uuid=0c35436b-501f-14b5-b2db-b6a2a7d9d7b8
# xe vdi-list sr-uuid=0c35436b-501f-14b5-b2db-b6a2a7d9d7b8

uuid ( RO)                : 660aa2f9-9f73-4dfd-be07-96911d4afff9
          name-label ( RW): Unrecognised bus type 
    name-description ( RW): 
             sr-uuid ( RO): 0c35436b-501f-14b5-b2db-b6a2a7d9d7b8
        virtual-size ( RO): 0
            sharable ( RO): false
           read-only ( RO): false

I would not use either one in production, testing with either is fine.

What about Unrecognised bus type and the fact that the disks are 0 bytes - xcp-ng does not see them. How to go about that?

Try their forums as this is not a setup that I have done.