<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=us-ascii">
<meta name=Generator content="Microsoft Word 12 (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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</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-CA link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Luca,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Looks like you’ve got a few issues to deal with.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>The VM template is particular about single quotes (‘) and
double quotes (“) – try switching them in your RAW data line. That
should get rid of the parsing error. Perhaps the parser can be altered to allow
interchangeable quoting.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I’ve been using the Virtual Machine Manager from an Ubuntu
Desktop installation to monitor the hosts and the VMs. I was able to use that
to connect to the console of a VM. I had to add a few lines to the template
file:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>INPUT = [ TYPE = "mouse",  BUS = "ps2" ]<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>GRAPHICS = [TYPE = "vnc", LISTEN =
"localhost", PORT = 5910]<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Another issue may be the MAC address assigned to the virtual
machine. If it is different from the one used when the virtual machine image
was created ubuntu will add another NIC as eth1 and eth0 won’t work. I
found this fix here:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><a
href="http://www.serenux.com/2009/11/howto-fix-a-missing-eth0-adapter-after-moving-ubuntu-server-from-one-box-to-another/">http://www.serenux.com/2009/11/howto-fix-a-missing-eth0-adapter-after-moving-ubuntu-server-from-one-box-to-another/</a><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>and it worked for me.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Ted Bodfish<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>tedbs@gtsum.com<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>+1 519 657 7226<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Luca Lorenzini
[mailto:lorenzini.luca@gmail.com] <br>
<b>Sent:</b> May-12-10 11:41 AM<br>
<b>To:</b> users@lists.opennebula.org<br>
<b>Subject:</b> [one-users] Problem with network<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I'm starting to use Opennebula v1.2 (i cant update to 1.4
because of university rules) and i've problems to connect to my VMs via ssh (i
cant ping them either). I put the script vmcontext.sh in /etc/init.d/ and i
linked it in /etc/rcS.d/ but without improvements. I tried using the RAW option
in the VMs' templates to use a console with virsh console command but the
parser of the template raises an error: "Error: Error parsing VM
template". This is what i put into the template:<br>
<br>
RAW = [<br>
 type = "kvm",<br>
 data = '<serial type="pty"><source
path="/dev/pts/2"/><target
port="1"></serial><console
type="pty"><source path="/dev/pts/2"/><target
port="1"></console>' ]<br>
]<br>
<br>
(i tried escaping \", wrapping it with <devices></devices>
tag, but without any results)<br>
<br>
<br>
Here my configuration:<br>
<br>
<br>
<br>
i saw with /sbin/ifconfig that the host have a bridge named virbr0:<br>
<br>
virbr0    Link encap:Ethernet  HWaddr
06:65:ee:bc:65:9c  <br>
          inet
addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0<br>
          inet6 addr:
fe80::d8:8aff:feee:96cb/64 Scope:Link<br>
          UP BROADCAST RUNNING
MULTICAST  MTU:1500  Metric:1<br>
          RX packets:5 errors:0
dropped:0 overruns:0 frame:0<br>
          TX packets:3609 errors:0
dropped:0 overruns:0 carrier:0<br>
          collisions:0
txqueuelen:0 <br>
          RX bytes:20 (20.0
B)  TX bytes:509208 (509.2 KB)<br>
<br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
My network template is this:<br>
<br>
NAME = "Ranged Network"<br>
TYPE = RANGED<br>
BRIDGE = virbr0<br>
NETWORK_SIZE = C<br>
NETWORK_ADDRESS = 192.168.122.0<br>
<br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
My Vm Template:<br>
<br>
NAME   = ubuntu-test<br>
MEMORY = 512<br>
CPU=0.5<br>
<br>
OS = [boot=hd,kernel=/vmlinuz]<br>
<br>
DISK   = [<br>
  source   = "/home/saccorsi/ubuntu.img",<br>
  target   = "hda",<br>
  readonly = "no",<br>
  clone = "no"<br>
]<br>
<br>
NIC    = [ NETWORK = "Ranged
Network",IP=192.168.122.5,BRIDGE=virbr0,MAC=00:03:c0:a8:7a:05 ]<br>
<br>
FEATURES=[ acpi="no" ]<br>
<br>
<br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
<br>
virsh dumpxml return:<br>
<br>
<domain type='kvm' id='13'><br>
  <name>one-9</name><br>
  <uuid>6b977e17-1424-3a2d-999f-f3571ffe8d8a</uuid><br>
  <memory>524288</memory><br>
  <currentMemory>524288</currentMemory><br>
  <vcpu>1</vcpu><br>
  <os><br>
    <type arch='i686' machine='pc'>hvm</type><br>
    <kernel>/vmlinuz</kernel><br>
    <boot dev='hd'/><br>
  </os><br>
  <clock offset='utc'/><br>
  <on_poweroff>destroy</on_poweroff><br>
  <on_reboot>restart</on_reboot><br>
  <on_crash>destroy</on_crash><br>
  <devices><br>
    <emulator>/usr/bin/kvm</emulator><br>
    <disk type='file' device='disk'><br>
      <source
file='/public/lorenz/cloud//9/images/disk.0'/><br>
      <target dev='hda' bus='ide'/><br>
    </disk><br>
    <interface type='bridge'><br>
      <mac address='00:03:c0:a8:7a:05'/><br>
      <source bridge='virbr0'/><br>
      <target dev='vnet1'/><br>
    </interface><br>
  </devices><br>
</domain><br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
  /sbin/ifconfig vnet1:<br>
<br>
vnet1     Link encap:Ethernet  HWaddr
86:4d:64:f7:cb:98  <br>
          inet6 addr:
fe80::844d:64ff:fef7:cb98/64 Scope:Link<br>
          UP BROADCAST RUNNING
MULTICAST  MTU:1500  Metric:1<br>
          RX packets:0 errors:0
dropped:0 overruns:0 frame:0<br>
          TX packets:74 errors:0
dropped:0 overruns:0 carrier:0<br>
          collisions:0
txqueuelen:500 <br>
          RX bytes:0 (0.0 B) 
TX bytes:4126 (4.1 KB)<br>
<br>
As you can see it has no ip address<br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
onevm show return:<br>
<br>
VID            :
9                  
<br>
UID            :
0                  
<br>
STATE          :
ACTIVE             
<br>
LCM STATE      :
RUNNING            
<br>
DEPLOY ID      :
one-9              
<br>
MEMORY         :
524288             
<br>
CPU            :
0                  
<br>
LAST POLL      :
1273678795          <br>
START TIME     : 05/12 17:37:04     
<br>
STOP TIME      : 01/01
01:00:00      <br>
NET TX         : 0<br>
NET RX         : 0<br>
<br>
....: Template :....<br>
   
CPU             :
0.5                
<br>
   
DISK            :
CLONE=no,READONLY=no,SOURCE=/public/lorenz/cloud/ubuntu.qcow2,TARGET=hda<br>
    FEATURES        :
ACPI=no            
<br>
    MEMORY         
:
512                
<br>
   
NAME            :
ubuntu-test         <br>
   
NIC             :
BRIDGE=virbr0,IP=192.168.122.5,MAC=00:03:c0:a8:7a:05,NETWORK=Ranged
Network,VNID=3<br>
   
OS             
: BOOT=hd,KERNEL=/vmlinuz<br>
<br>
<br>
<br>
<br>
I will appreciate your help<br>
<br>
Luca<o:p></o:p></p>

</div>

</body>

</html>