Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hostname is not assigned to the VM #461

Open
BhargaviAllada opened this issue Feb 7, 2019 · 3 comments
Open

Hostname is not assigned to the VM #461

BhargaviAllada opened this issue Feb 7, 2019 · 3 comments

Comments

@BhargaviAllada
Copy link

Versions:

  • Version of knife-vsphere: 2.0.1
  • Version of chef: 13.6.4

Platform Details

  • Version of vSphere: Version 6.5.0.10000 Build 7119157
  • Version of ESXi: 6.5.0

Issue:

Whenever I am cloning a Windows VM using the template, The VM takes template name as its Computer Name (DNS Name) and due to this I am unable to join the VM to the domain.

Command I use:

knife vsphere vm clone testb2 --cips DHCP --template 'TEST_CHEF_TMPT' --datastore ******** --host *********** --disable-customization true --start

Output:

Cloning template TEST_CHEF_TMPT to new VM testb2
Finished creating virtual machine testb2
Powered on virtual machine testb2

Regards,
Bhargavi.

@swalberg
Copy link
Collaborator

swalberg commented Feb 7, 2019

Hi, to set the vm's hostname, we need to run the customization steps. --disable-customization true skips over that. Does it work if you remove that?

@BhargaviAllada
Copy link
Author

Hi Sean,

Yes! it is working fine when I pass the --cspec (customization specifications) in the Clone command. But it is not working with --disable-customization true (without the --cspec).
So, is it mandate to pass --cspec for the hostname to be reflected on the VM?
Or is there any explicit knife vsphere command to change the hostname of the VM post cloning without the customization specifications ?

Regards,
Bhargavi.

@swalberg
Copy link
Collaborator

swalberg commented Feb 7, 2019

Hi, there are a handful of customization options at https://github.com/chef/knife-vsphere#customization-options, in particular you're looking for --chostname and possibly --cdomain.

Under the hood the settings specified in the cspec are mashed up with what's passed on the command line, so it's not one or the other. For Windows, we configure the domain joining stuff in a server side cspec and then customize everything else on the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants