<div dir="ltr"><div><div> <font face="arial, sans-serif"> </font></div></div><div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"> </div></div><br><div class="gmail_quote">On Tue, Aug 5, 2014 at 6:33 PM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div><div>On 08/05/2014 03:02 PM, Yuanzhen Gu wrote:<br>
> Good afternoon guys,<br>
><br>
> I created the VM from XML dump,<br>
> # virsh create vm4.xml<br>
><br>
> and # virsh list   I can see the VM running,<br>
> and I know the ip address for the VM,<br>
><br>
> but how can I know the username and password to login the running VM, which<br>
> is created from XML dump?  is there any place to edit and add the username<br>
> and password in guest domain XML ?   thanks a lot!!<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Libvirt is only concerned with what virtual hardware you present to the</blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">guest, not with the OS running in that guest or what username/password</blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">combinations will let you log into that guest OS.  libguestfs may be</blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">able to do some introspection for learning usernames, and also has the</blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">ability to create guest clones where you control the usernames and</blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">passwords to be used in the new guest.</blockquote></blockquote>

<div>  </div><div>       Thanks!  so do you mean that I can use libvirt clone a new guest with which I can give username and password?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">  But it is up to you to manage</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

your VMs to where you know what username/password pairs are stored for a</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

given guest image.</blockquote></blockquote><div><br></div><div>      but I've no idea where the username and passwd be stored, create it with dumpXML of a VM, I've tried that original VM's username and passwd via ssh, but it didn't work. </div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span><font color="#888888"><br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266" target="_blank">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</font></span></blockquote></div><br></div></div></div>