[one-users] Hostname missing from context
Sander Klein
roedie at roedie.nl
Tue Aug 19 07:24:04 PDT 2014
Hi,
indeed using SET_HOSTNAME instead of HOSTNAME does the trick. So this
part works.
I was under the impression that when I created a template in the
Sunstone interface it would add the SET_HOSTNAME context setting by
itself. But I was wrong :-)
Thanks!
Sander
On 19.08.2014 15:22, Liu, Gene wrote:
> If you look into those init scripts (under /etc/one-context.d) you
> will figure out the details.
> In my context setting (4.4.1), I have both SET_HOSTNAME and
> DNS_HOSTNAM and it works well.
>
> CONTEXT
>
> NETWORK
> YES
>
> TOKEN
> YES
>
> SET_HOSTNAME
> $UNAME$VMID
>
> SEARCH_DOMAIN
> **********************
>
> DNS_HOSTNAME
> YES
>
> Gene
> On 14-08-19 07:59 AM, Diego M. wrote:
>
>> Assigning the name is part of the contextualization, it would depend
>> on the version you are running, but assumign it is the last one, you
>> can refer to this link:
>> http://docs.opennebula.org/4.8/user/virtual_machine_setup/cong.html
>> [2]
>>
>> As you will see there, the hostname is assigned through the hostname
>> variable on the context like this:
>>
>> CONTEXT = [
>> HOSTNAME="$name"
>> ]
>>
>> Let me know if it works for you :)
>>
>> Cheers!
>>
>>> Date: Tue, 19 Aug 2014 11:51:58 +0200
>>> From: roedie at roedie.nl
>>> To: users at lists.opennebula.org
>>> Subject: [one-users] Hostname missing from context
>>>
>>> Hi,
>>>
>>> When I create a VM with OpenNebula the VM does not get the
>> correct
>>> hostname.
>>>
>>> I can't seem to figure out why, but it is missing from my context
>>
>>> settings. When I look in context.sh I see:
>>>
>>> # Context variables generated by OpenNebula
>>> DISK_ID='1'
>>> ETH0_DNS='8.8.8.8 '
>>> ETH0_GATEWAY='192.168.3.1'
>>> ETH0_IP='192.168.3.202'
>>> ETH0_MAC='02:00:c0:a8:03:ca'
>>> ETH0_MASK='255.255.255.0'
>>> ETH0_NETWORK='192.168.3.0'
>>> NETWORK='YES'
>>> SSH_PUBLIC_KEY='ssh-rsa [...] sander at gallumbits
>>> '
>>> TARGET='hda'
>>>
>>> I expected that OpenNebula would add the vm-name as hostname. Am
>> I
>>> wrong?
>>>
>>> Greets,
>>>
>>> Sander
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org [1]
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org [1]
>
>
>
> Links:
> ------
> [1] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> [2] http://docs.opennebula.org/4.8/user/virtual_machine_setup/cong.html
More information about the Users
mailing list