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

    Cannot import VHD disks while VMDK can

    Scheduled Pinned Locked Moved Solved Xen Orchestra
    9 Posts 3 Posters 346 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.
    • abudefA Offline
      abudef
      last edited by

      Hello, I cannot import a VHD with the following error:

      b2791856-5932-4432-8cbc-d6f01aade534-image.png

      When I click on Show logs, there is no entry related to this in the Logs area.

      Using qemu-img I converted the VHD to VMDK and it is now importing normally:

      fa9986aa-5030-4984-989b-6410d60d5a86-image.png

      Tested with XO commit 07024 and XOA 5.96.0

      1 Reply Last reply Reply Quote 0
      • planedropP Offline
        planedrop Top contributor
        last edited by

        Good news is Hyper-V can convert this to a dynamic disk, or at least it could, has been a minute since I've done it myself lol. If you edit the VHD in Hyper-V, you can select Convert, then VHD (don't use VHDX), and then select Dynamic.

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

          Hi,

          Maybe your VHD was not in the sparse format.

          1 Reply Last reply Reply Quote 0
          • abudefA Offline
            abudef
            last edited by

            I'm not quite sure what you mean. The disk can be used in Hyper-V and VirtualBox without any problems. Are there any special requirements for imported VHDs?

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

              Yes, the VHD needs to by dynamic, not static.

              1 Reply Last reply Reply Quote 0
              • abudefA Offline
                abudef
                last edited by

                I see. It's a pre-allocated disk image. Thank you for the explanation.

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

                  Yes, that's the problem. See https://docs.xcp-ng.org/installation/migrate-to-xcp-ng/#-from-hyper-v

                  abudefA 1 Reply Last reply Reply Quote 1
                  • abudefA Offline
                    abudef @olivierlambert
                    last edited by

                    @olivierlambert said in Cannot import VHD disks while VMDK can:

                    See https://docs.xcp-ng.org/installation/migrate-to-xcp-ng/#-from-hyper-v

                    Oh, yeah, I missed that somehow... I looked it up in the Xen Orchestra documentation...

                    1 Reply Last reply Reply Quote 0
                    • planedropP Offline
                      planedrop Top contributor
                      last edited by

                      Good news is Hyper-V can convert this to a dynamic disk, or at least it could, has been a minute since I've done it myself lol. If you edit the VHD in Hyper-V, you can select Convert, then VHD (don't use VHDX), and then select Dynamic.

                      1 Reply Last reply Reply Quote 0
                      • olivierlambertO olivierlambert marked this topic as a question on
                      • olivierlambertO olivierlambert has marked this topic as solved on
                      • abudefA Offline
                        abudef
                        last edited by

                        qemu-img convert disk_image_fixed.vhd -O vpc -o subformat=dynamic disk_image_dynamic.vhd
                        
                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post