ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    QUEMU/KVM to Azure

    IT Discussion
    kvm azure vhdx vhd qcow2
    3
    9
    2.1k
    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.
    • IRJI
      IRJ
      last edited by

      I am in the process of preparing an Ubuntu server for deployment to Azure. I have configured the system for azure migration per microsoft docs. I have converted the qcow2 image to vhdx. Now I need to convert it to VHD. There are tons of tools for Windows to do this, I am looking for a linux command line solution.

      1 Reply Last reply Reply Quote 2
      • DustinB3403D
        DustinB3403
        last edited by

        Why not go direct from qcow2 to vhd with qemu-img?

        IRJI 1 Reply Last reply Reply Quote 0
        • IRJI
          IRJ @DustinB3403
          last edited by

          @DustinB3403 said in QUEMU/KVM to Azure:

          Why not go direct from qcow2 to vhd with qemu-img?

          I seen to only be able to convert to vhdx

          DustinB3403D 1 Reply Last reply Reply Quote 0
          • DustinB3403D
            DustinB3403 @IRJ
            last edited by DustinB3403

            @IRJ said in QUEMU/KVM to Azure:

            @DustinB3403 said in QUEMU/KVM to Azure:

            Why not go direct from qcow2 to vhd with qemu-img?

            I seen to only be able to convert to vhdx

            That doesn't make a lot of sense, as the documentation says it supports conversations (haha) conversions* of all types. Is there an error you are getting?

            IRJI 1 Reply Last reply Reply Quote 0
            • IRJI
              IRJ @DustinB3403
              last edited by

              @DustinB3403 said in QUEMU/KVM to Azure:

              @IRJ said in QUEMU/KVM to Azure:

              @DustinB3403 said in QUEMU/KVM to Azure:

              Why not go direct from qcow2 to vhd with qemu-img?

              I seen to only be able to convert to vhdx

              That doesn't make a lot of sense, as the documentation says it supports conversations (haha) conversions* of all types. Is there an error you are getting?

              sudo qemu-img convert -f qcow2 -O vhd secureonion.qcow2 secureonion.vhd
              qemu-img: Unknown file format 'vhd'
              1 Reply Last reply Reply Quote 0
              • IRJI
                IRJ
                last edited by

                However this command works just fine...

                sudo qemu-img convert -f qcow2 -O vhdx secureonion.qcow2 secureonion.vhdx
                RomoR 1 Reply Last reply Reply Quote 1
                • RomoR
                  Romo @IRJ
                  last edited by Romo

                  @IRJ Try this:

                  qemu-img.exe convert source.qcow2 -O vpc -o subformat=fixed dest.vhd
                  
                  IRJI 1 Reply Last reply Reply Quote 2
                  • IRJI
                    IRJ @Romo
                    last edited by IRJ

                    @Romo said in QUEMU/KVM to Azure:

                    @IRJ Try this:

                    qemu-img.exe convert source.qcow2 -O vpc -o subformat=fixed dest.vhd
                    

                    This appeared to work. I haven't gotten a chance to test yet, but it's larger in size compared to vhdx as I'd expect.

                    The exe part just needs to be dropped.

                    sudo qemu-img convert source.qcow2 -O vpc -o subformat=fixed dest.vhd
                    1 Reply Last reply Reply Quote 1
                    • RomoR
                      Romo
                      last edited by

                      Yeah, sorry misread you where looking for how to do it from windows that why I added the exe 😃

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