Created attachment 1451954 [details] virt-p2v-to-libvirt-log Description of problem: Failed to define guest by virsh after virt-p2v converting host to libvirt Version-Release number of selected component (if applicable): virt-v2v-1.38.2-3.el7.x86_64 libguestfs-1.38.2-3.el7.x86_64 libvirt-4.4.0-2.el7.x86_64 qemu-kvm-rhev-2.12.0-3.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Install rhel7.5 on physical machine 2.Boot machine into virt-p2v client 3.Input v2v conversion server info and pass the test connection 4.Input conversion info(-o libvirt -os default) and start convert host to libvirt 5.But can't find the guest in default pool after finishing p2v conversion, check virt-v2v log and find below error: # cat /tmp/virt-p2v-20180615-b8mcvuf9/virt-v2v-conversion-log.txt .... virsh 'define' '/tmp/v2vlibvirt6da80d.xml' error: Failed to define domain from /tmp/v2vlibvirt6da80d.xml error: XML error: CPU vendor specified without CPU model virt-v2v: warning: could not define libvirt domain. The libvirt XML is still available in ‘/tmp/v2vlibvirt6da80d.xml’. Try running ‘virsh define /tmp/v2vlibvirt6da80d.xml’ yourself instead. .... Actual results: As above description Expected Results: Guest is listed in default pool after virt-p2v converting host to libvirt Additional info:
The error is: error: XML error: CPU vendor specified without CPU model and the XML we are generating is: <cpu match='minimum'> <vendor>Intel</vendor> <topology sockets='2' cores='10' threads='2'/> </cpu>
(In reply to Richard W.M. Jones from comment #2) > The error is: > > error: XML error: CPU vendor specified without CPU model > > and the XML we are generating is: > > <cpu match='minimum'> > <vendor>Intel</vendor> > <topology sockets='2' cores='10' threads='2'/> > </cpu> And the vcpu num (2) is inconsistent with the num (40)of cpu topology in the xml after p2v conversion resulting XML for libvirt: <?xml version='1.0' encoding='utf-8'?> <domain type='kvm'> <!-- generated by virt-v2v 1.38.2rhel=7,release=3.el7,libvirt --> <name>host-to-libvirt</name> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>2097152</currentMemory> <vcpu>2</vcpu> <cpu match='minimum'> <vendor>Intel</vendor> <topology sockets='2' cores='10' threads='2'/> </cpu>
https://www.redhat.com/archives/libguestfs/2018-June/msg00068.html
(In reply to mxie from comment #3) > (In reply to Richard W.M. Jones from comment #2) > > The error is: > > > > error: XML error: CPU vendor specified without CPU model > > > > and the XML we are generating is: > > > > <cpu match='minimum'> > > <vendor>Intel</vendor> > > <topology sockets='2' cores='10' threads='2'/> > > </cpu> > > And the vcpu num (2) is inconsistent with the num (40)of cpu topology in the > xml after p2v conversion > > > resulting XML for libvirt: > <?xml version='1.0' encoding='utf-8'?> > <domain type='kvm'> > <!-- generated by virt-v2v 1.38.2rhel=7,release=3.el7,libvirt --> > <name>host-to-libvirt</name> > <memory unit='KiB'>2097152</memory> > <currentMemory unit='KiB'>2097152</currentMemory> > <vcpu>2</vcpu> > <cpu match='minimum'> > <vendor>Intel</vendor> > <topology sockets='2' cores='10' threads='2'/> > </cpu> Did you modify the P2V vCPUs field? It might be: https://bugzilla.redhat.com/show_bug.cgi?id=1590721 ?
Yes,I modified the vCPU num before p2v converting because physical machine has 40 vCPUs
Upstream in: https://github.com/libguestfs/libguestfs/commit/e2910eeaf84afe63887afdc62b319bff1549d296
Verify the bug with builds: virt-p2v-1.38.2-2.el7.noarch virt-v2v-1.38.2-6.el7.x86_64 libguestfs-1.38.2-6.el7.x86_64 libvirt-4.4.0-2.el7.x86_64 qemu-kvm-rhev-2.12.0-6.el7.x86_64 Steps: 1.Install ubuntu18.04 LTS on physical machine 2.Boot machine into virt-p2v client 3.Input v2v conversion server info and pass the test connection 4.Input conversion info(-o libvirt -os default) and start convert host to libvirt 5.But can't find the guest in default pool after finishing p2v conversion, find below error in virt-v2v-conversion-log.txt: virsh 'define' '/tmp/v2vlibvirt04a2c8.xml' error: Failed to define domain from /tmp/v2vlibvirt04a2c8.xml error: unsupported configuration: CPU topology doesn't match maximum vcpu count virt-v2v: warning: could not define libvirt domain. The libvirt XML is still available in ‘/tmp/v2vlibvirt04a2c8.xml’. Try running ‘virsh define /tmp/v2vlibvirt04a2c8.xml’ yourself instead. Hi rjones, Seems the bug is not fixed, pls help to check the virt-p2v log
Created attachment 1456155 [details] virt-p2v-1.38.2-2-log
Yup, this is physical XML created by virt-p2v is completely wrong: <vcpu>1</vcpu> <cpu match="minimum"> <vendor>Intel</vendor> <topology sockets="3" cores="1" threads="1"/> </cpu> 1 != 3*1*1 I think this is another instance of bug 1590721. However what is interesting is how did it happen? Did you change the number in the vCPUs box or did it happen without you doing anything? If the second, then it's either a new bug or a variation of bug 1590721. FWIW I'm currently fixing a lot of issues in virt-p2v, including bug 1590721 and complicated bugs with -o rhv-upload.
Hi rjones, 1) If modify the vcpu num (less than actual vcpu num) before conversion, then virsh can't define guest's xml after p2v conversion due to vcpu num is not consistent with cpu topology in guest xml 2) If don't modify the vcpu num before conversion,virsh can define guest's xml successfully after p2v conversion Thanks
(In reply to mxie from comment #12) > Hi rjones, > > 1) If modify the vcpu num (less than actual vcpu num) before conversion, > then virsh can't define guest's xml after p2v conversion due to vcpu num is > not consistent with cpu topology in guest xml > 2) If don't modify the vcpu num before conversion,virsh can define > guest's xml successfully after p2v conversion This is correct, and confirms what Rich said in comment 11. Considering the vCPUs <=> topology issue tracked as bug 1590721, isn't the rest enough to verify this bug?
(In reply to Pino Toscano from comment #13) > (In reply to mxie from comment #12) > > Hi rjones, > > > > 1) If modify the vcpu num (less than actual vcpu num) before conversion, > > then virsh can't define guest's xml after p2v conversion due to vcpu num is > > not consistent with cpu topology in guest xml > > 2) If don't modify the vcpu num before conversion,virsh can define > > guest's xml successfully after p2v conversion > > This is correct, and confirms what Rich said in comment 11. Considering the > vCPUs <=> topology issue tracked as bug 1590721, isn't the rest enough to > verify this bug? Hi Pino, I'm not sure whether this bug is duplicated with bug 1590721, even if they are duplicated bugs, because bug 1590721 is not fixed, I can't verify this bug now. Thanks
(In reply to mxie from comment #14) > I'm not sure whether this bug is duplicated with bug 1590721, even if > they are duplicated bugs, because bug 1590721 is not fixed, I can't verify > this bug now. Sorry, I was not clear: I'm saying that you hit bug 1590721 only if you change the number of vCPUs when converting a physical machine. If you convert a physical machine and do not change the number of vCPUs, then it should be possible to verify this bug.
Try to reproduce the bug with builds: virt-v2v-1.38.2-3.el7.x86_64 libguestfs-1.38.2-3.el7.x86_64 virt-p2v-1.38.2-1.el7.iso Reproduce steps: 1.Install rhel7.5 on physical machine 2.Boot machine into virt-p2v client 3.Input v2v conversion server info and pass the test connection 4.Input conversion info(-o libvirt -os default) and do not modify vCPU numbers, then start convert host to libvirt 5.The conversion could be finished but with virt-v2v warning, check the details info in virt-v2v-conversion-log.txt as below: .... virsh 'define' '/tmp/v2vlibvirt9ad908.xml' error: Failed to define domain from /tmp/v2vlibvirt9ad908.xml error: XML error: CPU vendor specified without CPU model virt-v2v: warning: could not define libvirt domain. The libvirt XML is still available in ‘/tmp/v2vlibvirt9ad908.xml’. Try running ‘virsh define /tmp/v2vlibvirt9ad908.xml’ yourself instead. ... 6.Check the guest xml in virt-v2v-conversion-log.txt, there is <vendor>Intel</vendor> in vcpu part .... <vcpu>4</vcpu> <cpu match='minimum'> <vendor>Intel</vendor> <topology sockets='1' cores='4' threads='1'/> </cpu> .... Verify the bugs with builds: virt-v2v-1.38.2-8.el7.x86_64 libguestfs-1.38.2-8.el7.x86_64 virt-p2v-1.38.2-2.el7.iso Steps: 1.Install rhel7.5 on physical machine 2.Boot machine into virt-p2v client 3.Input v2v conversion server info and pass the test connection 4.Input conversion info(-o libvirt -os default) and do not modify vCPU numbers, then start convert host to libvirt 5.The conversion could be finished without virt-v2v warning 6.Check the guest xml in virt-v2v-conversion-log.txt, there is no <vendor>Intel</vendor> in vcpu part .... <vcpu>4</vcpu> <cpu match='minimum'> <topology sockets='1' cores='4' threads='1'/> </cpu> .... 7.Can power on guest normally and checkpoints of guest are passed except bug 1318922 Result: There is no <vendor>Intel</vendor> in vCPU part of guest libvirt xml after p2v converting host to libvirt now, so move the bug from ON_QA to VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:3021