You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Dan Dong <do...@gmail.com> on 2015/01/22 23:59:15 UTC

Hostname and IP address of VMs created from template.

Hi,
  I found that when I create new instances from template of my own( a
centos OS), the IP address
and hostname are not set to the VM automatically, you have to login to the
VM from the UI and set them manually, then a restart will get them take
effect. Does anybody else observe the same issue?

Cheers,
Dan

Re: Hostname and IP address of VMs created from template.

Posted by Andrei Mikhailovsky <an...@arhont.com>.
I've tried following the instructions for the 4.2.x version and it is partially working. Upon the first boot after vm instance is created from the template, the hostname is visible at the login prompt as well as by running the hostname command. However, after rebooting the instance, the hostname is lost forever and (none) is shown instead of the hostname. I've not had much time to investigate why this is happening, but it happens all the time. 

Has anyone experienced similar? 

Andrei 
----- Original Message -----

> From: "Geoff Higginbottom" <ge...@shapeblue.com>
> To: "<us...@cloudstack.apache.org>" <us...@cloudstack.apache.org>
> Sent: Thursday, 22 January, 2015 11:59:13 PM
> Subject: Re: Hostname and IP address of VMs created from template.

> Dan,

> You need to make sure you have prepared the VM you used to make the
> template correctly.

> There are some instructions in the docs.
> http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/4.4/templates.html

> Search for the section titled
> System preparation for Linux
> Regards

> Geoff Higginbottom
> CTO / Cloud Architect

> D: +44 20 3603 0542<tel:+442036030542> | S: +44 20 3603
> 0540<tel:+442036030540> | M: +447968161581<tel:+447968161581>

> geoff.higginbottom@shapeblue.com<ma...@shapeblue.com>
> | www.shapeblue.com<htp://www.shapeblue.com/> |
> Twitter:@cloudstackguru<https://twitter.com/#!/cloudstackguru>

> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N
> 4HS<x-apple-data-detectors://5>

> On 22 Jan 2015, at 23:09, Somesh Naidu
> <So...@citrix.com>> wrote:

> What guest is that? Did you check manually requesting a lease (like
> running dhclient or similar)?

> Somesh
> CloudPlatform Escalations
> Citrix Systems, Inc.

> -----Original Message-----
> From: Dan Dong [mailto:dongdan39@gmail.com]
> Sent: Thursday, January 22, 2015 5:59 PM
> To: users@cloudstack.apache.org<ma...@cloudstack.apache.org>
> Subject: Hostname and IP address of VMs created from template.

> Hi,
> I found that when I create new instances from template of my own( a
> centos OS), the IP address
> and hostname are not set to the VM automatically, you have to login
> to the
> VM from the UI and set them manually, then a restart will get them
> take
> effect. Does anybody else observe the same issue?

> Cheers,
> Dan
> Find out more about ShapeBlue and our range of CloudStack related
> services

> IaaS Cloud Design &
> Build<http://shapeblue.com/iaas-cloud-design-and-build//>
> CSForge - rapid IaaS deployment
> framework<http://shapeblue.com/csforge/>
> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> CloudStack Software
> Engineering<http://shapeblue.com/cloudstack-software-engineering/>
> CloudStack Infrastructure
> Support<http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training
> Courses<http://shapeblue.com/cloudstack-training/>

> This email and any attachments to it may be confidential and are
> intended solely for the use of the individual to whom it is
> addressed. Any views or opinions expressed are solely those of the
> author and do not necessarily represent those of Shape Blue Ltd or
> related companies. If you are not the intended recipient of this
> email, you must neither take any action based upon its contents, nor
> copy or show it to anyone. Please contact the sender if you believe
> you have received this email in error. Shape Blue Ltd is a company
> incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from
> Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company
> incorporated in Brasil and is operated under license from Shape Blue
> Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of
> South Africa and is traded under license from Shape Blue Ltd.
> ShapeBlue is a registered trademark.

Re: Hostname and IP address of VMs created from template.

Posted by Dan Dong <do...@gmail.com>.
Hi, All,
  Thanks for all the info, by recreating the template following the
document, now the newly created VMs have their IP addresses set
automatically, but the hostname still keeps the hostname of  the VM from
which template is created. For CentOS, the hostname is set in the file
/etc/sysconfig/network, apparently new VMs created did not set HOSTNAME
entry from either "name" or "displayname" of the input parameter( I set
hostname to localhost as stated in the document before creating the
template).

Cheers,
Dan


2015-01-23 6:45 GMT-06:00 Geoff Higginbottom <
geoff.higginbottom@shapeblue.com>:

