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

Gianni Dalla Torre gianni.dallatorre at cnaf.infn.it
Mon Feb 1 03:36:47 PST 2010


Hi Jaime,
thank you for the help,
as you request this are the output of *ifconfig -a* and *route -n*, 
followed by the output of the same commands after *ifup eth1*

deb:~# ifconfig -a
eth1      Link encap:Ethernet  HWaddr 00:01:83:9a:64:fc
           BROADCAST MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:38 errors:0 dropped:0 overruns:0 frame:0
           TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:2636 (2.5 KiB)  TX bytes:2636 (2.5 KiB)

deb:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Ifacei

deb:~# ifup eth1

deb:~# ifconfig -a
eth1      Link encap:Ethernet  HWaddr 00:01:83:9a:64:fc
           inet addr:131.154.100.252  Bcast:131.154.100.255  
Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:1318 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:630208 (615.4 KiB)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:38 errors:0 dropped:0 overruns:0 frame:0
           TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:2636 (2.5 KiB)  TX bytes:2636 (2.5 KiB)

deb:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
131.154.100.0   *               255.255.255.0   U     0      0        0 eth1
default         131.154.100.253 0.0.0.0         UG    0      0        0 eth1

deb:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
131.154.100.0   0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         131.154.100.253 0.0.0.0         UG    0      0        0 eth1

regards,
Gianni


On 02/01/2010 11:14 AM, Jaime Melis wrote:
> Hi Gianni,
> could you please send us the output of *ifconfig -a* and *route -n*, 
> right after the boot of the VM?
>
> regards,
> Jaime
>
> On Wed, Jan 27, 2010 at 8:28 PM, Gianni Dalla Torre 
> <gianni.dallatorre at cnaf.infn.it 
> <mailto:gianni.dallatorre at cnaf.infn.it>> wrote:
>
>     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 <http://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  <http://cnaf.infn.it>
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opennebula.org <mailto:Users at lists.opennebula.org>
>     http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20100201/ccd8783c/attachment-0003.htm>


More information about the Users mailing list