VMware Cloud Community
vittimac85
Enthusiast
Enthusiast
Jump to solution

Network Adaptor keeps getitng disconnected (Invalid configuration for device '0'.)

Hello,

I am trying to build a VM using a tool called packer.

Everything builds correctly, but the network adaptor keeps getting disconnected when the VM powers on. If I try to change it to connect ii get the Invalid configuration for device '0' error. Details of the error are below when I try to connect the adaptor

2020-04-01T15:22:45.903Z info vpxd[05371] [Originator@6876 sub=InvtNetwork opID=k8af22nq-212648-auto-4k2x-h5:70026105-4] Checking for DVS with portgroup key dvportgroup-47, port key

2020-04-01T15:22:45.903Z info vpxd[05371] [Originator@6876 sub=InvtNetwork opID=k8af22nq-212648-auto-4k2x-h5:70026105-4] Checking for DVS with portgroup key dvportgroup-47, port key

2020-04-01T15:22:45.936Z info vpxd[05359] [Originator@6876 sub=vpxLro opID=k8af22nq-212648-auto-4k2x-h5:70026105-4] [VpxLRO] -- BEGIN task-8764 -- vm-1156 -- vim.VirtualMachine.reconfigure -- 52ef4049-ce9a-2fd0-6fb3-6c56efa25ee7(5290c459-1933-324a-48bc-6b2eec70e36c)

2020-04-01T15:22:45.937Z info vpxd[05359] [Originator@6876 sub=vpxLro opID=k8af22nq-212648-auto-4k2x-h5:70026105-4] [VpxLRO] -- FINISH task-8764

2020-04-01T15:22:45.937Z info vpxd[05359] [Originator@6876 sub=Default opID=k8af22nq-212648-auto-4k2x-h5:70026105-4] [VpxLRO] -- ERROR task-8764 -- vm-1156 -- vim.VirtualMachine.reconfigure: vim.fault.ConcurrentAccess:

--> Result:

--> (vim.fault.ConcurrentAccess) {

--> faultCause = (vmodl.MethodFault) null,

--> faultMessage = <unset>

--> msg = ""

--> }

--> Args:

-->

--> Arg spec:

