Xen to XCP-NG
-
Hi @olivierlambert ,
Thanks for that script. I was working on it the last day and had some attempt to day with some python 2to3 converter. I am not lucky
Is there a tested Python3 script ?
Cheers and thanks for your help,
Josef -
Sadly, you'll need Python 2. I'll be happy if the community around could make it updated for Python 3
-
Hi @olivierlambert ,
I worked on the P3 Script. at this time, I getting to the stage where the script returns
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.145.157Processing disk /dev/vgxen/justanothername(21474836480 bytes)
Internal Error. Possible problem: Please make sure you have enough space on your default SRWhile this is an issue which is announced on the link you send, I check via xoa and xcp-ng center. We have set a default SR. may I ask your help to proceed?
-
Hmm it's probably not processing correctly the SR size on destination?
-
@olivierlambert Can we just stream it like fire and forget as long it can identify the default SR?
-
@josef1909 I just need to go ahead to check if the script will send more issues I need to work on.
-
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 -
Hi, I just wanted to check-in if someone was so kind and had a look.
Cheers,
Josef -
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!
-
@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)
-
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>()
-
I know @yann is very busy but if he can, he'll take a look
-
@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? -
The other alternative, if a bit cumbersome, is to use Clonezilla, like a P2V situation
-
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
-
Thanks for re-pinging. This might be a "simple" mission to finance to a Python specialist. Let me add @AtaxyaNetwork in the loop.