VMware Cloud Community
AsiDev
Contributor
Contributor

ReconfigVM() fails with error message : Invalid configuration for device '1'

Source virtual machine is replicated from source VCenter to destination VCenter.

Both VCenters are the same version - either 5.5 or 6.5

During replication process we get VM configuration from source VCenter and transfer that VM configuration to destination side, where ReconfigVM() is called.

Everything works fine, we can replicate VM multiple times... until we change configuration for source VM

Let's say we add one more network adapter

Next time we do replication - ReconfigVM() called on destination side for destination VCenter fails with error message : Invalid configuration for device '1'

Did anyone see that problem ?

Thank you.

***********************************************************************

Here is original configuration for source VM

***********************************************************************

<?xml version="1.0" encoding="utf-8" ?>

<VirtualMachineConfigSpec>

  <alternateGuestName />

  <annotation />

<bootOptions>

  <bootDelay>0</bootDelay>

  <enterBIOSSetup>false</enterBIOSSetup>

  </bootOptions>

  <changeVersion>2018-05-22T21:57:45.599698Z</changeVersion>

<cpuAllocation>

  <expandableReservation>false</expandableReservation>

  <limit>-1</limit>

  <reservation>0</reservation>

  </cpuAllocation>

<files>

  <logDirectory>[dc2-west-datastore4] VK_VM_LL_2/</logDirectory>

  <snapshotDirectory>[dc2-west-datastore4] VK_VM_LL_2/</snapshotDirectory>

  <suspendDirectory>[dc2-west-datastore4] VK_VM_LL_2/</suspendDirectory>

  <vmPathName>[dc2-west-datastore4] VK_VM_LL_2/VK_VM_LL_2.vmx</vmPathName>

  </files>

<flags>

  <disableAcceleration>false</disableAcceleration>

  <diskUuidEnabled>false</diskUuidEnabled>

  <enableLogging>true</enableLogging>

  <htSharing>any</htSharing>

  <monitorType>release</monitorType>

  <runWithDebugInfo>false</runWithDebugInfo>

  <snapshotDisabled>false</snapshotDisabled>

  <snapshotLocked>false</snapshotLocked>

  <snapshotPowerOffBehavior>powerOff</snapshotPowerOffBehavior>

  <useToe>false</useToe>

  <virtualExecUsage>hvAuto</virtualExecUsage>

  <virtualMmuUsage>automatic</virtualMmuUsage>

  </flags>

  <guestId>rhel6_64Guest</guestId>

  <locationId>564d2520-c30d-530a-cb46-143f4e00b299</locationId>

<memoryAllocation>

  <expandableReservation>false</expandableReservation>

  <limit>-1</limit>

  <overheadLimit>45</overheadLimit>

  <reservation>0</reservation>

<shares>

  <shares>20480</shares>

  </shares>

  </memoryAllocation>

  <memoryMB>2048</memoryMB>

<VirtualDevices>

<VirtualDevice>

  <key>4000</key>

  <controllerKey>100</controllerKey>

  <unitNumber>7</unitNumber>

  <deviceType>2</deviceType>

  <addressType>assigned</addressType>

  <macAddress>00:50:56:a2:1b:02</macAddress>

  <wakeOnLanEnabled>true</wakeOnLanEnabled>

  <ethType>5</ethType>

<backing>

  <ethBackingType>1</ethBackingType>

  <deviceName>VM Internal</deviceName>

  <useAutoDetect>false</useAutoDetect>

  </backing>

<connectable>

  <allowGuestControl>true</allowGuestControl>

  <connected>true</connected>

  <startConnected>true</startConnected>

  <status>ok</status>

  </connectable>

<deviceInfo>

  <label>Network adapter 1</label>

  <summary>VM Internal</summary>

  </deviceInfo>

  </VirtualDevice>

  </VirtualDevices>

  <name>VK_VM_LL_2</name>

  <npivWorldWideNameType />

  <numCPU>1</numCPU>

<tools>

  <afterPowerOn>true</afterPowerOn>

  <afterResume>true</afterResume>

  <beforeGuestShutdown>true</beforeGuestShutdown>

  <beforeGuestStandby>true</beforeGuestStandby>

  <syncTimeWithHost>false</syncTimeWithHost>

  <toolsUpgradePolicy>manual</toolsUpgradePolicy>

  <toolsVersion>0</toolsVersion>

</tools>

<uuid>4222e019-3615-f170-85a2-1b35060026c4</uuid>

<version>vmx-08</version>

</VirtualMachineConfigSpec>

***********************************************************************

Here is MODIFIED configuration for source VM

***********************************************************************

<?xml version="1.0" encoding="utf-8" ?>

