XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Create a VM with an existing iSCSI disk

    Scheduled Pinned Locked Moved Management
    4 Posts 3 Posters 738 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N Offline
      nodje
      last edited by

      Re: how to create a VM and with an imported VHD disk?

      Looking at this thread to understand how to create a new VM without creating a Disk, I followed @Danp advice to create the VM without disk to Attach one later on.

      Unfortunately, there doesn't seem to be a way to attach an entire iSCSI SR as a Disk to a VM.

      To provide context about what I'm trying to do:
      I have an UEFI VM running under TrueNAS where the main storage is a Zvol. Trying to transfer the VM to XCP-NG, I can share this zvol with iSCSI and mount the zvol on XCP-NG with XOA.

      But AFAIK, there aren't any option to directly use the iSCSI storage as a VM disk.
      (On Proxmox there's this option called "Use LUN directly" which does exactly this)

      Here's what is on the zvol:

      Disk /dev/zvol/tank/ubuntudockerhost-0vhbns-clone: 80 GiB, 85899345920 bytes, 167772160 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 16384 bytes
      I/O size (minimum/optimal): 16384 bytes / 33554432 bytes
      Disklabel type: gpt
      Disk identifier: F02887A7-E662-44BC-83A5-6905B15FF0EE
      
      Device Start End Sectors Size Type
      /dev/zvol/tank/ubuntudockerhost-0vhbns-clone1 2048 1050623 1048576 512M EFI System
      /dev/zvol/tank/ubuntudockerhost-0vhbns-clone2 1050624 3147775 2097152 1G Linux filesystem
      /dev/zvol/tank/ubuntudockerhost-0vhbns-clone3 3147776 167772126 164624351 78.5G Linux filesystem
      

      And here's what I can see on XCP-NG.
      I'm guessing the LVM VG created on the device means that the original partitions on the volume have been overrided.

      [14:20 xcp-ng-truenas ~]# lsblk
      NAME                                                                                              MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
      sdb                                                                                                 8:16   0    80G  0 disk 
      └─VG_XenStorage--630141c0--1a17--7252--d2a0--aa31476eccbf-MGT                                     253:1    0     4M  0 lvm
      

      Is there anyway to achieve an iSCSI mount without automatic LVM VG creation?

      ronan-aR 1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Ping @ronan-a or @dthenot I'm not sure it's easy to do that (except using maybe having a first system disk on a regular SR and then mount the iSCSI share after the VM boots as a "regular" share inside the guest OS)

        1 Reply Last reply Reply Quote 0
        • ronan-aR Offline
          ronan-a Vates 🪐 XCP-ng Team @nodje
          last edited by

          @nodje said in Create a VM with an existing iSCSI disk:

          Is there anyway to achieve an iSCSI mount without automatic LVM VG creation?

          You can try with the "RawISCSISR" driver but it's not really tested on our side, I can't confirm that it will work. It doesn't support creation of VDIs but you can use it to access existing LUNs on a target.

          N 1 Reply Last reply Reply Quote 1
          • N Offline
            nodje @ronan-a
            last edited by

            @ronan-a Any more information about RawISCSISR usage?
            I can't seem to find any good match on the web.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post