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

    Xen to XCP-NG

    Scheduled Pinned Locked Moved Unsolved Migrate to XCP-ng
    18 Posts 3 Posters 977 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.
    • J Offline
      josef1909
      last edited by

      Hi @olivierlambert ,
      Please check script here or might suggest someone to collaborate:
      https://github.com/josef-bocklage/xcp-ng_xen2xcpng-py3/blob/main/xen2xcpng-Vpy3.py

      1 Reply Last reply Reply Quote 0
      • J Offline
        josef1909
        last edited by

        Hi, I just wanted to check-in if someone was so kind and had a look.
        Cheers,
        Josef

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

          Hi!

          We are pretty busy here (at Vates) about 8.2.1 new ISO and 8.3 release. We'll be happy that anyone around in the community is able to assist!

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            josef1909 @olivierlambert
            last edited by

            @olivierlambert understand.
            Please let me know if I can help trigger people to support on that.
            It seems that this topic has already a little dust on it - so I am happy to collabortate.

            In the meantime, I made some Tests and will provide the last lines from the debugging.

            > /root/xen2xcpng3-V1.py(839)<module>()
            -> if options.filename:
            (Pdb) n
            > /root/xen2xcpng3-V1.py(842)<module>()
            -> machine.save_as(server=options.server, username=options.username,
            (Pdb) n
            > /root/xen2xcpng3-V1.py(843)<module>()
            -> password=options.password, ssl= not options.nossl,  sparse=options.sparse, sftp=options.sftp)
            (Pdb) n
            > /root/xen2xcpng3-V1.py(842)<module>()
            -> machine.save_as(server=options.server, username=options.username,
            (Pdb) n
            VM Details:
            Name: JUSTANOTHERNAME
            Type: Paravirtualised
            VCPUS: 4
            Memory(bytes): 2147483648
            ACPI: true
            APIC: true
            PAE: true
            NX: false
            Viridian: true
            Disk xvda(Bootable): /dev/vgxen/JUSTANOTHERNAME
            Connecting to target XXX.XXX.XXX.157
            
            Processing disk /dev/vgxen/JUSTANOTHERNAME(21474836480 bytes)
            TypeError: initial_value must be str or None, not bytes
            > /root/xen2xcpng3-V1.py(842)<module>()
            -> machine.save_as(server=options.server, username=options.username,
            (Pdb) 
            
            
            1 Reply Last reply Reply Quote 0
            • J Offline
              josef1909
              last edited by

              Here are some more logs from todays session:

              (Pdb) n
              > /root/xen2xcpng3-V1.py(871)<module>()
              -> machine.save_as(server=options.server, username=options.username,
              (Pdb) w
                /usr/lib/python3.9/bdb.py(580)run()
              -> exec(cmd, globals, locals)
                <string>(1)<module>()
              > /root/xen2xcpng3-V1.py(871)<module>()
              -> machine.save_as(server=options.server, username=options.username,
              (Pdb) n
              VM Details:
              Name: JUSTANOTHERNAME
              Type: Paravirtualised
              VCPUS: 4
              Memory(bytes): 2147483648
              ACPI: true
              APIC: true
              PAE: true
              NX: false
              Viridian: true
              Disk xvda(Bootable): /dev/vgxen/JUSTANOTHERNAME
              Connecting to target xxx.xxx.xxx.157
              
              Processing disk /dev/vgxen/JUSTANOTHERNAME(21474836480 bytes)
              TypeError: initial_value must be str or None, not bytes
              > /root/xen2xcpng3-V1.py(871)<module>()
              -> machine.save_as(server=options.server, username=options.username,
              (Pdb) w
                /usr/lib/python3.9/bdb.py(580)run()
              -> exec(cmd, globals, locals)
                <string>(1)<module>()
              > /root/xen2xcpng3-V1.py(871)<module>()
              -> machine.save_as(server=options.server, username=options.username,
                /root/xen2xcpng3-V1.py(617)save_as()
              -> string = io.StringIO(input_buffer)
              (Pdb) n
              --Return--
              > /root/xen2xcpng3-V1.py(871)<module>()->None
              -> machine.save_as(server=options.server, username=options.username,
              (Pdb) w
                /usr/lib/python3.9/bdb.py(580)run()
              -> exec(cmd, globals, locals)
                <string>(1)<module>()->None
              > /root/xen2xcpng3-V1.py(871)<module>()->None
              -> machine.save_as(server=options.server, username=options.username,
              (Pdb) n
              TypeError: initial_value must be str or None, not bytes
              > <string>(1)<module>()->None
              (Pdb) w
                /usr/lib/python3.9/bdb.py(580)run()
              -> exec(cmd, globals, locals)
              > <string>(1)<module>()->None
                /root/xen2xcpng3-V1.py(871)<module>()->None
              -> machine.save_as(server=options.server, username=options.username,
                /root/xen2xcpng3-V1.py(617)save_as()
              -> string = io.StringIO(input_buffer)
              (Pdb) n
              --Return--
              > <string>(1)<module>()->None
              (Pdb) w
                /usr/lib/python3.9/bdb.py(580)run()
              -> exec(cmd, globals, locals)
              > <string>(1)<module>()->None
              (Pdb) n
              Traceback (most recent call last):
                File "/usr/lib/python3.9/pdb.py", line 1723, in main
                  pdb._runscript(mainpyfile)
                File "/usr/lib/python3.9/pdb.py", line 1583, in _runscript
                  self.run(statement)
                File "/usr/lib/python3.9/bdb.py", line 580, in run
                  exec(cmd, globals, locals)
                File "<string>", line 1, in <module>
                File "/root/xen2xcpng3-V1.py", line 871, in <module>
                  machine.save_as(server=options.server, username=options.username,
                File "/root/xen2xcpng3-V1.py", line 617, in save_as
                  string = io.StringIO(input_buffer)
              TypeError: initial_value must be str or None, not bytes
              Uncaught exception. Entering post mortem debugging
              Running 'cont' or 'step' will restart the program
              > /root/xen2xcpng3-V1.py(617)save_as()
              -> string = io.StringIO(input_buffer)
              (Pdb) q
              Post mortem debugger finished. The /root/xen2xcpng3-V1.py will be restarted
              > /root/xen2xcpng3-V1.py(13)<module>()
              
              
              1 Reply Last reply Reply Quote 0
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by

                I know @yann is very busy but if he can, he'll take a look

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  josef1909 @olivierlambert
                  last edited by

                  @olivierlambert @yann
                  I understand that there is a big GoLive on your side.
                  Do we have alternative suggestions to migrate from xen to xcp-ng?

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

                    The other alternative, if a bit cumbersome, is to use Clonezilla, like a P2V situation 🙂

                    1 Reply Last reply Reply Quote 0
                    • andrewperryA Offline
                      andrewperry
                      last edited by

                      I also worked on trying to update the script to python3 last week and hadn't realised you had this work here so was starting from scratch.

                      I am not a python developer so when I got to errors in the section that is actually streaming the files I decided to stop and just finish 'making' python2.7 on the servers that I need to get the VMs off and that has worked for me.

                      It doesn't seem like it should be a huge amount of work left to upgrade the script to python3 but probably not something I have the skills or time for right now.

                      Thanks for sharing your efforts here. What have you ended up doing @josef1909

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

                        Thanks for re-pinging. This might be a "simple" mission to finance to a Python specialist. Let me add @AtaxyaNetwork in the loop.

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