Bug 1256222 - virt-p2v no GUI mode:error opening control connection to $ip:22:unexpected …rompt
virt-p2v no GUI mode:error opening control connection to $ip:22:unexpected …r...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
7.2
x86_64 Unspecified
medium Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
P2V
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-24 02:03 EDT by tingting zheng
Modified: 2015-11-19 02:03 EST (History)
6 users (show)

See Also:
Fixed In Version: virt-p2v-1.28.1-1.51.3.el7.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-19 02:03:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Screenshot of virt-p2v error under no GUI mode (78.00 KB, image/png)
2015-08-24 02:03 EDT, tingting zheng
no flags Details

  None (edit)
Description tingting zheng 2015-08-24 02:03:10 EDT
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.
Comment 2 Richard W.M. Jones 2015-08-24 03:49:47 EDT
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.
Comment 3 Richard W.M. Jones 2015-08-24 03:56:49 EDT
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
Comment 4 Richard W.M. Jones 2015-08-25 14:34:59 EDT
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
Comment 10 mxie@redhat.com 2015-09-06 05:22:55 EDT
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
Comment 12 errata-xmlrpc 2015-11-19 02:03:10 EST
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

Note You need to log in before you can comment on or make changes to this bug.