Hi Sangram, On Sat, May 10, 2014 at 1:51 PM, Sangram Rath <sangram.r...@gmail.com>wrote:
> Hi Valentin, > > Thanks for getting back, really appreciate. > A bit of background: > Had opennebula 3.8 (all working fine), performed upgrade to 4.6 and things > screwed up. So ended up reinstalling (fresh install of 4.6). And we are > using images from the old installation. So contextualization was working > before and everything was fine. No changes done to file system inside > images till now. All images are runing Ubuntu 12.04 / Ubuntu 12.10. > One things to note here is that in all images, in file > /etc/network/interfaces eth0 is commented. And this was working before in > 3.8 (I did not setup 3.8). Right now I have manually uncommented eth0 so > that interface comes up. > I am wondering if the vmcontext script is really activated in the VM. I think you can check that with service --status-all on Ubuntu. If I were you I would update the one-context package on all VMs to 4.6. You can follow Basic Contextualization documentation [1] for that. > > 1 - Virtual network called "public" uses virbr0. A vm started with this > network gets an IP (192.168.122.x), different IP in sunstone and different > inside the VM (same ip range and if I uncomment eth0 manually). And I am > able to ping to internet. > Another clue that contextualization is not happening and that because of more than one reason as you'll below. But it's good that your network setup is working. > > 2 - The vms (5) should connect to internet. They will run different web > servers and we have 5 static IPs. If I type a web server name from browser > it should access that specific vm. Rest of the vms may or may not access > internet. So I will have a private network as well. > > 3 - *onevnet list* > > ID USER GROUP NAME CLUSTER TYPE BRIDGE > LEASES > 0 oneadmin oneadmin net0 - F > br0 0 > 4 oneadmin oneadmin Public - R > virbr0 2 > 5 oneadmin oneadmin Internet - R > br0 0 > 6 oneadmin oneadmin Private - R > br1 0 > > ************* > *onevnet show 4* > > VIRTUAL NETWORK 4 INFORMATION > ID : 4 > NAME : Public > USER : oneadmin > GROUP : oneadmin > CLUSTER : - > TYPE : RANGED > BRIDGE : virbr0 > VLAN : No > USED LEASES : 2 > > PERMISSIONS > OWNER : um- > GROUP : --- > OTHER : --- > > VIRTUAL NETWORK TEMPLATE > BRIDGE="virbr0" > DESCRIPTION="" > DNS="8.8.8.8" > GATEWAY="192.168.122.1" > NETWORK_ADDRESS="192.168.122.10" > NETWORK_MASK="255.255.255.0" > PHYDEV="" > VLAN="NO" > VLAN_ID="" > > RANGE > IP_START : 192.168.122.1 > IP_END : 192.168.122.254 > > LEASES ON HOLD > LEASE=[ MAC="02:00:c0:a8:7a:01", IP="192.168.122.1", > IP6_LINK="fe80::400:c0ff:fea8:7a01", USED="1", VID="-1" ] > > USED LEASES > LEASE=[ MAC="02:00:c0:a8:7a:02", IP="192.168.122.2", > IP6_LINK="fe80::400:c0ff:fea8:7a02", USED="1", VID="48" ] > > VIRTUAL MACHINES > > ID USER GROUP NAME STAT UCPU UMEM > HOST TIME > 48 oneadmin oneadmin Sfout staging ( runn 0 2G localhost 0d > 23h06 > > > 4 - Yes the template has a NETWORK section. > > 5 - *onetemplate show 5* > > TEMPLATE 5 INFORMATION > ID : 5 > NAME : Sfout staging (Ubuntu Server 11.10) > USER : oneadmin > GROUP : oneadmin > REGISTER TIME : 05/06 13:35:47 > > PERMISSIONS > OWNER : um- > GROUP : --- > OTHER : --- > > TEMPLATE CONTENTS > CONTEXT=[ > HOSTNAME="sfout.dev.redeyeelectronics.com" ] > CPU="4" > DISK=[ > IMAGE="Sfout staging image", > IMAGE_UNAME="oneadmin" ] > GRAPHICS=[ > LISTEN="0.0.0.0", > TYPE="VNC" ] > MEMORY="2048" > NIC=[ > NETWORK="Public", > NETWORK_UNAME="oneadmin" ] > Your CONTEXT section is missing the NETWORK=YES bit to write the networking information inside the CONTEXT CD-ROM. I am almost sure that if you mount /dev/disk/by-label/CONTEXT into /mnt and read /mnt/context.sh, in the VM, you'll notice that it lacks any kind of networking information (ETH0_X variables). See Advanced Contextualization documentation [2]. Especially the Network Configuration section. > > 6- *onevm show * > > VIRTUAL MACHINE 48 INFORMATION > ID : 48 > NAME : Sfout staging (Ubuntu Server 11.10)-48 > USER : oneadmin > GROUP : oneadmin > STATE : ACTIVE > LCM_STATE : RUNNING > RESCHED : No > HOST : localhost > CLUSTER ID : -1 > START TIME : 05/09 05:49:06 > END TIME : - > DEPLOY ID : one-48 > > VIRTUAL MACHINE MONITORING > NET_RX : 5M > USED MEMORY : 2G > USED CPU : 0 > NET_TX : 165K > > PERMISSIONS > OWNER : um- > GROUP : --- > OTHER : --- > > VM DISKS > ID TARGET IMAGE TYPE SAVE SAVE_AS > 0 hda Sfout staging image file YES - > > VM NICS > ID NETWORK VLAN BRIDGE IP MAC > 0 Public no virbr0 192.168.122.2 > 02:00:c0:a8:7a:02 > fe80::400:c0ff:fea8:7a02 > > VIRTUAL MACHINE HISTORY > SEQ HOST ACTION DS START TIME > PROLOG > 0 localhost none 0 05/09 05:49:13 0d 23h09m > 0h00m01s > > VIRTUAL MACHINE TEMPLATE > AUTOMATIC_REQUIREMENTS="!(PUBLIC_CLOUD = YES)" > CONTEXT=[ > DISK_ID="1", > HOSTNAME="sfout.dev.redeyeelectronics.com", > TARGET="hdb" ] > CPU="4" > GRAPHICS=[ > LISTEN="0.0.0.0", > PORT="5948", > TYPE="VNC" ] > MEMORY="2048" > TEMPLATE_ID="5" > VMID="48" > > > 7 - OS running inside VM is Ubuntu 12.04 / Ubuntu 12.10. The VM has a > network interface but it is commented in /etc/network/interfaces. When I > took over this setup it was like this and working. Of course in 3.8 > The latest contextualization packages are supported on your OS so I see no reason why you shouldn't update them :). > > > Let me know if you need anything else. > > [1]: http://docs.opennebula.org/4.6/user/virtual_machine_setup/bcont.html#bcont [2]: http://docs.opennebula.org/4.6/user/virtual_machine_setup/cong.html Best, Valentin > > > On Sat, May 10, 2014 at 1:09 PM, Valentin Bud <valentin....@gmail.com>wrote: > >> Hi Sangram, >> >> On Fri, May 9, 2014 at 9:39 PM, Sangram Rath <sangram.r...@gmail.com>wrote: >> >>> Hi, >>> >>> Virtual machine gets an IP through contextualization, however virtual >>> machine is not able to connect to internet. >>> Also from inside the VM, I do not see any other interface apart from lo. >>> Is this normal in contextualization? >>> >> >> I wouldn't call it normal contextualization because the VM is missing the >> primary Ethernet >> interface, eth0. Let's try figure out why. >> >> >>> >>> I am able to ping the VM from same host. Host is Cent OS 6.1. >>> Host has br0 connected to interface eth0. And virbr0. >>> >> >> Have you defined a virtual network in OpenNebula? Does that network use >> br0 on virbr0? >> >> Where would you want your VMs to connect to, br0 or vribr0? If you want >> to isolate >> the VMs in a private network defined on virbr0 you have to enable IP >> forwarding on the >> host and either NAT or route the virbr0 network to the outside world. >> >> It would help in troubleshooting if you can post the output of onevnet >> list and onevnet show >> <the name of your virtual network or it id>. >> >> Has the template that you instantiate the VM from, a NETWORK section? >> >> Can you share the output of onetemplate show <name of template or id>? >> >> One more thing that can help is the output of onevm show <name of VM or >> id>. >> >> What OS are you running inside the VM? It's strange that the VM doesn't >> have >> a eth0 interface. You can also check the boot logs and search for >> Ethernet adapters. >> >> I also think that lspci output would help you. Where do you have the VM >> image >> from? Have you built it yourself? Maybe the udev rules are still present >> and the interface >> doesn't show up because of that. >> >> Best, >> Valentin >> > > > > -- > Thanks, > Sangram Rath >
_______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org