<br>I tried your link but the file <span style="color: rgb(0, 0, 128);">/etc/udev/rules.d/70-persistent-net.rules</span> is empty. I also tried adding the INPUT and GRAPHICS options in the template but i still cant connect to the vm (i used vncviewer localhost).<br>
<br>As I previously wrote, is it correct my network configuration? I have to use 192.168.122.0 network for my VMs because the IP of the bridge is 192.168.122.1 or i can use other ip (ES:10.0.0.0)? I added few lines in the vmcontext.sh file to log the ip and mac used but when i shoutdown the vm and launch manually with qemu i see no changes in the filesystem (i've a doubt that the state running means that the vm is not running for real...).<br>
<br><br><div class="gmail_quote">On Fri, May 14, 2010 at 11:17 PM, tedbs <span dir="ltr"><<a href="mailto:tedbs@gtsum.com">tedbs@gtsum.com</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="EN-CA">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hi Luca,</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Looks like you’ve got a few issues to deal with.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">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.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">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: <br></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">INPUT = [ TYPE = "mouse", BUS = "ps2" ]</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">GRAPHICS = [TYPE = "vnc", LISTEN =
"localhost", PORT = 5910]</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">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:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><a href="http://www.serenux.com/2009/11/howto-fix-a-missing-eth0-adapter-after-moving-ubuntu-server-from-one-box-to-another/" target="_blank">http://www.serenux.com/2009/11/howto-fix-a-missing-</a></span><a href="http://www.serenux.com/2009/11/howto-fix-a-missing-eth0-adapter-after-moving-ubuntu-server-from-one-box-to-another/" target="_blank"><span style="font-size: 11pt; color: rgb(31, 73, 125);">buntu will add another NIC </span></a><span style="font-size: 11pt; color: rgb(31, 73, 125);"><a href="http://www.serenux.com/2009/11/howto-fix-a-missing-eth0-adapter-after-moving-ubuntu-server-from-one-box-to-another/" target="_blank">eth0-adapter-after-moving-ubuntu-server-from-one-box-to-another/</a></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">and it worked for me <br></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Ted Bodfish</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><a href="mailto:tedbs@gtsum.com" target="_blank">tedbs@gtsum.com</a></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">+1 519 657 7226</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<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;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> Luca Lorenzini
[mailto:<a href="mailto:lorenzini.luca@gmail.com" target="_blank">lorenzini.luca@gmail.com</a>] <br>
<b>Sent:</b> May-12-10 11:41 AM<br>
<b>To:</b> <a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a><br>
<b>Subject:</b> [one-users] Problem with network</span></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </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</p>
</div></div></div>
</div>
</blockquote></div><br>