> Hi Bhavin,
>
> Firstly the VMs Hostname is always taken from the 'name' setting and not
> the 'display name' this is why the name setting cannot have spaces (as
> Hostnames are not allowed to have spaces) but the display name can.
>
> Regarding
> https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Admin_Guide/append-displayname-vms.html
> - This setting changes how the MVs are listed on vCenter, and does not
> influence the VMs Hostname
>
> Regards
>
> Geoff Higginbottom
>
> D: +44 20 3603 0542 | S: +44 20 3603 0540 | M: +447968161581
>
> geoff.higginbottom@shapeblue.com
>
> -----Original Message-----
> From: chinu shah [mailto:chinu2909@gmail.com]
> Sent: 23 January 2015 02:50
> To: users@cloudstack.apache.org
> Cc: vijayendra.bhamidipati@citrix.com; suresh.ramamurthy@nuagenetworks.net
> Subject: Re: Hostname and IP address of VMs created from template.
>
> Thank you Geoff for the response, could you give insights how will it set
> automatically on guest VMs. According to the Documentation ("
>
> https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Admin_Guide/append-displayname-vms.html
> "),
> when we create a VM with Display name we still do not see the hostname set
> as display name. We are using centos "CentOS 5.3(64-bit) no GUI (vSphere)"
> provided by cloudstack. Hypervisor type is VMWare. Does the default
> template miss any scritps to set the hostname as display name. We have set
> the hostname to localhost and manually stopped and rebooted but still the
> hostname was not set to display name.
>
> Regards,
> Bhavin Shah
> Nuage Networks
> Find out more about ShapeBlue and our range of CloudStack related services
>
> IaaS Cloud Design & Build<
> http://shapeblue.com/iaas-cloud-design-and-build//>
> CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> CloudStack Software Engineering<
> http://shapeblue.com/cloudstack-software-engineering/>
> CloudStack Infrastructure Support<
> http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training Courses<
> http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is
> a company registered by The Republic of South Africa and is traded under
> license from Shape Blue Ltd. ShapeBlue is a registered trademark.
>

RE: Hostname and IP address of VMs created from template.

Posted by Geoff Higginbottom <ge...@shapeblue.com>.
Hi Bhavin,

Firstly the VMs Hostname is always taken from the 'name' setting and not the 'display name' this is why the name setting cannot have spaces (as Hostnames are not allowed to have spaces) but the display name can.

Regarding https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Admin_Guide/append-displayname-vms.html - This setting changes how the MVs are listed on vCenter, and does not influence the VMs Hostname

Regards

Geoff Higginbottom

D: +44 20 3603 0542 | S: +44 20 3603 0540 | M: +447968161581

geoff.higginbottom@shapeblue.com

-----Original Message-----
From: chinu shah [mailto:chinu2909@gmail.com]
Sent: 23 January 2015 02:50
To: users@cloudstack.apache.org
Cc: vijayendra.bhamidipati@citrix.com; suresh.ramamurthy@nuagenetworks.net
Subject: Re: Hostname and IP address of VMs created from template.

Thank you Geoff for the response, could you give insights how will it set automatically on guest VMs. According to the Documentation ("
https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Admin_Guide/append-displayname-vms.html"),
when we create a VM with Display name we still do not see the hostname set as display name. We are using centos "CentOS 5.3(64-bit) no GUI (vSphere)" provided by cloudstack. Hypervisor type is VMWare. Does the default template miss any scritps to set the hostname as display name. We have set the hostname to localhost and manually stopped and rebooted but still the hostname was not set to display name.

Regards,
Bhavin Shah
Nuage Networks
Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Software Engineering<http://shapeblue.com/cloudstack-software-engineering/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: Hostname and IP address of VMs created from template.

Posted by chinu shah <ch...@gmail.com>.
Thank you Geoff for the response, could you give insights how will it set
automatically on guest VMs. According to the Documentation ("
https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Admin_Guide/append-displayname-vms.html"),
when we create a VM with Display name we still do not see the hostname set
as display name. We are using centos "CentOS 5.3(64-bit) no GUI
(vSphere)" provided
by cloudstack. Hypervisor type is VMWare. Does the default template miss
any scritps to set the hostname as display name. We have set the hostname
to localhost and manually stopped and rebooted but still the hostname was
not set to display name.

Regards,
Bhavin Shah
Nuage Networks

Re: Hostname and IP address of VMs created from template.

Posted by Geoff Higginbottom <ge...@shapeblue.com>.
Dan,

You need to make sure you have prepared the VM you used to make the template correctly.

There are some instructions in the docs.  http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/4.4/templates.html

Search for the section titled
System preparation for Linux
Regards

Geoff Higginbottom
CTO / Cloud Architect

D: +44 20 3603 0542<tel:+442036030542> | S: +44 20 3603 0540<tel:+442036030540> | M: +447968161581<tel:+447968161581>

geoff.higginbottom@shapeblue.com<ma...@shapeblue.com> | www.shapeblue.com<htp://www.shapeblue.com/> | Twitter:@cloudstackguru<https://twitter.com/#!/cloudstackguru>

ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS<x-apple-data-detectors://5>


On 22 Jan 2015, at 23:09, Somesh Naidu <So...@citrix.com>> wrote:

What guest is that? Did you check manually requesting a lease (like running dhclient or similar)?

Somesh
CloudPlatform Escalations
Citrix Systems, Inc.


-----Original Message-----
From: Dan Dong [mailto:dongdan39@gmail.com]
Sent: Thursday, January 22, 2015 5:59 PM
To: users@cloudstack.apache.org<ma...@cloudstack.apache.org>
Subject: Hostname and IP address of VMs created from template.

Hi,
 I found that when I create new instances from template of my own( a
centos OS), the IP address
and hostname are not set to the VM automatically, you have to login to the
VM from the UI and set them manually, then a restart will get them take
effect. Does anybody else observe the same issue?

Cheers,
Dan
Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge - rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Software Engineering<http://shapeblue.com/cloudstack-software-engineering/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

RE: Hostname and IP address of VMs created from template.

Posted by Somesh Naidu <So...@citrix.com>.
What guest is that? Did you check manually requesting a lease (like running dhclient or similar)?

Somesh
CloudPlatform Escalations
Citrix Systems, Inc.


-----Original Message-----
From: Dan Dong [mailto:dongdan39@gmail.com] 
Sent: Thursday, January 22, 2015 5:59 PM
To: users@cloudstack.apache.org
Subject: Hostname and IP address of VMs created from template.

Hi,
  I found that when I create new instances from template of my own( a
centos OS), the IP address
and hostname are not set to the VM automatically, you have to login to the
VM from the UI and set them manually, then a restart will get them take
effect. Does anybody else observe the same issue?

Cheers,
Dan