You can attach a "console" to the VM and access the console via "virsh"<br><br>You can setup console access by adding the following to the VM template defn.<br><br>RAW = [ type = "kvm",<br>
              data = "<devices><serial
type=\"pty\"><source path=\"/dev/pts/5\"/><target
port=\"0\"/></serial><console type=\"pty\"
tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target
port=\"0\"/></console></devices>" ]<br><br>Steps:<br>--------<br><br>1. Define a new VM (say vm2) template with console access like below:<br><br>#-----------------------------<div id=":yg" class="ii gt">
----------<br>
# VM definition example<br>
#---------------------------------------<br>
<br>
NAME = vm2<br>
<br>
CPU    = 1<br>
MEMORY = 512<br>
<br>
# --- kernel & boot device ---<br>
<br>
OS = [<br>
  kernel   = "/vmlinuz",<br>
  initrd   = "/initrd.img",<br>
  root     = "sda" ]<br>
<br>
# --- 2 disks ---<br>
<br>
DISK = [<br>
  source   = "/srv/cloud/temp/vm1.img",<br>
  target   = "sda",<br>
  readonly = "no" ]<br>
<br>
DISK = [<br>
  type     = swap,<br>
  size     = 1024,<br>
  target   = "sdb",<br>
  readonly = "no" ]<br>
<br>
# --- 1 NIC ---<br>
<br>
NIC    = [ NETWORK = "Small network" ]<br>
<br>
</div>RAW = [ type = "kvm",<br>              data = "<devices><serial type=\"pty\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\" tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></console></devices>" ]<br>
<br>2.  Next create the VM using "onevm -v create <templateName><br><br>3. SSH onto the host<br><br>4. Run "virsh list" to confirm the VM is running<br><br>5. Run "sudo virsh console <domainName>" to gain access to the VM. Hit <Enter> key a couple of times to get to the "login"<br>
<br>You can now check the IP address.<br><br><br><br>-- <br>Thanks,<br>Rosh<br><a href="http://blogs.plexibus.com">http://blogs.plexibus.com</a><br><br><br><div class="gmail_quote">On Thu, Feb 11, 2010 at 9:18 AM, Harder, Stefan <span dir="ltr"><<a href="mailto:Stefan.Harder@fokus.fraunhofer.de">Stefan.Harder@fokus.fraunhofer.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">










<div link="blue" vlink="purple" lang="DE">

<div>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Hi,</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">thank you for your quick answer.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">“onevm show vm1” shows me the template with the right IP yes.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">In the prepared VM I installed the vmcontext.sh script in /etc/init.d
and set a symbolic link to /etc/rcS.d. But it still doesn’t work. I also tried /etc/rc2.d.
But still the same. Since the node where the VMs run on is a server which I
only have ssh access to VNC won’t work like Jaime said, right? Is there another
way to log into a VM with no network configured? Does virsh has this possibility?</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">I don’t know what to try else… Is there somewhere a tutorial
about setting up a simple (ubuntu server) VM for using it with OpenNebula? Maybe
I already make mistakes here. But would OpenNebula boot the VM and set the
status as “runn” if something wents wrong?</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Sorry for asking so much newbie questions.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Best regards,</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Stefan</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0cm 0cm 0cm 4pt;">

<div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p class="MsoNormal"><b><span style="font-size: 10pt;">Von:</span></b><span style="font-size: 10pt;"> Jack Jill
[mailto:<a href="mailto:jacknjill111@gmail.com" target="_blank">jacknjill111@gmail.com</a>] <br>
<b>Gesendet:</b> Mittwoch, 10. Februar 2010 17:57<br>
<b>An:</b> Harder, Stefan<br>
<b>Betreff:</b> Re: [one-users] VM boots but is not reachable</span></p>

</div>

</div><div><div></div><div class="h5">

<p class="MsoNormal"> </p>

<p class="MsoNormal" style="margin-bottom: 12pt;">Does "onevm show vm1"
show you the IP address that you used?<br>
<br>
I believe the few ways for VMs to obtain the IP address is:<br>
- get the IP from the MAC address<br>
- using contextualization<br>
<br>
IP from mac:<br>
You will need to install the script (see Guest OS config section under <a href="http://www.opennebula.org/doku.php?id=documentation:howto_vnet" target="_blank">http://www.opennebula.org/doku.php?id=documentation:howto_vnet</a>)
in your VM image under /etc/init.d and configure it to be run before networking
starts <br>
<br>
Using Contextualization:<br>
See: <a href="http://www.opennebula.org/doku.php?id=documentation:rel1.4:cong" target="_blank">http://www.opennebula.org/doku.php?id=documentation:rel1.4:cong</a><br>
<br>
<br>
<br>
HTH<br>
-- <br>
Thanks,<br>
Rosh<br>
<a href="http://blogs.plexibus.com" target="_blank">http://blogs.plexibus.com</a><br>
<br>
</p>

<div>

<p class="MsoNormal">On Wed, Feb 10, 2010 at 10:21 AM, Harder, Stefan <<a href="mailto:Stefan.Harder@fokus.fraunhofer.de" target="_blank">Stefan.Harder@fokus.fraunhofer.de</a>>
wrote:</p>

<p class="MsoNormal">Hi,<br>
<br>
I'm pretty new to OpenNebula. I compiled, installed, and configured it<br>
in Version 1.4 (using KVM) on two Ubuntu 9.10 Servers. My cluster node<br>
has a network bridge br0 and the ttylinux example works fine.<br>
<br>
But now I wanted to deploy a self created VM so I created one with the<br>
Virtual Machine Manager on my workstation. I used Ubuntu 9.10 server<br>
64bit for that, configured the /etc/network/interfaces of the VM with<br>
the right IP, installed sshd, and copied the image to the server who is<br>
the cloud manager. onevm create vm1 works, VM status after a while is<br>
runn.<br>
<br>
But unlike the ttylinux my VM is not pingable or reachable via ssh.<br>
<br>
Did I miss something to configure? Or any other mistakes?<br>
<br>
My templates look like this:<br>
<br>
<a href="http://small_network.net" target="_blank">small_network.net</a>:<br>
------------------<br>
NAME = "Small network"<br>
TYPE = FIXED<br>
<br>
#Now we'll use the cluster private network (physical)<br>
BRIDGE = br0<br>
LEASES = [ IP="xxx.xxx.xxx.204"]<br>
<br>
vm1.one:<br>
--------<br>
#---------------------------------------<br>
# VM definition example<br>
#---------------------------------------<br>
<br>
NAME = vm1<br>
<br>
CPU    = 1<br>
MEMORY = 512<br>
<br>
# --- kernel & boot device ---<br>
<br>
OS = [<br>
 kernel   = "/vmlinuz",<br>
 initrd   = "/initrd.img",<br>
 root     = "sda" ]<br>
<br>
# --- 2 disks ---<br>
<br>
DISK = [<br>
 source   = "/srv/cloud/temp/vm1.img",<br>
 target   = "sda",<br>
 readonly = "no" ]<br>
<br>
DISK = [<br>
 type     = swap,<br>
 size     = 1024,<br>
 target   = "sdb",<br>
 readonly = "no" ]<br>
<br>
# --- 1 NIC ---<br>
<br>
NIC    = [ NETWORK = "Small network" ]<br>
<br>
<br>
Best regards<br>
<br>
Stefan<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a></p>

</div>

<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
<br clear="all">
</p>

</div></div></div>

</div>

</div>


</blockquote></div><br><br clear="all"><br><br><br>