<VirtualMachineConfigSpec>

  <alternateGuestName />

  <annotation />

<bootOptions>

  <bootDelay>0</bootDelay>

  <enterBIOSSetup>false</enterBIOSSetup>

  </bootOptions>

  <changeVersion>2018-05-23T13:37:15.062934Z</changeVersion>

<cpuAllocation>

  <expandableReservation>false</expandableReservation>

  <limit>-1</limit>

  <reservation>0</reservation>

  </cpuAllocation>

<files>

  <logDirectory>[dc2-west-datastore4] VK_VM_LL_2/</logDirectory>

  <snapshotDirectory>[dc2-west-datastore4] VK_VM_LL_2/</snapshotDirectory>

  <suspendDirectory>[dc2-west-datastore4] VK_VM_LL_2/</suspendDirectory>

  <vmPathName>[dc2-west-datastore4] VK_VM_LL_2/VK_VM_LL_2.vmx</vmPathName>

  </files>

<flags>

  <disableAcceleration>false</disableAcceleration>

  <diskUuidEnabled>false</diskUuidEnabled>

  <enableLogging>true</enableLogging>

  <htSharing>any</htSharing>

  <monitorType>release</monitorType>

  <runWithDebugInfo>false</runWithDebugInfo>

  <snapshotDisabled>false</snapshotDisabled>

  <snapshotLocked>false</snapshotLocked>

  <snapshotPowerOffBehavior>powerOff</snapshotPowerOffBehavior>

  <useToe>false</useToe>

  <virtualExecUsage>hvAuto</virtualExecUsage>

  <virtualMmuUsage>automatic</virtualMmuUsage>

  </flags>

  <guestId>rhel6_64Guest</guestId>

  <locationId>564d2520-c30d-530a-cb46-143f4e00b299</locationId>

<memoryAllocation>

  <expandableReservation>false</expandableReservation>

  <limit>-1</limit>

  <overheadLimit>135</overheadLimit>

  <reservation>0</reservation>

<shares>

  <shares>20480</shares>

  </shares>

  </memoryAllocation>

  <memoryMB>2048</memoryMB>

<VirtualDevices>

<VirtualDevice>

  <key>4000</key>

  <controllerKey>100</controllerKey>

  <unitNumber>7</unitNumber>

  <deviceType>2</deviceType>

  <addressType>assigned</addressType>

  <macAddress>00:50:56:a2:1b:02</macAddress>

  <wakeOnLanEnabled>true</wakeOnLanEnabled>

  <ethType>5</ethType>

<backing>

  <ethBackingType>1</ethBackingType>

  <deviceName>VM Internal</deviceName>

  <useAutoDetect>false</useAutoDetect>

  </backing>

<connectable>

  <allowGuestControl>true</allowGuestControl>

  <connected>true</connected>

  <startConnected>true</startConnected>

  <status>ok</status>

  </connectable>

<deviceInfo>

  <label>Network adapter 1</label>

  <summary>VM Internal</summary>

  </deviceInfo>

  </VirtualDevice>

<VirtualDevice>

  <key>4001</key>

  <controllerKey>100</controllerKey>

  <unitNumber>8</unitNumber>

  <deviceType>2</deviceType>

  <addressType>assigned</addressType>

  <macAddress>00:50:56:a2:41:03</macAddress>

  <wakeOnLanEnabled>true</wakeOnLanEnabled>

  <ethType>5</ethType>

<backing>

  <ethBackingType>1</ethBackingType>

  <deviceName>VM Internal</deviceName>

  <useAutoDetect>false</useAutoDetect>

  </backing>

<connectable>

  <allowGuestControl>true</allowGuestControl>

  <connected>true</connected>

  <startConnected>true</startConnected>

  <status>ok</status>

  </connectable>

<deviceInfo>

  <label>Network adapter 2</label>

  <summary>VM Internal</summary>

  </deviceInfo>

  </VirtualDevice>

  </VirtualDevices>

  <name>VK_VM_LL_2</name>

  <npivWorldWideNameType />

  <numCPU>1</numCPU>

<tools>

  <afterPowerOn>true</afterPowerOn>

  <afterResume>true</afterResume>

  <beforeGuestShutdown>true</beforeGuestShutdown>

  <beforeGuestStandby>true</beforeGuestStandby>

  <syncTimeWithHost>false</syncTimeWithHost>

  <toolsUpgradePolicy>manual</toolsUpgradePolicy>

  <toolsVersion>0</toolsVersion>

</tools>

<uuid>4222e019-3615-f170-85a2-1b35060026c4</uuid>

<version>vmx-08</version>

</VirtualMachineConfigSpec>

0 Kudos
0 Replies