<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>When you run :-</p>
<p><br>
</p>
<p># source  keystonerc_demo</p>
<p># nova  keypair-add oskey01 > oskey01.pem</p>
<p># chmod 600 *.pem</p>
<p>SSH RSA public key gets uploaded to Nova and may be used when you launch the VM</p>
<p>It would be written by default to ~fedora/.ssh/authorized_keys ( as far as I remember ) on your VM</p>
<p>when it comes to ACTIVE state</p>
<p><br>
</p>
<p># nova keypair-list <br>
</p>
<p>shows this public rsa key been generated by nova command.</p>
<p><br>
</p>
<p>SSH RSA private key gets written to oskey01.pem<br>
</p>
<p>No hackery is needed to connect to VM via it's FIP</p>
<p>$ ssh -i oskey01.pem fedora@VM's floating-ip<br>
</p>
<br>
Boris.<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> rdo-list-bounces@redhat.com <rdo-list-bounces@redhat.com> on behalf of Chinmaya Dwibedy <ckdwibedy@gmail.com><br>
<b>Sent:</b> Friday, May 27, 2016 2:24 AM<br>
<b>To:</b> rdo-list@redhat.com<br>
<b>Subject:</b> [rdo-list] Unable to log in to the VM instance’s console using openstack-mitaka release</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<p class="MsoNormal"><span style="font-size:12pt; line-height:115%">Hi All,</span></p>
<p class="MsoNormal"><span style="font-size:12pt; line-height:115%"><br>
</span></p>
<p class="MsoNormal"><span style="font-size:12pt; line-height:115%">I have installed OpenStack (i.e., openstack-mitaka release) on CentOS7.2 .  Used Fedora20 qcow2 cloud image for creating a VM using Dashboard.
</span></p>
<p class=""><span style="font-size:12pt; line-height:115%">1)<span style="font-size:7pt; line-height:normal; font-family:'Times New Roman'">     
</span></span><span style="font-size:12pt; line-height:115%">Installed “libguestfs” on Nova compute node.</span></p>
<p class=""><span style="font-size:12pt; line-height:115%">2)<span style="font-size:7pt; line-height:normal; font-family:'Times New Roman'">     
</span></span><span style="font-size:12pt; line-height:115%">Updated these lines in  “/etc/nova/nova.conf ”</span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span style="font-size:12pt; line-height:115%">inject_password=true</span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span style="font-size:12pt; line-height:115%">inject_key=true</span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span style="font-size:12pt; line-height:115%">inject_partition=-1</span></p>
<p class="MsoNormal"><span style="font-size:12pt; line-height:115%"> </span></p>
<p class=""><span style="font-size:12pt; line-height:115%">3)<span style="font-size:7pt; line-height:normal; font-family:'Times New Roman'">     
</span></span><span style="font-size:12pt; line-height:115%">Restarted nove-compute: # service openstack-nova-compute restart</span></p>
<p class=""><span style="font-size:12pt; line-height:115%">4)<span style="font-size:7pt; line-height:normal; font-family:'Times New Roman'">     
</span></span><span style="font-size:12pt; line-height:115%">Enabled setting root password in /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py</span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span style="font-size:12pt; line-height:115%">OPENSTACK_HYPERVISOR_FEATURES = {</span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span style="font-size:12pt; line-height:115%">…..</span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span style="font-size:12pt; line-height:115%">‘can_set_password’: True,</span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span style="font-size:12pt; line-height:115%">}</span></p>
<p class=""><span style="font-size:12pt; line-height:115%">5)<span style="font-size:7pt; line-height:normal; font-family:'Times New Roman'">     
</span></span><span style="font-size:12pt; line-height:115%">Placed the below code in “Customization Script” section of the Launch Instance dialog box in OpenStack.
</span></p>
<p class="MsoNormal"><span style="font-size:12pt; line-height:115%"> </span></p>
<p class="MsoNormal" style="text-indent:0.25in"><span style="font-size:12pt; line-height:115%">#cloud-config</span></p>
<p class="MsoNormal" style="text-indent:0.25in"><span style="font-size:12pt; line-height:115%">ssh_pwauth: True</span></p>
<p class="MsoNormal" style="text-indent:0.25in"><span style="font-size:12pt; line-height:115%">chpasswd:</span></p>
<p class="MsoNormal" style="text-indent:0.25in"><span style="font-size:12pt; line-height:115%">  list: |</span></p>
<p class="MsoNormal" style="text-indent:0.25in"><span style="font-size:12pt; line-height:115%">     root: root</span></p>
<p class="MsoNormal" style="text-indent:0.25in"><span style="font-size:12pt; line-height:115%">  expire: False</span></p>
<p class="MsoNormal" style="text-indent:0.25in"><span style="font-size:12pt; line-height:115%">runcmd:</span></p>
<p class="MsoNormal" style="text-indent:0.25in"><span style="font-size:12pt; line-height:115%">- [ sh, -c, echo "=========hello world'=========" ]</span></p>
<p class="MsoNormal"><span style="font-size:12pt; line-height:115%"> </span></p>
<pre><span style="font-size:12pt; font-family:Calibri,sans-serif">It appears that, when the instance was launched, cloud-init did not change the password for root user, and I was not able to log in to the instance’s console (Dashboard) using username (root) and password (root). it says “Log in incorrect”.</span></pre>
<pre><span style="font-size:12pt; font-family:Calibri,sans-serif">Upon checking the boot log found that, cloud-init has executed <span style="color:black">/var/lib/cloud/instance/scripts/runcmd and printed </span>hello world. </span><span style="font-family:Calibri,sans-serif; font-size:12pt">Can anyone please let me know where I am wrong ? Thanks in advance for your support and time.</span></pre>
<pre><span style="font-size:12pt; font-family:Calibri,sans-serif"> </span></pre>
<pre><span style="font-size:12pt; font-family:Calibri,sans-serif">Regards,</span></pre>
<pre><span style="font-size:12pt; font-family:Calibri,sans-serif">Chinmaya</span></pre>
</div>
</div>
</div>
</div>
</body>
</html>