You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Wei Leong <wl...@blackducksoftware.com> on 2013/04/28 03:31:14 UTC

Hostname for VMs created from template

Hi everyone,

I noticed that for the default Centos 5.5 template that came with Cloudstack, the hostnames of VMs created using the template is the Display Name given to it during creation. However, VMs created from my own template (Centos 6.4) still uses the hostname that came with the template. Is it possible to have the hostname changed during the creation of a VM like the default template? 

Thanks,
Wei

Re: Hostname for VMs created from template

Posted by Wei Leong <wl...@blackducksoftware.com>.
Yep, that was it. Thanks much!

On Apr 27, 2013, at 10:13 PM, Ahmad Emneina <ae...@gmail.com> wrote:

> the default behavior for a dhcp client is to get its hostname via dhcp...
> things to verify /var/lib/dhclient/dhclient-*ifname*.leases (to see if the
> dhcp server is passing the host-name) file as well as /etc/hostname and
> /etc/hosts. Its possible they inherited these values from the vm the
> template was created from... and would likely need to be sanitized and
> re-template-ized :)
> 
> 
> On Sat, Apr 27, 2013 at 6:31 PM, Wei Leong <wl...@blackducksoftware.com>wrote:
> 
>> Hi everyone,
>> 
>> I noticed that for the default Centos 5.5 template that came with
>> Cloudstack, the hostnames of VMs created using the template is the Display
>> Name given to it during creation. However, VMs created from my own template
>> (Centos 6.4) still uses the hostname that came with the template. Is it
>> possible to have the hostname changed during the creation of a VM like the
>> default template?
>> 
>> Thanks,
>> Wei


Re: Hostname for VMs created from template

Posted by Ahmad Emneina <ae...@gmail.com>.
the default behavior for a dhcp client is to get its hostname via dhcp...
things to verify /var/lib/dhclient/dhclient-*ifname*.leases (to see if the
dhcp server is passing the host-name) file as well as /etc/hostname and
/etc/hosts. Its possible they inherited these values from the vm the
template was created from... and would likely need to be sanitized and
re-template-ized :)


On Sat, Apr 27, 2013 at 6:31 PM, Wei Leong <wl...@blackducksoftware.com>wrote:

> Hi everyone,
>
> I noticed that for the default Centos 5.5 template that came with
> Cloudstack, the hostnames of VMs created using the template is the Display
> Name given to it during creation. However, VMs created from my own template
> (Centos 6.4) still uses the hostname that came with the template. Is it
> possible to have the hostname changed during the creation of a VM like the
> default template?
>
> Thanks,
> Wei