VMware Cloud Community
vANTHONY
Contributor
Contributor

vCloud Catalog Template Errors

We have recently started getting errors with some templates that are in our catalog and cannot determine from the errors what could be the issue.

below is the debug information from the error within vCloud. We are running vCloud 1.5.1

com.vmware.vcloud.api.presentation.service.BadRequestException: NAT rule cannot be added for NIC with addressing mode DHCP.
    at com.vmware.vcloud.net.impl.NetworkConfigurator.validateNoDhcpNicsInSpec(NetworkConfigurator.java:2855)
    at com.vmware.vcloud.net.impl.NetworkConfigurator.validateNatServiceSpec(NetworkConfigurator.java:2776)
    at com.vmware.vcloud.net.impl.NetworkConfigurator.validateServiceConfiguration(NetworkConfigurator.java:2453)
    at com.vmware.vcloud.net.impl.NetworkConfigurator.validateNetworkSpec(NetworkConfigurator.java:2321)
    at com.vmware.vcloud.net.impl.DefaultLogicalNetworkManager.updateLogicalNetwork(DefaultLogicalNetworkManager.java:941)
    at com.vmware.ssdc.backend.services.impl.VAppManagerImpl.saveNetworkSection(VAppManagerImpl.java:1626)
    at com.vmware.ssdc.backend.services.impl.VAppManagerImpl.saveVAppSpec(VAppManagerImpl.java:825)
    at com.vmware.ssdc.backend.services.impl.VAppManagerImpl.beginUpdateVApp(VAppManagerImpl.java:1352)
    at sun.reflect.GeneratedMethodAccessor3624.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
    at com.vmware.ssdc.backend.annotation.GenericMethodDiagnosticsInterceptor.aroundMethod(GenericMethodDiagnosticsInterceptor.java:44)
    at sun.reflect.GeneratedMethodAccessor977.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy181.beginUpdateVApp(Unknown Source)
    at com.vmware.vcloud.vdc.impl.VdcServiceImpl.updateResourceEntityTask(VdcServiceImpl.java:1006)
    at com.vmware.vcloud.vdc.impl.VdcServiceImpl.executeTask(VdcServiceImpl.java:4870)
    at com.vmware.vcloud.management.system.TaskServiceImpl$4.doInSecurityContext(TaskServiceImpl.java:1265)
    at com.vmware.vcloud.management.system.TaskServiceImpl$4.doInSecurityContext(TaskServiceImpl.java:1261)
    at com.vmware.vcloud.management.system.TaskServiceImpl$SecurityContextTemplate.executeForOrgAndUser(TaskServiceImpl.java:1578)
    at com.vmware.vcloud.management.system.TaskServiceImpl.execute(TaskServiceImpl.java:1261)
    at com.vmware.vcloud.management.system.TaskServiceImpl.dispatchByStatus(TaskServiceImpl.java:1183)
    at com.vmware.vcloud.management.system.TaskServiceImpl.dispatchTask(TaskServiceImpl.java:1062)
    at com.vmware.vcloud.management.system.TaskExecutionJob.execute(TaskExecutionJob.java:177)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
    at com.vmware.vcloud.scheduler.impl.ElasticQuartzThreadPool$3$1.run(ElasticQuartzThreadPool.java:209)
    at com.vmware.vcloud.scheduler.impl.ElasticQuartzThreadPool$3$1.run(ElasticQuartzThreadPool.java:207)
    at com.vmware.vcloud.common.threadpool.ThreadContextExecutor.execute(ThreadContextExecutor.java:36)
    at com.vmware.vcloud.scheduler.impl.ElasticQuartzThreadPool$3.run(ElasticQuartzThreadPool.java:207)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

0 Kudos
3 Replies
nirvy
Commander
Commander

Could be that you are affected by this issue in 1.5.1:

Editing a virtual machine in certain vApp networks causes NAT mappings to be added for every virtual machine NIC on the network
When you edit any virtual machine on a fenced or routed vApp network that uses IP Translation, NAT mappings are added for every virtual machine NIC on the network.


The error message "NAT rule cannot be added for NIC with addressing mode DHCP" would suggest something is awry with your NAT config in that vApp Template.  Are you able to deploy it and check?

0 Kudos
hoempf
Contributor
Contributor

I've seen the same error after adding a vApp to a catalog.

Funny thing is: No interface in the original vApp actually had DHCP defined. They were all IP pool allocation interfaces. Hmm.

I was able to resolve it by cloning the VM in vCenter and then import that into the catalog (import from vCenter icon). Of course this was viable because the template consisted of only one VM ...

Should this pop up again I think I'm going to ask VMware support. Maybe there's a problem within vCloud Director.

What version of vShield Manager are you running btw?

0 Kudos
eberlad
Contributor
Contributor

Hi

i faced the same issue when trying to make a vApp "gold master" - my solution was:

1. add the template vApp back to My cloud

2. go to the residing vm's ( do not turn the vApp or its vms on!!!)

3. go to hardware tab

4. under NIC uncheck the " connected " v mark

5. choose  the "none" network.

6. save changes and add to catalog

7.change to Gold master - works as a charm...

The logic behind this is that Gold Master has to be without any network filled because in any case when you deploy from Gold master this choise varys among the users ( which network to use...)

Hope this helps

eberlad

0 Kudos