Created attachment 1066212 [details] Screenshot of virt-p2v error under no GUI mode Description: virt-p2v no GUI mode:error opening control connection to $ip:22:unexpected …rompt Version: virt-p2v-1.28.1-1.49.1.el7 virt-v2v-1.28.1-1.49.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Prepare pxe to boot virt-p2v client.Add virt-p2v options in the APPEND field in the pxelinux.cfg file. eg: APPEND rootflags=loop initrd=initrd0.img root=live:/virt-p2v-livecd-1.28.1-1.49.1.el7.iso p2v.server=10.66.4.243 p2v.password=redhat p2v.memory=1024M p2v.name=p2v-test-nogui p2v.vcpus=1 p2v.disks=sda p2v.removable=sr0 p2v.o=disk p2v.oa=sparse p2v.of=raw p2v.os=/var/tmp rootfstype=auto ro rd.live.image quiet console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH net.ifnames=0 rd.luks=0 rd.md=0 rd.dm=0 2.Boot host from pxe. 3.Host boot into console mode with root shell directly,run the below command,there is an error info as below. # journalctl -u p2v --follow virt-p2v:error opening control connection to $ip:22:unexpected …rompt xinit:connection to X server lost. Started p2v service. 4.Check logs in virt-p2v server(10.66.4.243),the conversion doesn't start,I need to run the below command and can start the service manually. # launch-virt-p2v Actual results: As description: Error shows:virt-p2v:error opening control connection to $ip:22:unexpected …rompt The error info shows is quite misleading,which users may think there is something wrong with virt-p2v service. Expected results: Hide or improve this error info. Additional info: Attached the screenshot. This error info doesn't show in virt-v2v-1.28.1-1.37.el7.x86_64 and livecd-p2v-201505191242.iso,refer to https://bugzilla.redhat.com/show_bug.cgi?id=1229262#c6.
I suspect what may be happening here is it doesn't wait for the network connection to come online before starting the virt-p2v service. By the time you'd logged in and run 'launch-virt-p2v', the network connection had started up so everything worked.
Probably this should work, but I need to test it some more: diff --git a/p2v/p2v.service b/p2v/p2v.service index a6b5e25..f052bea 100644 --- a/p2v/p2v.service +++ b/p2v/p2v.service @@ -20,7 +20,7 @@ [Unit] Description=p2v service -After=network.target +After=network-online.target [Service] Type=oneshot
Ignore comment 3 - that's wrong. Patch series posted. Only patch 1 is needed to fix this. https://www.redhat.com/archives/libguestfs/2015-August/thread.html#00119
Upstream commit: https://github.com/libguestfs/libguestfs/commit/4c34d240a1f152ec257a75f148a8e4a1d91a67c5
Bug 1256222 I can reproduce the bug with builds: virt-p2v-1.28.1-1.49.1.el7 virt-v2v-1.28.1-1.49.el7.x86_64 Try to verify this bug with builds: virt-p2v-1.28.1-1.51.3.el7 virt-v2v-1.28.1-1.51.el7.x86_64 Steps: 1.Prepare pxe to boot virt-p2v client.Add virt-p2v options in the APPEND field in the pxelinux.cfg file. eg: APPEND rootflags=loop initrd=initrd0.img root=live:/virt-p2v-1.28.1-1.51.3.el7.iso p2v.server=10.66.4.243 p2v.password=redhat p2v.memory=1024M p2v.name=p2v-test-nogui p2v.vcpus=1 p2v.disks=sda p2v.removable=sr0 p2v.o=disk p2v.oa=sparse p2v.of=raw p2v.os=/var/tmp rootfstype=auto ro rd.live.image quiet console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH net.ifnames=0 rd.luks=0 rd.md=0 rd.dm=0 2.Boot host from pxe. 3.Host could boot into root shell console mode and then enter into conversion mode directly without running command "launch-virt-p2v" by manual, but conversion mode still has bug:1229386 "virt-p2v in non-GUI mode doesn't show any conversion progress or status" 4.Press" ctrl+alt+F1" to enter into terminal mode and run command "journalctl -u p2v --follow ", it will show conversion process and has no error as bug 1256222 4.Check logs in virt-p2v server(10.66.4.243),the conversion has been started Result: virt-p2v no GUI mode could convert guest automatically Move this 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://rhn.redhat.com/errata/RHBA-2015-2183.html