[one-users] Virtual machine not able to use public network (using the leases & kvm)

Gianni Dalla Torre gianni.dallatorre at cnaf.infn.it
Wed Jan 27 11:28:53 PST 2010


Hi all,

I configured an OpenNebula (v 1.4) front-end in my pc "solaris" (Ubuntu 
9.04) and installed a cluster node "omii001" (Scientific Linux CERN SLC 
release 2.6.18-164.11.1.el5 x86_64).
I need to access my VM through ssh, so I used the Bridged networking 
("shared physical device") following this instructions:
http://www.opennebula.org/doku.php?id=documentation:rel1.4:nm

I also used the Leases within the Virtual Machine, and modified the 
Image of my VM which is a Debian 5,
- Copying the script $ONE_LOCATION/share/scripts/vmcontext.sh into the 
/etc/init.d directory in the VM root file system.
- Executing the script at boot time before starting any network service.
- creating a link $ ln /etc/init.d/vmcontext.sh /etc/rc2.d/S01vmcontext.sh
and modified the script in order to be compliant whit the request of my 
network changing the gateway port (253) and the name of the interface 
where to find the gateway (eth1 instead of eth0) which is eth1 because I 
have setted only a public network.

The problem:
Deploying the VM I have no errors in the oned.log file, but the VM is 
able only to ping the IP of the host where it is deployed, and in not 
visible in the public network.

Other info:
At the boot of the virtual machine, only the lo interface is ON, and I 
have to ifup eth1, in order to ping the host omii001.
The bridge's settings of the host omii001 should be OK, because if I 
deploy a VM using virt-manager and setting manually the same IP & 
gateway, that I want to assign to my VM, I have no complications.

cat pvlan.net
NAME   = "PublicVLAN"
TYPE   = FIXED
BRIDGE = br0
LEASES = [ IP="131.154.100.249"]
LEASES = [ IP="131.154.100.252"]

cat debian.template

NAME    = debian
CPU    = 1
MEMORY    = 1024
# --- kernel & boot device ---
OS    = [ boot   = hd]
# --- disks ---
DISK    = [
     source   = "/srv/cloud/one/images/deb.img",
     target   = "vda",
     readonly = "no" ]
# --- I/O ---
GRAPHICS= [
         type    = "vnc",
         listen  = "127.0.0.1",
         port    = "-1"]
# --- NIC ---
NIC     = [
     network = "PublicVLAN",
         bridge  = "br0",
     model = "virtio"]
SAVE    = yes
FEATURES=[ acpi="no" ]

onevm show 113
VIRTUAL MACHINE 113 INFORMATION
ID             : 113
NAME           : debian
STATE          : ACTIVE
LCM_STATE      : RUNNING
START TIME     : 01/27 18:36:34
END TIME       : -
DEPLOY ID:     : one-113

VIRTUAL MACHINE TEMPLATE
CPU=1
DISK=[
   READONLY=no,
   SOURCE=/srv/cloud/one/images/deb.img,
   TARGET=vda ]
FEATURES=[
   ACPI=no ]
GRAPHICS=[
   LISTEN=127.0.0.1,
   PORT=-1,
   TYPE=vnc ]
MEMORY=1024
NAME=debian
NIC=[
   BRIDGE=br0,
   IP=131.154.100.252,
   MAC=00:01:83:9a:64:fc,
   MODEL=virtio,
   NETWORK=PublicVLAN,
   VNID=18 ]
OS=[
   BOOT=hd ]
SAVE=yes
VMID=113


(omii001)brctl show
bridge name    bridge id            STP enabled    interfaces
br0            8000.0015c5edbf17    no             vnet0
                                                    eth0
virbr0         8000.000000000000    yes

Thank you in advance for your time.

Best regards,

Gianni


-- 
Gianni Dalla Torre
Computer Science Engineering

INFN -CNAF
Via Ranzani 13/2
40127 Bologna, Italy
Phone:	+39 051 6092913
Fax:	+39 051 6092916
mail:	dallatorre&cnaf.infn.it


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20100127/fa3fd0db/attachment-0002.htm>


More information about the Users mailing list