VMware {code} Community
Peconi
Contributor
Contributor

Help with ReconfigVm_Task changing Network Label....

Hi all,

I'm tring to change a Network Label on for my VM using the SOAP interface...

From what I found on the forum here, I seem to need <backing>, however, when I query my VM's hardware, the Network Adapter does not have ANYTHING under Backing Info ... We're using some Cisco switches to manage this, but no backing is available...

The only thing I have under <deviceInfo><summary> is string: vm.device.VirtualE1000.DistributedVirtualPortBackingInfo.summary

When I query the VM properties - under <network> I get: dvportgroup

I tried a simple <deviceChange> request with just <key> and <backing>dvportgroup-953</backing> but it didn't work.

Below is a full request with everything I can scavange on this network adapter...

The request goes THROUGH! - it returns SUCCESS, however nothing canges.

<ReconfigVM_Task xmlns="urn:vim25">
    <_this type="VirtualMachine">vm-1012</_this>
    <spec>
        <deviceChange>
            <device>
                <key>4000</key>
                <deviceInfo>
                    <label>Network adapter 2</label>
                    <summary>vm.device.VirtualE1000.DistributedVirtualPortBackingInfo.summary</summary>
                </deviceInfo>
                <backing>
                    <deviceName>dvportgroup-953</deviceName>
                    <network>dvportgroup-953</network>
                </backing>
                <connectable>
                    <startConnected>true</startConnected>
                    <allowGuestControl>true</allowGuestControl>
                    <connected>true</connected>
                </connectable>
                <controlKey>100</controlKey>
                <unitNumber>7</unitNumber>
                <addressType>assigned</addressType>
                <macAddress>00:50:56:a7:16:da</macAddress>
                <wakeOnLanEnabled>true</wakeOnLanEnabled>
            </device>
            <operation>edit</operation>
        </deviceChange>
    </spec>
</ReconfigVM_Task>

Someone please shine some light on this matter!!! I'm just lost with this at the moment and none of the post on this forum (and yea, I've read them all) seemed to help....

THANKS IN ADVANCE!

0 Kudos
1 Reply
admin
Immortal
Immortal

Though I am not sure, but it seems that the is not correctly passed. deviceName should be of type string which is the name of the network.

deviceInfo.summary property holds the name of the existing network associated with the VM.

0 Kudos