<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Inconsolata;
        panose-1:2 11 6 9 3 0 3 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Inconsolata;
        color:#44546A;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Inconsolata;color:#44546A">Thanks for replying.  Good info so far.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Inconsolata;color:#44546A"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Inconsolata;color:#44546A">After I start the VM, I’m going to need to see the boot console, and I’ll need to ssh into it with a hostname or IP.  What are some required steps for those needs?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Inconsolata;color:#44546A"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Inconsolata;color:#44546A">This VM is going to need to access a few associated networks.  I can see that the “</span><span style="font-size:11.0pt;font-family:"Courier New";color:#44546A">—</span><span style="font-size:11.0pt;font-family:Inconsolata;color:#44546A">networks”
 option is part of the interface for configuring this.  What are some things I’ll have to do for this?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Inconsolata;color:#44546A"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Jeff Tchang [mailto:jeff.tchang@gmail.com]
<br>
<b>Sent:</b> Thursday, July 09, 2015 11:21 AM<br>
<b>To:</b> KARR, DAVID<br>
<b>Cc:</b> libvirt-users@redhat.com<br>
<b>Subject:</b> Re: [libvirt-users] libvirt beginner needs to create and start VMs entirely on command line<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I actually find I do almost all my VM management inside the virsh command.<o:p></o:p></p>
<div>
<p class="MsoNormal">If the VM appears to exist inside virsh but is in a shut off state then you should try to start it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">VNC can also be SSH port forwarded (which I have done before).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Not sure if this will help but this is the command I use to create VMs:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">virt-install \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --name example \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --vcpus=4 \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --disk /data/example,size=80 \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --ram 2048 \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --graphics vnc,password=**********,listen=0.0.0.0,port=15916 \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --accelerate \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --cdrom /var/kvm/ubuntu-14.04.1-server-amd64-autoinstall.iso \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --os-type=linux \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --noautoconsole \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --network network=default \<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  --boot cdrom,fd,hd,network,menu=off<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I also edit the XML file sometimes. Notice I have the autoinstall iso. Basically I went through and created a ks.cfg file after extracting the ISO file to a directory. Then I ran a command like this:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">mkisofs -D -r -V "auto install" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/<a href="http://boot.cat">boot.cat</a> -no-emul-boot -boot-load-size 4 -boot-info-table
 -o /var/kvm/ubuntu-14.04.1-server-amd64-autoinstall.iso /root/serveriso<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, Jul 9, 2015 at 10:57 AM, KARR, DAVID <<a href="mailto:dk068x@att.com" target="_blank">dk068x@att.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">I'm a beginner to libvirt and creating VMs, for that matter.  I have a set of specifications for VMs I need to create and log into, but I have to create them on an Ubuntu box that I only have ssh access to.  I won't have desktop GUI access,
 although I do have dynamic port forwarding, so I can access a browser GUI from my desktop.<br>
<br>
Reading through the libvirt info, I see numerous mentions about using VNC to do additional work, but I won't be able to use VNC (not allowed within our firewall).<br>
<br>
I could use some advice on how to move forward with this.  I've started at <a href="https://help.ubuntu.com/lts/serverguide/libvirt.html" target="_blank">
https://help.ubuntu.com/lts/serverguide/libvirt.html</a> for initial information.<br>
<br>
I managed to create a disk image for my first VM, and I believe I created the first VM using an ISO (based on CentOS, I believe), but I'll probably have to rebuild that, because I think I have to configure networks on the VM, which I didn't do on initial creation. 
 I was confused by the initial results from "virt-install", because it seemed to hang after a second or two (I posted this SO question about this:
<a href="http://stackoverflow.com/questions/31302871/trouble-using-virt-install-on-ubuntu-to-create-vm-just-hangs-after-displaying" target="_blank">
http://stackoverflow.com/questions/31302871/trouble-using-virt-install-on-ubuntu-to-create-vm-just-hangs-after-displaying</a> ).  The reply from this makes it seem like it was trying to present a GUI for next steps, but I of course never saw that.  The VM appears
 to exist, but in a "shut off" state.<br>
<br>
_______________________________________________<br>
libvirt-users mailing list<br>
<a href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libvirt-users" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>