<div dir="ltr"><pre style="white-space:pre-wrap"><span style="font-size:12pt;font-family:Calibri,sans-serif;color:black">Thank you </span><span style="color:black;font-family:Calibri,sans-serif;font-size:12pt">Boris </span><span style="color:black;font-family:Calibri,sans-serif;font-size:12pt">for your valuable suggestions. It worked. </span><br></pre></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 27, 2016 at 5:58 PM, Boris Derzhavets <span dir="ltr"><<a href="mailto:bderzhavets@hotmail.com" target="_blank">bderzhavets@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<br>
<br>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Chinmaya Dwibedy <<a href="mailto:ckdwibedy@gmail.com" target="_blank">ckdwibedy@gmail.com</a>><br>
<b>Sent:</b> Friday, May 27, 2016 7:31 AM<br>
<b>To:</b> Boris Derzhavets<br>
<b>Cc:</b> <a href="mailto:rdo-list@redhat.com" target="_blank">rdo-list@redhat.com</a><span class=""><br>
<b>Subject:</b> Re: [rdo-list] Unable to log in to the VM instance’s console using openstack-mitaka release</span></font>
<div> </div>
</div>
<div>
<div dir="ltr">
<pre><span style="font-size:12pt;font-family:Calibri,sans-serif;color:black">Hi Boris,</span></pre><span class="">
<pre><span style="font-size:12pt;font-family:Calibri,sans-serif;color:black"> </span></pre>
<pre><span style="font-size:12pt;font-family:Calibri,sans-serif;color:black">Thank you for your prompt response. </span><span style="color:black;font-family:Calibri,sans-serif;font-size:12pt"> </span></pre>
</span><pre><span class=""><span style="font-size:12pt;font-family:Calibri,sans-serif;color:black">As a matter of clarification, I did not manage the key pairs in web interface or through command line. <br>It launches the instance without any key pair. Also I am not trying to login into VM’s floating-ip via ssh.</span><span style="font-size:12pt;font-family:Calibri,sans-serif"> <br>I am trying to a<span style="color:black">ccess an Instance Console using the Dashboard.</span></span></span><span style="color:black;font-family:Calibri,sans-serif;font-size:12pt"> <br><br>Option 1.<br>[BD] Then you may to start VM with "--user-data" :-<br><br><div><i>[root@dfw02 ~(keystone_admin)]$ nova boot --flavor 2 --user-data=./myfile.txt <br>--image <span style="color:#b45f06">03c9ad20-b0a3-4b71-aa08-2728ecb66210</span> VF20Devs</i><br><br> where<br><br><i>[root@dfw02 ~(keystone_admin)]$ cat ./myfile.txt<br>#cloud-config <br>password: mysecret <br>chpasswd: { expire: False } <br>ssh_pwauth: True</i><br>
</div>This way will allow you login via ssh and dashboard with password "secret" <br>No ssh keypairs are supposed to be created</span></pre>
<pre><span style="font-size:12pt;font-family:Calibri,sans-serif;color:black"><span class="">It shows me the login prompt. But I am not able to log in to the instance’s console <br>(Dashboard) using username (root) and password (root). it says “Log in incorrect”. <br><br></span>Option 2.<br>[BD] Please, read and follow ( I am sending this to you second time )<br><br>1) create key-pair via nova CLI or dashboard<br>2) Launch instance dialog is providing an entry line "Key pair" . Place oskey01 there ( click on "+" in Mitaka )<br> Thus it would write RSA public key to ~fedora/.ssh/authorized_keys on VM's file system ( when you boot VM the first time )<br> 3) oskey01.pem would be located in folder where you ran `nova keypair-add oske01 > oskey01.pem`<br> Content of pem file is RSA private key from keypair generated by nova CLI<br> 4) Login to VM via SSH :-<br> ssh -i oskey01.pem fedora@VM's floating-ip ( no password needed )<br> Then inside VM :-<br> $ sudo su - <br> no password required fedora is a special user setup via cloud-init<br>As root assign password to fedora and root ( for instance )<br>Switch to dashboard and log into VNC console to VM . Created password are persistent for VM <br><br><br></span><span style="color:black;font-family:Calibri,sans-serif;font-size:12pt">Regards,</span></pre>
<pre><span style="font-size:12pt;font-family:Calibri,sans-serif;color:black">Chinmaya</span></pre>
</div><div><div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, May 27, 2016 at 2:50 PM, Boris Derzhavets <span dir="ltr">
<<a title="Ctrl+Click or tap to follow the link" href="mailto:bderzhavets@hotmail.com" target="_blank">bderzhavets@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Then as fedora user inside VM :-</p>
<p>$ sudo su -</p>
<p># passwd fedora</p>
<p>You will get login prompt for fedora via dashboard console</p>
<p>in the same session ( or for root, it doesn't matter )<br>
</p>
<div></div>
<p></p>
<div><br>
<br>
</div>
<div style="color:rgb(49,55,57)">
<div>
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b>
<a href="mailto:rdo-list-bounces@redhat.com" target="_blank">rdo-list-bounces@redhat.com</a> <<a href="mailto:rdo-list-bounces@redhat.com" target="_blank">rdo-list-bounces@redhat.com</a>> on behalf of Boris Derzhavets <<a href="mailto:bderzhavets@hotmail.com" target="_blank">bderzhavets@hotmail.com</a>><br>
<b>Sent:</b> Friday, May 27, 2016 2:50 AM<br>
<b>To:</b> Chinmaya Dwibedy; <a href="mailto:rdo-list@redhat.com" target="_blank">
rdo-list@redhat.com</a><br>
<b>Subject:</b> Re: [rdo-list] Unable to log in to the VM instance’s console using openstack-mitaka release</font>
<div> </div>
</div>
</div>
<div>
<div>
<div>
<div 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 style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b>
<a href="mailto:rdo-list-bounces@redhat.com" target="_blank">rdo-list-bounces@redhat.com</a> <<a href="mailto:rdo-list-bounces@redhat.com" target="_blank">rdo-list-bounces@redhat.com</a>> on behalf of Chinmaya Dwibedy <<a href="mailto:ckdwibedy@gmail.com" target="_blank">ckdwibedy@gmail.com</a>><br>
<b>Sent:</b> Friday, May 27, 2016 2:24 AM<br>
<b>To:</b> <a href="mailto:rdo-list@redhat.com" target="_blank">rdo-list@redhat.com</a><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><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><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><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><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><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>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div></div>
</div>
</div>
</div>
</blockquote></div><br></div>