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

Clone fails -- NicSettingMismatch #18

Closed
theborch opened this Issue May 10, 2012 · 21 comments

Comments

Projects
None yet
@theborch
Copy link

theborch commented May 10, 2012

Ubuntu 12.04 x64

knife vsphere vm clone newvmname --template U1204x64 -f Templates -VV

Results in this:

Cloning template U1204x64 to new VM newvmname
/home/user/.rvm/gems/ruby-1.9.2-p318/gems/rbvmomi-1.5.1/lib/rbvmomi/vim/Task.rb:11:in 'wait_for_completion': NicSettingMismatch: fault.NicSettingMismatch.summary (RbVmomi::Fault)
from /home/user/.rvm/gems/ruby-1.9.2-p318/gems/knife-vsphere-0.1.8/lib/chef/knife/vsphere_vm_clone.rb:195:in 'run'
from /home/user/.rvm/gems/ruby-1.9.2-p318/gems/chef-0.10.8/lib/chef/knife.rb:391:in 'run_with_pretty_exceptions'
from /home/user/.rvm/gems/ruby-1.9.2-p318/gems/chef-0.10.8/lib/chef/knife.rb:166:in 'run'
from /home/user/.rvm/gems/ruby-1.9.2-p318/gems/chef-0.10.8/lib/chef/application/knife.rb:128:in 'run'
from /home/user/.rvm/gems/ruby-1.9.2-p318/gems/chef-0.10.8/bin/knife:25:in '<top (required)>'
from /home/user/.rvm/gems/ruby-1.9.2-p318/bin/knife:19:in 'load'
from /home/user/.rvm/gems/ruby-1.9.2-p318/bin/knife:19:in '

'

@StanleyShen

This comment has been minimized.

Copy link

StanleyShen commented Jul 18, 2012

I also run into this issue, anyone know how to solve it?

@jcam

This comment has been minimized.

Copy link
Collaborator

jcam commented Jul 31, 2012

Does the knife vsphere vlan list command work in your environment?
It might be related to the vswitch dependency that I haven't had a chance to look into...

what version of vmware are you using?

@theborch

This comment has been minimized.

Copy link

theborch commented Jul 31, 2012

The vlan list command does in fact work.

We are using esxi 5.0 and vcenter/vsphere 5.0.

Thanks for the response!

@jcam

This comment has been minimized.

Copy link
Collaborator

jcam commented Jul 31, 2012

This error means the number of nics in the target vm does not match the number of nics in the customization spec.
Which doesnt make sense since the config spec is copied from the origin vm.

Can you try specifying the --cvlan option?

@bethanybenzur

This comment has been minimized.

Copy link

bethanybenzur commented Aug 17, 2012

Hi, I encountered the same "fault.NicSettingMismatch.summary" error. Here is a gist of the command without the cvlan and with it, adding the cvlan error produced a different stacktrace:
https://gist.github.com/cc2cf26a5b0fcccec612

vmware esxi 5.0 and vcenter/vsphere 5.0

@jcam

This comment has been minimized.

Copy link
Collaborator

jcam commented Aug 17, 2012

this seems to be happening when not using distributedvirtual networking.
I don't actually understand how that works, which is why i've had such a hard time knowing what changes to make.

have you tried with the latest gem (2.3)? it has some repaired stuff around non-distributed switches that another developer made

@bethanybenzur

This comment has been minimized.

Copy link

bethanybenzur commented Aug 17, 2012

I removed the 2.1 gem and tried again, I get the exact same "fault.NicSettingMismatch.summary" with and without --cvlan now: https://gist.github.com/a6619209a66c438424d9

@jcam

This comment has been minimized.

Copy link
Collaborator

jcam commented Aug 17, 2012

do you have multiple hosts, and if so, are different hosts configured with different network names? it could be targeting the clone to a host that doesn't have the requested network? maybe we need to add an option to specify which host (rather than just which cluster) the clone targets. also, i think i need a little more info about your setup.

@bethanybenzur

