[one-users] Netmask setting

Javier Fontan jfontan at opennebula.org
Tue Feb 18 08:19:15 PST 2014


Unfortunately the contextualization CD is not regenerated after the VM
is created so the only way to fix it is creating the context CD again
manually.

What you can do is modify the template from where the VMs were created
and start them again.

On Tue, Feb 18, 2014 at 4:52 PM, SysSolutions99
<syssolutions99 at gmail.com> wrote:
> Thanks Javier,
>
> Much appreciated. However, how do I fix my current VMs? Is there a way to do
> so?
>
> Regards
>
>
> On Tue, Feb 18, 2014 at 7:21 AM, Javier Fontan <jfontan at opennebula.org>
> wrote:
>>
>> The problem is indeed your context section. It does not have
>> networking configuration.
>>
>> When creating the template using Sunstone make sure the option "Add
>> Network contextualization" in the Context tab is activated.
>>
>> In case you are creating the template manually add "NETWORK=YES" in
>> CONTEXT.
>>
>> On Mon, Feb 17, 2014 at 9:57 PM, SysSolutions99
>> <syssolutions99 at gmail.com> wrote:
>> > thank You for your  help Javier. Here are the details -
>> >
>> > $ onevm show 20 -a
>> > VIRTUAL MACHINE 20 INFORMATION
>> > ID                  : 20
>> > NAME                : testvm3
>> > USER                : oneadmin
>> > GROUP               : oneadmin
>> > STATE               : ACTIVE
>> > LCM_STATE           : RUNNING
>> > RESCHED             : No
>> > HOST                : test
>> > CLUSTER ID          : -1
>> > START TIME          : 02/08 21:08:23
>> > END TIME            : -
>> > DEPLOY ID           : one-20
>> >
>> > VIRTUAL MACHINE MONITORING
>> > NET_RX              : 68.4G
>> > NET_TX              : 96.1G
>> > USED MEMORY         : 2G
>> > USED CPU            : 112
>> >
>> >
>> > PERMISSIONS
>> > OWNER               : um-
>> > GROUP               : ---
>> > OTHER               : ---
>> >
>> > VM DISKS
>> >  ID TARGET IMAGE                               TYPE SAVE SAVE_AS
>> >   0 hda    CentOS-6.4_x86_64 -Copy 2           file   NO       -
>> >
>> > VM NICS
>> >  ID NETWORK              VLAN BRIDGE       IP              MAC
>> >   0 private                no br0          172.16.192.64
>> > 02:00:ac:10:c0:40
>> >
>> >                                            fe80::400:acff:fe10:c040
>> >
>> > VIRTUAL MACHINE HISTORY
>> > SEQ HOST            ACTION             DS           START        TIME
>> > PROLOG
>> >   0 test        stop                0  02/08 21:08:43   0d 20h51m
>> > 0h00m14s
>> >   1 test        undeploy            0  02/09 18:02:12   0d 00h02m
>> > 0h00m00s
>> >   2 test        none                0  02/09 18:07:42   7d 18h43m
>> > 0h00m00s
>> >
>> > VIRTUAL MACHINE TEMPLATE
>> > AUTOMATIC_REQUIREMENTS="!(PUBLIC_CLOUD = YES)"
>> > CONTEXT=[
>> >   DISK_ID="1",
>> >   SSH_PUBLIC_KEY="ssh-rsa
>> >
>> > AAAAB3NzaC1yc2EAAAABIwAAAQEAtDxiwxLzNnlvGPBJEmVRNfV5bCxw1MMPh5/qWtEGNOnamzDr+Qyn6qZcAn3gHUP8FTm0HagsYLgjfJrfu6F0BY4Nk+8R3l9TzwJS1EzaeZ4GQOAjsL51opckxw3fjwctKCPC2nTXcvtiy9lpdo9hl1vKerCAfwwoKTnvyoNaykys+TXNR22fhrJzxVbX81BI2rte0ReNEwYyKzh/aBslKHadmvibkv1msC9+GHPOgmJF8cKzpEqxEQrj+x7FwpcHqwhVvwZfDYMn/nNTHubTWoR0Rl0+u5j6B1MGnY9ueMmqHWgy/m6RU8ctuyYa4/yMffpTHTvZ3mqGIcSgFRtoFQ==
>> > oneadmin at fermi",
>> >   TARGET="hdb" ]
>> > CPU="1"
>> > DISK=[
>> >   CLONE="YES",
>> >   CLONE_TARGET="SYSTEM",
>> >   DATASTORE="default",
>> >   DATASTORE_ID="1",
>> >   DEV_PREFIX="hd",
>> >   DISK_ID="0",
>> >   DRIVER="qcow2",
>> >   IMAGE="CentOS-6.4_x86_64 -Copy 2",
>> >   IMAGE_ID="3",
>> >   IMAGE_UNAME="oneadmin",
>> >   LN_TARGET="NONE",
>> >   READONLY="NO",
>> >   SAVE="NO",
>> >   SIZE="218",
>> >   SOURCE="/var/lib/one//datastores/1/e2b9535f84eef5185c2554371e0e8727",
>> >   TARGET="hda",
>> >   TM_MAD="shared",
>> >   TYPE="FILE" ]
>> > GRAPHICS=[
>> >   LISTEN="0.0.0.0",
>> >   PORT="5920",
>> >   TYPE="VNC" ]
>> > MEMORY="2048"
>> > NIC=[
>> >   BRIDGE="br0",
>> >
>> >   IP="172.16.192.64",
>> >   IP6_LINK="fe80::400:acff:fe10:c040",
>> >   MAC="02:00:ac:10:c0:40",
>> >   NETWORK="private",
>> >   NETWORK_ID="0",
>> >   NETWORK_UNAME="oneadmin",
>> >   NIC_ID="0",
>> >   VLAN="NO" ]
>> > OS=[
>> >   ARCH="x86_64" ]
>> > TEMPLATE_ID="5"
>> > VCPU="2"
>> > VMID="20"
>> >
>> >
>> >
>> >
>> > On Fri, Feb 14, 2014 at 1:47 AM, Javier Fontan <jfontan at opennebula.org>
>> > wrote:
>> >>
>> >> Can you send us the VM definition (onevm show 20 -a). It looks like
>> >> the network info is not in the context section.
>> >>
>> >> On Wed, Feb 12, 2014 at 10:21 PM, SysSolutions99
>> >> <syssolutions99 at gmail.com> wrote:
>> >> > Hi,
>> >> >
>> >> > The netmask on my network is 255.255.0.0, yet the VMs get plumbed
>> >> > with
>> >> > 255.255.255.0.
>> >> > I have tried setting up the netmask using the onevnet command but I
>> >> > am
>> >> > not
>> >> > able to.  Please help.
>> >> >
>> >> > here are the network details of the main host
>> >> >
>> >> > - # ifconfig br0
>> >> > br0       Link encap:Ethernet  HWaddr 00:25:90:E2:C5:98
>> >> >           inet addr:172.16.192.60  Bcast:172.16.255.255
>> >> > Mask:255.255.0.0
>> >> >           inet6 addr: fe80::225:90ff:fee2:c598/64 Scope:Link
>> >> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>> >> >           RX packets:10352600 errors:0 dropped:0 overruns:0 frame:0
>> >> >           TX packets:5714417 errors:0 dropped:0 overruns:0 carrier:0
>> >> >           collisions:0 txqueuelen:0
>> >> >           RX bytes:6383539896 (5.9 GiB)  TX bytes:8971371821 (8.3
>> >> > GiB)
>> >> >
>> >> > # netstat -rn
>> >> > Kernel IP routing table
>> >> > Destination     Gateway         Genmask         Flags   MSS Window
>> >> > irtt
>> >> > Iface
>> >> > 192.168.122.0   0.0.0.0         255.255.255.0   U         0 0
>> >> > 0
>> >> > virbr0
>> >> > 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0
>> >> > 0
>> >> > br0
>> >> > 172.16.0.0      0.0.0.0         255.255.0.0     U         0 0
>> >> > 0
>> >> > br0
>> >> > 0.0.0.0         172.16.192.1    0.0.0.0         UG        0 0
>> >> > 0
>> >> > br0
>> >> >
>> >> >
>> >> > Here are the networking details of the VM:
>> >> >
>> >> > # ifconfig eth0
>> >> > eth0      Link encap:Ethernet  HWaddr 02:00:AC:10:C0:40
>> >> >           inet addr:172.16.192.64  Bcast:172.16.192.255
>> >> > Mask:255.255.255.0
>> >> >           inet6 addr: fe80::acff:fe10:c040/64 Scope:Link
>> >> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>> >> >           RX packets:165669946 errors:0 dropped:1041 overruns:0
>> >> > frame:0
>> >> >           TX packets:170954965 errors:0 dropped:0 overruns:0
>> >> > carrier:0
>> >> >           collisions:0 txqueuelen:1000
>> >> >           RX bytes:27122115947 (25.2 GiB)  TX bytes:41114623111 (38.2
>> >> > GiB)
>> >> >           Interrupt:10
>> >> >
>> >> > # netstat -rn
>> >> > Kernel IP routing table
>> >> > Destination     Gateway         Genmask         Flags   MSS Window
>> >> > irtt
>> >> > Iface
>> >> > 172.16.192.0    0.0.0.0         255.255.255.0   U         0 0
>> >> > 0
>> >> > eth0
>> >> > 0.0.0.0         172.16.192.1    0.0.0.0         UG        0 0
>> >> > 0
>> >> > eth0
>> >> >
>> >> >
>> >> >
>> >> > Here is the onevnet definition -
>> >> >
>> >> > [oneadmin at fermi ~]$ onevnet show 0
>> >> > VIRTUAL NETWORK 0 INFORMATION
>> >> > ID             : 0
>> >> > NAME           : private
>> >> > USER           : oneadmin
>> >> > GROUP          : oneadmin
>> >> > CLUSTER        : -
>> >> > TYPE           : FIXED
>> >> > BRIDGE         : br0
>> >> > VLAN           : No
>> >> > USED LEASES    : 4
>> >> >
>> >> > PERMISSIONS
>> >> > OWNER          : um-
>> >> > GROUP          : ---
>> >> > OTHER          : ---
>> >> >
>> >> > VIRTUAL NETWORK TEMPLATE
>> >> > GATEWAY="172.16.192.1"
>> >> > NETMASK="255.255.0.0"
>> >> >
>> >> > USED LEASES
>> >> > LEASE=[ MAC="02:00:ac:10:c0:40", IP="172.16.192.64",
>> >> > IP6_LINK="fe80::400:acff:fe10:c040", USED="1", VID="20" ]
>> >> > LEASE=[ MAC="02:00:ac:10:c0:55", IP="172.16.192.85",
>> >> > IP6_LINK="fe80::400:acff:fe10:c055", USED="1", VID="13" ]
>> >> > LEASE=[ MAC="02:00:ac:10:c0:56", IP="172.16.192.86",
>> >> > IP6_LINK="fe80::400:acff:fe10:c056", USED="1", VID="9" ]
>> >> > LEASE=[ MAC="02:00:ac:10:c0:5c", IP="172.16.192.92",
>> >> > IP6_LINK="fe80::400:acff:fe10:c05c", USED="1", VID="19" ]
>> >> >
>> >> > FREE LEASES
>> >> > LEASE=[ MAC="02:00:ac:10:c0:57", IP="172.16.192.87",
>> >> > IP6_LINK="fe80::400:acff:fe10:c057", USED="0", VID="-1" ]
>> >> > LEASE=[ MAC="02:00:ac:10:c0:58", IP="172.16.192.88",
>> >> > IP6_LINK="fe80::400:acff:fe10:c058", USED="0", VID="-1" ]
>> >> > LEASE=[ MAC="02:00:ac:10:c0:59", IP="172.16.192.89",
>> >> > IP6_LINK="fe80::400:acff:fe10:c059", USED="0", VID="-1" ]
>> >> > LEASE=[ MAC="02:00:ac:10:c0:5a", IP="172.16.192.90",
>> >> > IP6_LINK="fe80::400:acff:fe10:c05a", USED="0", VID="-1" ]
>> >> > LEASE=[ MAC="02:00:ac:10:c0:5b", IP="172.16.192.91",
>> >> > IP6_LINK="fe80::400:acff:fe10:c05b", USED="0", VID="-1" ]
>> >> > LEASE=[ MAC="02:00:ac:10:c0:5d", IP="172.16.192.93",
>> >> > IP6_LINK="fe80::400:acff:fe10:c05d", USED="0", VID="-1" ]
>> >> >
>> >> > VIRTUAL MACHINES
>> >> >
>> >> >     ID USER     GROUP    NAME            STAT UCPU    UMEM HOST
>> >> > TIME
>> >> >      9 oneadmin oneadmin testvm9         runn    0    512M test
>> >> > 32d
>> >> > 20h47
>> >> >     13 oneadmin oneadmin testvm1         runn    0      2G test
>> >> > 29d
>> >> > 02h33
>> >> >     19 oneadmin oneadmin testvm2         runn    0      2G test    3d
>> >> > 17h13
>> >> >     20 oneadmin oneadmin testvm3         runn    1      2G test    3d
>> >> > 15h54
>> >> > [oneadmin at fermi ~]$
>> >> >
>> >> >
>> >> > Regards.
>> >> >
>> >> > _______________________________________________
>> >> > Users mailing list
>> >> > Users at lists.opennebula.org
>> >> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Javier Fontán Muiños
>> >> Developer
>> >> OpenNebula - The Open Source Toolkit for Data Center Virtualization
>> >> www.OpenNebula.org | @OpenNebula | github.com/jfontan
>> >
>> >
>>
>>
>>
>> --
>> Javier Fontán Muiños
>> Developer
>> OpenNebula - The Open Source Toolkit for Data Center Virtualization
>> www.OpenNebula.org | @OpenNebula | github.com/jfontan
>
>



-- 
Javier Fontán Muiños
Developer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | @OpenNebula | github.com/jfontan



More information about the Users mailing list