Xenserver Hard Drive / Whole Disk Passthrough with XCP-NG

Just an FYI, with the latest XCP-NG (updated last night to 8.2.1), the sr-create step no longer seems to generate the UUID, says it is missing when you execute that line. I’ll play with it more when I have a chance.


I deleted the sym links to see if order of operations was important, but didn’t seem to matter.

Maybe because these servers are in a pool, but it wanted to know which host (by UUID) these were going to be attached to. host-uuid= long string of numbers and letters copied from the the host tab in XO completed the task.

Installed XCP-ng over Leap which was used as my KVM Server having,

[19:01 xcp-ng mnt]# blkid | grep "crypto_LUKS"
/dev/sda1: UUID="1cc46889-d49b-4772-8eaa-bb03497b74f5" TYPE="crypto_LUKS"
/dev/sdc1: UUID="fb1244ce-8054-4fd8-b182-cd5d19a849ea" TYPE="crypto_LUKS"
/dev/sdd1: UUID="9ef7c851-f6e3-4edb-883f-8fa66d588248" TYPE="crypto_LUKS"
/dev/sde1: UUID="b65abff0-4540-40ab-bf9b-16ae762c8614" TYPE="crypto_LUKS"
/dev/sdf1: UUID="d38cd9cf-b76f-4d08-87f6-2fa63153423f" TYPE="crypto_LUKS"

and was hoping to mount them so I can move the vm’s before making these dev’s into SR’s. But, I get this message,

[19:03 xcp-ng mnt]# cryptsetup luksOpen /dev/sde1 encrypted_sde1
Unsupported LUKS version 2.

So, I’ve created a Leap VM and want to attached these drives, instead of creating a new folder, can I use either the folder

  • /dev/disk/by-id
  • /dev/disk/by-uuid

that are already created by the host and,

xe sr-create name-label=Leap_Drives type=udev content-type=disk device-config:location=/dev/disk/by-uuid

Well this work without xcp-ng erasing the disks?

Well, I just did this as instructed

ln -s /dev/sda /srv/leap-drives/sda
ln -s /dev/sdc /srv/leap-drives/sdc
ln -s /dev/sdd /srv/leap-drives/sdd
ln -s /dev/sde /srv/leap-drives/sde
ln -s /dev/sdf /srv/leap-drives/sdf

xe sr-create name-label=“Leap Drives” name-description=”Leap Lab KVM SR” type=udev content-type=disk device-config:location=/srv/leap-drives

and was able to attached the disks to the Leap VM and mount them as expected, now I can move the vm’s and wipe these disks to be used for SR’s… :clap: :grinning:


leave as is :nerd_face:, because this is my Leap Test Lab Server. Any drawbacks for this type of setup?