Bug 1381160

Summary: Can't connect with "hosted-engine --console" during installation
Product: [oVirt] ovirt-hosted-engine-setup Reporter: gregor <gregor_forum>
Component: GeneralAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED NOTABUG QA Contact: meital avital <mavital>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.0.2.2CC: bugs, ciprian.manea
Target Milestone: ---Flags: rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-03 19:01:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description gregor 2016-10-03 09:32:23 UTC
Description of problem:
During the installation with "hosted-engine --deploy" a VM is created where manual steps have to be started.
The created VNC connection is possible but no login credentials work on the machine, but the VNC connection is possible. A connection to the console with "hosted-engine --console" gives the following error message, see "actual results"

Version-Release number of selected component (if applicable):
CentOS Linux release 7.2.1511 (Core)
3.10.0-327.36.1.el7.x86_64
ovirt-hosted-engine-setup-2.0.2.2-1.el7.centos.noarch

Steps to Reproduce:
1. yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release40.rpm
2. yum install ovirt-hosted-engine-setup ovirt-engine-appliance
3. hosted-engine --deploy
4. When the setup is read and print the connection information connect with "hosted-engine --console"

Actual results:
-----------------------
hosted-engine --console
/usr/share/vdsm/vdsClient.py:33: DeprecationWarning: vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use vdsm.jsonrpcvdscli
  from vdsm import utils, vdscli, constants
The engine VM is running on this host
Connected to domain HostedEngine
Escape character is ^]
error: internal error: character device console0 is not using a PTY
-----------------------

Expected results:
A connection should be possible

Comment 1 gregor 2016-10-03 10:04:10 UTC
Workaround to reset the root password:

1. Get the Engine name: "virsh list". Admin/Password_from_the_setup
2. Note the disk id from "virsh dumpxml HostedEngine"
2.1 eg: <target path='/rhev/data-center/mnt/192.168.0.1:_home_ovirt/1963437f-4592-4bd4-80d5-c3c5f336bc3f/images/7a2f6a4d-c18e-4095-a95a-9791134d8cb1/546621eb-4e3c-45e2-bc43-da3621fa50d2.lease'/>
3. Navigate to the disk "cd /home/ovirt/1963437f-4592-4bd4-80d5-c3c5f336bc3f/images/7a2f6a4d-c18e-4095-a95a-9791134d8cb1"
4. Get the partition starting point: "fdisk -l 546621eb-4e3c-45e2-bc43-da3621fa50d2"
4.1 Start 2048*512=1048576
5. Mount the disk "mount -o loop,offset=1048576 546621eb-4e3c-45e2-bc43-da3621fa50d2 /mnt/tmp"
6. chroot /mnt/tmp
7. passwd

Now it's possible to login to the VM via VNC

Comment 2 gregor 2016-10-03 19:01:36 UTC
UPDATE: After clearing the machine and restart the installation now with cloud-init it works like expected.

Can be closed

Comment 3 ciprian.manea 2017-12-09 12:02:31 UTC
Hi,

Actually this bug is still present in RHVH 4.1, it is not possible to connect to the console while # hosted-engine --deploy is running. And if the deploy fails, it's not possible to connect to the console either.


Thanks,

----

# hosted-engine --console
The engine VM is running on this host
Connected to domain HostedEngine
Escape character is ^]
error: internal error: character device console0 is not using a PTY

Comment 4 ciprian.manea 2017-12-09 12:05:17 UTC
Plus in the deploy's output the ovirt link containing Serial_Console_Setup is broken.