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 1.2k 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.
    • A 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
          • A 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
              • A 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

                  A 1 Reply Last reply Reply Quote 1
                  • A 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
                      • A 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

                        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