Hi all,
Hopefully someone can help me with this request. First the setup:
vCenter environment running 5.5
OpenNebula 4.14 (from source)
vCenter template with CentOS 6.7 prepped with one-context-4.14.rpm and Cloud-Init 0.7.5
Using the below template to deploy VM:
CONTEXT=[
SET_HOSTNAME="testvm003.staging4",
ETH0_DNS="10.16.1.135 10.16.1.136",
ETH0_GATEWAY="10.26.1.1",
ETH0_IP="10.26.1.94",
ETH0_MASK="255.255.255.0",
ETH0_NETWORK="10.26.1.0",
ETH0_SEARCH_DOMAIN="staging4",
NETWORK="YES",
DNS_HOSTNAME="YES",
SSH_PUBLIC_KEY="ssh-rsa blahblahblah jmalena@host123",
USER_DATA="#cloud-config
runcmd:
- mkdir -p /usr/local/test
- touch /usr/local/test/file.out " ]
NAME = "testvm003.staging4"
CPU = 2
VCPU = 2
MEMORY = 2048
GRAPHICS=[
LISTEN="0.0.0.0",
TYPE="vnc" ]
HYPERVISOR="vcenter"
NIC=[
NETWORK="VLAN_101_10_26_1_0 - SJCCLUSTER",
NETWORK_UNAME="oneadmin" ]
PUBLIC_CLOUD=[
TYPE="vcenter",
VM_TEMPLATE="42218aad-096a-a487-820d-c9ac9d018af5" ]
SCHED_REQUIREMENTS="NAME=\"SJCCLUSTER\""
Here is the generated context.sh file in the deployed VM:
# Context variables generated by OpenNebula
DISK_ID='0'
DNS_HOSTNAME='YES'
ETH0_DNS='10.16.1.135 10.16.1.136'
ETH0_GATEWAY='10.26.1.1'
ETH0_IP='10.26.1.92'
ETH0_MAC='02:00:63:8e:2a:08'
ETH0_MASK='255.255.255.0'
ETH0_NETWORK='10.26.1.0'
ETH0_SEARCH_DOMAIN='staging4'
NETWORK='YES'
SET_HOSTNAME='testvm001.staging4'
SSH_PUBLIC_KEY='ssh-rsa blahblahblah jmalena@host123'
TARGET='hda'
USER_DATA='#cloud-config
runcmd:
- mkdir -p /usr/local/test
- touch /usr/local/test/file.out '
Now the problem:
The contextualization of the VM works, but what does not work is the Cloud-Init section. I can’t seem to figure out what I’m doing wrong. From what I can tell is that a route is placed in the interface eth0 configuration for the network 169.254.0.0/16. The VM tries to communicate with the IP address 169.254.169.254 to obtain its metadata information. This information is locally on the server via the /tmp/context.sh script that was generated during the deployment of the VM, but this data doesn’t seem to be getting to Cloud-Init. Am I missing something? Does cloud.cfg in /etc/cloud/ in the VM template need to be configured differently than the default? I have tried the below setup with different options for dsmode. I have tried net and local and they don’t work:
disable_ec2_metadata: True
datasource_list: ['OpenNebula']
datasource:
OpenNebula:
dsmode: net
parseuser: nobody
Thanks in advance,
Jesus