This comment has been minimized.

Copy link

bethanybenzur commented Aug 17, 2012

@jcam , we do have six different VMware hosts, all using standard vsphere switches, and from what I can tell in vSphere they all have the exact same network configuration. I'll dig deeper this weekend though. Is there a configuration file I can export and sanitize to show you more about our set-up or do you just want a description?

@jcam

This comment has been minimized.

Copy link
Collaborator

jcam commented Aug 17, 2012

probably just a description, feel free to email me directly, hikeit@gmail.com

@jjolet

This comment has been minimized.

Copy link

jjolet commented Aug 18, 2012

I'm also running into this, with or without the cvlan option. this seems to be a show-stopper. any ideas about this? i installed the gem yesterday, so it should be the current one....

@bethanybenzur

This comment has been minimized.

Copy link

bethanybenzur commented Aug 20, 2012

Thanks to a lot of help from @jcam, I was able to get past the NicSettingMismatch error by creating a customization spec in Vsphere then specifying it using the --cspec switch.

@morphizer

This comment has been minimized.

Copy link

morphizer commented Sep 6, 2012

Thanks @bethanybenzur and @jcam , adding a cspec to my clone command got around this problem.

@DanielFlorin

This comment has been minimized.

Copy link

DanielFlorin commented Nov 27, 2012

Hello.

