[one-users] Problem with network
Luca Lorenzini
lorenzini.luca at gmail.com
Wed May 12 08:41:24 PDT 2010
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:
RAW = [
type = "kvm",
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>' ]
]
(i tried escaping \", wrapping it with <devices></devices> tag, but without
any results)
Here my configuration:
i saw with /sbin/ifconfig that the host have a bridge named virbr0:
virbr0 Link encap:Ethernet HWaddr 06:65:ee:bc:65:9c
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::d8:8aff:feee:96cb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:3609 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20 (20.0 B) TX bytes:509208 (509.2 KB)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My network template is this:
NAME = "Ranged Network"
TYPE = RANGED
BRIDGE = virbr0
NETWORK_SIZE = C
NETWORK_ADDRESS = 192.168.122.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My Vm Template:
NAME = ubuntu-test
MEMORY = 512
CPU=0.5
OS = [boot=hd,kernel=/vmlinuz]
DISK = [
source = "/home/saccorsi/ubuntu.img",
target = "hda",
readonly = "no",
clone = "no"
]
NIC = [ NETWORK = "Ranged
Network",IP=192.168.122.5,BRIDGE=virbr0,MAC=00:03:c0:a8:7a:05 ]
FEATURES=[ acpi="no" ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
virsh dumpxml return:
<domain type='kvm' id='13'>
<name>one-9</name>
<uuid>6b977e17-1424-3a2d-999f-f3571ffe8d8a</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<kernel>/vmlinuz</kernel>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/public/lorenz/cloud//9/images/disk.0'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='bridge'>
<mac address='00:03:c0:a8:7a:05'/>
<source bridge='virbr0'/>
<target dev='vnet1'/>
</interface>
</devices>
</domain>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sbin/ifconfig vnet1:
vnet1 Link encap:Ethernet HWaddr 86:4d:64:f7:cb:98
inet6 addr: fe80::844d:64ff:fef7:cb98/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:4126 (4.1 KB)
As you can see it has no ip address
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
onevm show return:
VID : 9
UID : 0
STATE : ACTIVE
LCM STATE : RUNNING
DEPLOY ID : one-9
MEMORY : 524288
CPU : 0
LAST POLL : 1273678795
START TIME : 05/12 17:37:04
STOP TIME : 01/01 01:00:00
NET TX : 0
NET RX : 0
....: Template :....
CPU : 0.5
DISK :
CLONE=no,READONLY=no,SOURCE=/public/lorenz/cloud/ubuntu.qcow2,TARGET=hda
FEATURES : ACPI=no
MEMORY : 512
NAME : ubuntu-test
NIC :
BRIDGE=virbr0,IP=192.168.122.5,MAC=00:03:c0:a8:7a:05,NETWORK=Ranged
Network,VNID=3
OS : BOOT=hd,KERNEL=/vmlinuz
I will appreciate your help
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20100512/c193821d/attachment-0001.htm>
More information about the Users
mailing list