Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

delete Vapp, "No access to entity"

$
0
0

i'm trying to delete a Vapp and am getting the error "No Access to Entity" on the line that says vapp.Undeploy

 

what does this error mean and how can i correctly turn delete a running vapp?

 

 

        public static void DeleteVapp(App app, VApp vApp)
        {
            try
            {
                VCloudAPI.Login(app);
                ReferenceType vappRef = vdc.GetVappRefByName(vApp.VCloud_VappName);
                Vapp vapp = Vapp.GetVappByReference(client, vappRef);
                vapp.Undeploy(UndeployPowerActionType.FORCE).WaitForTask(0);
                //refresh after last task
                vapp = Vapp.GetVappByReference(client, vapp.Reference);
                vapp.Delete().WaitForTask(0);
            }
            catch (Exception e)
            {
                Logger.Log(TraceLevel.Critical, e.Message);
            }
        }

Viewing all articles
Browse latest Browse all 2039

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>