--> (vim.vm.ConfigSpec) {

--> changeVersion = "2020-04-01T15:21:40.42407Z",

--> name = <unset>,

--> version = <unset>,

--> createDate = <unset>,

--> uuid = <unset>,

--> instanceUuid = <unset>,

--> npivNodeWorldWideName = <unset>,

--> npivPortWorldWideName = <unset>,

--> npivWorldWideNameType = <unset>,

--> npivDesiredNodeWwns = <unset>,

--> npivDesiredPortWwns = <unset>,

--> npivTemporaryDisabled = <unset>,

--> npivOnNonRdmDisks = <unset>,

--> npivWorldWideNameOp = <unset>,

--> locationId = <unset>,

--> guestId = <unset>,

--> alternateGuestName = <unset>,

--> annotation = <unset>,

--> files = (vim.vm.FileInfo) null,

--> tools = (vim.vm.ToolsConfigInfo) null,

--> flags = (vim.vm.FlagInfo) null,

--> consolePreferences = (vim.vm.ConsolePreferences) null,

--> powerOpInfo = (vim.vm.DefaultPowerOpInfo) null,

--> numCPUs = <unset>,

--> numCoresPerSocket = <unset>,

--> memoryMB = <unset>,

--> memoryHotAddEnabled = <unset>,

--> cpuHotAddEnabled = <unset>,

--> cpuHotRemoveEnabled = <unset>,

--> virtualICH7MPresent = <unset>,

--> virtualSMCPresent = <unset>,

--> deviceChange = (vim.vm.device.VirtualDeviceSpec) [

--> (vim.vm.device.VirtualDeviceSpec) {

--> operation = "edit",

--> fileOperation = <unset>,

--> device = (vim.vm.device.VirtualVmxnet3) {

--> dynamicProperty = <unset>,

--> key = 4000,

--> deviceInfo = (vim.Description) {

--> label = "Network adapter 1",

--> summary = "DVSwitch: 50 16 83 17 8b 8a 4f 88-e3 a9 66 82 4f 3d fe 3b"

--> },

--> backing = (vim.vm.device.VirtualEthernetCard.DistributedVirtualPortBackingInfo) {

--> port = (vim.dvs.PortConnection) {

--> switchUuid = "50 16 83 17 8b 8a 4f 88-e3 a9 66 82 4f 3d fe 3b",

--> portgroupKey = "dvportgroup-47",

--> portKey = <unset>,

--> connectionCookie = <unset>

--> }

--> },

--> connectable = (vim.vm.device.VirtualDevice.ConnectInfo) {

--> migrateConnect = <unset>,

--> startConnected = true,

--> allowGuestControl = true,

--> connected = true,

--> status = "unrecoverableError"

--> },

--> slotInfo = (vim.vm.device.VirtualDevice.PciBusSlotInfo) {

--> pciSlotNumber = 33

--> },

--> controllerKey = 100,

--> unitNumber = 7,

--> addressType = "generated",

--> macAddress = "00:0c:29:bb:5b:ba",

--> wakeOnLanEnabled = false,

--> resourceAllocation = (vim.vm.device.VirtualEthernetCard.ResourceAllocation) {

--> reservation = 0,

--> share = (vim.SharesInfo) {

--> shares = 50,

--> level = "normal"

--> },

--> limit = -1

--> },

--> externalId = <unset>,

--> uptCompatibilityEnabled = false

--> },

--> profile = <unset>,

--> backing = (vim.vm.device.VirtualDeviceSpec.BackingSpec) null

--> }

--> ],

--> cpuAllocation = (vim.ResourceAllocationInfo) null,

--> memoryAllocation = (vim.ResourceAllocationInfo) null,

--> latencySensitivity = (vim.LatencySensitivity) null,

--> cpuAffinity = (vim.vm.AffinityInfo) null,

--> memoryAffinity = (vim.vm.AffinityInfo) null,

--> networkShaper = (vim.vm.NetworkShaperInfo) null,

--> cpuFeatureMask = <unset>,

--> extraConfig = <unset>,

--> swapPlacement = <unset>,

--> bootOptions = (vim.vm.BootOptions) null,

--> vAppConfig = (vim.vApp.VmConfigSpec) null,

--> ftInfo = (vim.vm.FaultToleranceConfigInfo) null,

--> repConfig = (vim.vm.ReplicationConfigSpec) null,

--> vAppConfigRemoved = <unset>,

--> vAssertsEnabled = <unset>,

--> changeTrackingEnabled = <unset>,

--> firmware = <unset>,

--> maxMksConnections = <unset>,

--> guestAutoLockEnabled = <unset>,

--> managedBy = (vim.ext.ManagedByInfo) null,

--> memoryReservationLockedToMax = <unset>,

--> nestedHVEnabled = <unset>,

--> vPMCEnabled = <unset>,

--> scheduledHardwareUpgradeInfo = (vim.vm.ScheduledHardwareUpgradeInfo) null,

--> vmProfile = <unset>,

--> messageBusTunnelEnabled = <unset>,

--> crypto = (vim.encryption.CryptoSpec) null,

--> migrateEncryption = <unset>

--> }

Reply
0 Kudos
1 Solution

Accepted Solutions
vittimac85
Enthusiast
Enthusiast
Jump to solution

Hi Everyone.

Thanks for the input. But I have found the issue.

Packer has many different ways to create a VM and I'm using the vmware-iso method which deploys the VM via ESXi host. The port group that is attached to the VM when being build must be set to Ephemeral for port binding. After switching the portgroup to Ephemeral the vm started building.

SO the issue was just a misconfiguration on my part. Thanks for the help everyone Smiley Happy

View solution in original post

Reply
0 Kudos
4 Replies
vFouad
Leadership
Leadership
Jump to solution

it sounds like packer is trying to assign the vm network incorrectly....

That is the only time I have seen the Invalid configuration for device '0'

I'd start by making sure that the version of packer you are using is correct for your version of ESXi / vSphere.

Then verify that packer has compatibility for vDS networks.

You could try connect the new VM to a standard switch and see if that has different behavior?

Thanks,

Fouad

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee
Jump to solution

Packer has it's own community: https://discuss.hashicorp.com/c/packer


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
berndweyand
Expert
Expert
Jump to solution

this often occurs with dVS during deploy from template when the port-id of the switch is always assigned. in the template i must leave the portid empty so during deployment the nic is assigned to a new unassigned port on the switch.

but i could not identify the port-id in your packer-config

Reply
0 Kudos
vittimac85
Enthusiast
Enthusiast
Jump to solution

Hi Everyone.

Thanks for the input. But I have found the issue.

Packer has many different ways to create a VM and I'm using the vmware-iso method which deploys the VM via ESXi host. The port group that is attached to the VM when being build must be set to Ephemeral for port binding. After switching the portgroup to Ephemeral the vm started building.

SO the issue was just a misconfiguration on my part. Thanks for the help everyone Smiley Happy

Reply
0 Kudos