Moving Virtual Machine Back From Distributed Virtual Switch

After blogging about moving virtual machines from a standard virtual switch to a distributed virtual switch, I saw a new question in VI Java API forum on how to roll it back. Technically, I don’t see any reason why one should switch back because using distributed virtual switch gives you a lot of benefits. But the decision is not mine but yours. Whatever you want to do, we help do it easily.

The method involved is still the ReconfigVM_Task() defined with VirtualMachine managed object. The difference comes with the parameter, mainly the backing. When it comes to Web Service API, it’s better to show either code or SOAP message. To me, SOAP message is even better because you can reference it even using toolkit like PowerCLI.

Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.

The following is recorded with Onyx. Based on this SOAP request, I think you can easily write code to achieve the same.

<soap:Envelope xmlns:xsd="" xmlns:xsi="" xmlns:soap="">
    <ReconfigVM_Task xmlns="urn:internalvim25">
      <_this xsi:type="ManagedObjectReference" type="VirtualMachine" serverGuid="BA9CE658-75F7-4A99-ACE6-99EB1376B94A">vm-344</_this>
          <device xsi:type="VirtualE1000">
              <label>Network adapter 4</label>
            <backing xsi:type="VirtualEthernetCardNetworkBackingInfo">
              <deviceName>VM Network</deviceName>

This entry was posted in vSphere API and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


  1. Prateek
    Posted June 29, 2011 at 7:05 pm | Permalink

    Hi am trying to use a as a reference to deploy an OVF on my host i.e. ESX 5.0. I am using VIM25 SDK. I am facing this error
    “Server returned HTTP response code: 500 for URL:” This is a I/O exception, Before firing this exception a VM without an Operating system is deployed on host. Could any one tell me what might be the problem.

  2. Posted June 29, 2011 at 9:21 pm | Permalink

    Hi Prateek,

    Where did you get the Java code/sample? Thanks!


  3. amogh
    Posted January 14, 2013 at 11:44 pm | Permalink

    how to get cluster data for eg name,uuid from vcenter?

  4. amogh
    Posted January 14, 2013 at 11:52 pm | Permalink

    i am using vijava.. new to this tool,plz help me

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.