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<br>