We are evaluating knife-vsphere (knife-vsphere (0.3.0) along with chef to provision our ESX environment.
We have vCenter Server 5.0 and ESX 4.1.0 on one testing host.
Also we have a Windows Core Template and a customization for Windows OS like this:

knife vsphere template list
...
Template Name: TemplateCoreLight

knife vsphere customization list
...
Customization Name: CoreCustomization

knife vsphere vlan list
...
VLAN: Backup
VLAN: Dev

The problem it's that we can not pass over the fault.NicSettingMismatch.summary error.
We tried the follow combinations:

knife vsphere vm clone TEST2 --template TemplateCoreLight -VV
...
D:/Chef/client/chef/embedded/lib/ruby/gems/1.9.1/gems/rbvmomi-1.5.1/lib/rbvmomi/vim/Task.rb:11:in wait_for_completion': NicSettingMismatch: fault.NicSettingMismatch.summary (RbVmomi::Fault) from D:/Chef/client/chef/embedded/lib/ruby/gems/1.9.1/gems/knife-vsphere-0.3.0/lib/chef/knife/vsphere_vm_clone.rb:195:inrun'

knife vsphere vm clone TEST2 --template TemplateCoreLight --cspec CoreCustomization --cvlan Dev -VV
...
FATAL: Only Linux customization specifications are currently supported

knife vsphere vm clone TEST2 --template TemplateCoreLight --cvlan Dev -VV
...
D:/Chef/client/chef/embedded/lib/ruby/gems/1.9.1/gems/rbvmomi-1.5.1/lib/rbvmomi/vim/Task.rb:11:in wait_for_completion': NicSettingMismatch: fault.NicSettingMismatch.summary (RbVmomi::Fault) from D:/Chef/client/chef/embedded/lib/ruby/gems/1.9.1/gems/knife-vsphere-0.3.0/lib/chef/knife/vsphere_vm_clone.rb:195:inrun'

So Windows customizations are not supported. How can we still clone servers without --cspec specified ?

Thank you.

@jcam

This comment has been minimized.

Copy link
Collaborator

jcam commented Nov 27, 2012

One of my coworkers made a number of changes to clone to fully support
windows customization. I'll be reviewing the code this week and hopefully
submitting it soon.
-Jesse
On Nov 27, 2012 8:39 AM, "DanielFlorin" notifications@github.com wrote:

Hello.

We are evaluating knife-vsphere (knife-vsphere (0.3.0) along with chef to
provision our ESX environment.
We have vCenter Server 5.0 and ESX 4.1.0 on one testing host.
Also we have a Windows Core Template and a customization for Windows OS
like this:

knife vsphere template list
...
Template Name: TemplateCoreLight

knife vsphere customization list
...
Customization Name: CoreCustomization

knife vsphere vlan list
...
VLAN: Backup
VLAN: Dev

The problem it's that we can not pass over the
fault.NicSettingMismatch.summary error.
We tried the follow combinations:

knife vsphere vm clone TEST2 --template TemplateCoreLight -VV
...
D:/Chef/client/chef/embedded/lib/ruby/gems/1.9.1/gems/rbvmomi-1.5.1/lib/rbvmomi/vim/Task.rb:11:in
wait_for_completion': NicSettingMismatch: fault.NicSettingMismatch.summary
(RbVmomi::Fault)
from
D:/Chef/client/chef/embedded/lib/ruby/gems/1.9.1/gems/knife-vsphere-0.3.0/lib/chef/knife/vsphere_vm_clone.rb:195:in
run'

knife vsphere vm clone TEST2 --template TemplateCoreLight --cspec
CoreCustomization --cvlan Dev -VV
...
FATAL: Only Linux customization specifications are currently supported

knife vsphere vm clone TEST2 --template TemplateCoreLight --cvlan Dev -VV
...
D:/Chef/client/chef/embedded/lib/ruby/gems/1.9.1/gems/rbvmomi-1.5.1/lib/rbvmomi/vim/Task.rb:11:in
wait_for_completion': NicSettingMismatch: fault.NicSettingMismatch.summary
(RbVmomi::Fault)
from
D:/Chef/client/chef/embedded/lib/ruby/gems/1.9.1/gems/knife-vsphere-0.3.0/lib/chef/knife/vsphere_vm_clone.rb:195:in
run'

So Windows customizations are not supported. How can we still clone
servers without --cspec specified ?

Thank you.


Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-10758006.

@DanielFlorin

This comment has been minimized.

Copy link

DanielFlorin commented Nov 27, 2012

We will wait for this. Thank you for your fast response.

@sacx

This comment has been minimized.

Copy link

sacx commented Feb 20, 2013

Hi,

The main problem is coming from identity customization settings, when knife-vsphere is trying to set hostname and domain name for your new machine (clone). If you do not add --cips and --cgw you will get a NicSettingMissmatch error, because vmware is also expecting for nicSettingsMap.

In my case I cannot have indetity customization set because my machine doesn't support latest vmware tools (is a strange combination between old OS, new glib libraries and LVM) and when I add --cips --cgw it fails with:

ERROR: RbVmomi::Fault: UncustomizableGuest: Customization of the guest operating system 'debian6_64Guest' is not supported in this configuration. Microsoft Vista (TM) and Linux guests with Logical Volume Manager are supported only for recent ESX host and VMware Tools versions. Refer to vCenter documentation for supported configurations.

So, my idea is to skip this identity customization settings. I tried to explain my experience with this error here and I wrote a patch here what it will add --disable-customization setting which will help you to skip identity customization settings.

The patch is only disabling identity customization settings (ip, gw, hostname, domainname - settings for vm OS) and NOT machine specification settings ( number of CPU's, Memory, VLAN )

Best Regards
Adrian

@mdkent

This comment has been minimized.

Copy link
Contributor

mdkent commented Mar 20, 2013

re: patch from Adrian (sacx) to support --disable-customization. This exactly what I was looking for.

Adrian, would you mind putting together a pull request for it? If not I'm willing to.

@ezrapagel

This comment has been minimized.

Copy link
Collaborator

ezrapagel commented Mar 21, 2013

Hi Matthew,
I've merged in @sacx's changes. I'm about to push out a new gem that includes those, as well as @bethanybenzur's json bootstrap option.

@sacx

This comment has been minimized.

Copy link

sacx commented Jun 6, 2013

Nice to see that patch merged :) Thanks guys.

@swalberg

This comment has been minimized.

Copy link
Collaborator

swalberg commented May 20, 2015

Looks like this was solved. Closing, but please open a new issue referencing this one if there are more problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment