You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Fariborz Navidan <md...@gmail.com> on 2019/04/25 13:06:39 UTC

Cannot create instance with FQDN

hello folks,

When creating a new instance, it does not aceept dots to use in instance
name  and there seems to be no way to explicitly set hostname for VM. It
means hostnames cannot be a FQDN in ACS. How do you deal with this? Is
there any setting to allow dots in instance name or assign hostnames
explicitly and not to use VM name as hostname?

Kind Regards

Re: Cannot create instance with FQDN

Posted by Rene Moser <ma...@renemoser.net>.
Hi

A common way to have a bootstrap mechanism in many clouds, so also in
cloudstack, is to use cloud-init [1] as described in the docs [2].

You would need to create a template (or iso) with cloud-init installed
and then pass userdata as base64 encoded cloud-config, an example for a
hostname setting would be
https://cloudinit.readthedocs.io/en/latest/topics/modules.html#update-hostname

cloud init will be executed on boot.

[1] https://cloudinit.readthedocs.io/en/latest/
[2]
http://docs.cloudstack.apache.org/en/latest/adminguide/virtual_machines/user-data.html?#using-cloud-init

On 4/25/19 3:06 PM, Fariborz Navidan wrote:
> hello folks,
> 
> When creating a new instance, it does not aceept dots to use in instance
> name  and there seems to be no way to explicitly set hostname for VM. It
> means hostnames cannot be a FQDN in ACS. How do you deal with this? Is
> there any setting to allow dots in instance name or assign hostnames
> explicitly and not to use VM name as hostname?
> 
> Kind Regards
> 

RE: Cannot create instance with FQDN

Posted by Andrija Panic <an...@shapeblue.com>.
Hi Fariborz,

Instance FQDN is generate from the VM name when you deploy it (becomes hostname) and the network domain set on the network to which a VM is joined.
So:
In case of Shared or Isolated Network, you have an option to set "network domain" when creating the network.
In case of VPC, you have the option to set "DNS domain for Guest Networks" as seen in new VPC wizard in GUI.

Domain name, if not specified is inherited from the global setting guest.domain.suffix (if not mistaken).
You can always hack the DB and change network/VPC domain name (for specific network) in appropriate tables (just FYI, but don't attempt without DB backup) and restarting that network/VPC with Clean Up.

Hope that helps,
Andrija

andrija.panic@shapeblue.comĀ 
www.shapeblue.com
Amadeus House, Floral Street, London  WC2E 9DPUK
@shapeblue
  
 


-----Original Message-----
From: Fariborz Navidan <md...@gmail.com> 
Sent: 25 April 2019 15:07
To: users@cloudstack.apache.org
Subject: Cannot create instance with FQDN

hello folks,

When creating a new instance, it does not aceept dots to use in instance name  and there seems to be no way to explicitly set hostname for VM. It means hostnames cannot be a FQDN in ACS. How do you deal with this? Is there any setting to allow dots in instance name or assign hostnames explicitly and not to use VM name as hostname?

Kind Regards