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

    qemu-img formats

    Scheduled Pinned Locked Moved Compute
    3 Posts 3 Posters 1.4k 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.
    • P Offline
      pavkamlc
      last edited by

      I'd like to migrate VMs from my dead proxmox host. VMs images is qcow on shared storage. I've problem with converting images, because qemu-img on xcp-ng host don't support destination format for xcp-ng.

      /usr/lib64/xen/bin/qemu-img convert -o vpc vm-113-disk-0.qcow2 terminalsys.vhd
      qemu-img: Invalid parameter 'vpc'
      

      But don't support middle format too.

      /usr/lib64/xen/bin/qemu-img convert -O vmdk vm-113-disk-0.qcow2 terminalsys.vmdk
      qemu-img: Unknown file format 'vmdk'
      

      --help write only this supported formats

      Supported formats: blkdebug blklogwrites blkreplay blkverify copy-on-read file host_cdrom host_device luks nbd null-aio null-co nvme qcow qcow2 quorum raw throttle vdi
      

      Have anyone hint howto solve without another machine for converting?

      AtaxyaNetworkA 1 Reply Last reply Reply Quote 0
      • AtaxyaNetworkA Offline
        AtaxyaNetwork Ambassador @pavkamlc
        last edited by AtaxyaNetwork

        @pavkamlc Hi !

        Usually I convert my qcow2 file to VHD directly on Proxmox.

        As far as I remember, when I crashed my Proxmox in the school lab, I didn't succeed to convert the image directly on a Linux box.

        I found a workaround, but it's pretty messy:

        • Install a Debian VM
        • Install the proxmox-ve package (you'll need the Proxmox repository)
        • Mount your shared storage directly on your new VM (with NFS for example).
        • Then, you can convert

        Let me know if it's working !

        1 Reply Last reply Reply Quote 2
        • J Offline
          joeymorin
          last edited by

          Late to the game, but this might help someone...

          I don't recommend this in a production environment, but it would be fine for e.g. a home lab.

          I built qemu from source on another host (in my case, on a laptop running Ubuntu Mate):

          ./configure --static
          make
          

          ... and then sftp'd the generated qemu-img executable to the XCP-ng host (I didn't care about any other outputs from the build process, some of which failed anyway likely due to the ancient version of Ubuntu Mate running on my laptop).

          Building with --static avoided any issues with missing libraries on the XCP-ng host, at least for qemu-img.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post