Hi all, I search the all examples from Java and C# about this function usage. However, I always get the exception "The object 'vim.vm.guest.ProcessManager:guestOperationsProcessMa...
See more...
Hi all, I search the all examples from Java and C# about this function usage. However, I always get the exception "The object 'vim.vm.guest.ProcessManager:guestOperationsProcessManager' has already been deleted or has not been completely created" VMware.Vim.VimException. Could someone help it? NameValueCollection nvcFilter = new NameValueCollection(); nvcFilter.Add("Name", "W81x64"); _vm = (VirtualMachine)_client.FindEntityView(typeof(VirtualMachine), null, nvcFilter, null); while (true) { _vm.UpdateViewData(); if (_vm.Guest.ToolsStatus == VirtualMachineToolsStatus.toolsOk) { break; } Thread.Sleep(3000); } NamePasswordAuthentication auth = new NamePasswordAuthentication(); auth.Password = "admin"; auth.Username = "password"; auth.InteractiveSession = false; ManagedObjectReference vmRef = new ManagedObjectReference (); vmRef.Type = "VirtualMachine"; vmRef.Value = "W81x64"; GuestWindowsProgramSpec progSpec = new GuestWindowsProgramSpec(); progSpec.Arguments = ""; progSpec.ProgramPath = @"C:\Windows\system32\calc.exe"; ManagedObjectReference moRf= new ManagedObjectReference(); moRf.Type = "GuestProcessManager"; moRf.Value = "guestOperationsProcessManager"; GuestProcessManager guestprogmgr = new GuestProcessManager(VimClient,moRf); long pid = guestprogmgr.StartProgramInGuest(vmRef, auth, progSpec);