I would like to ask how to create a directory on the guest VM by using GuestFileManager?Could someone provide example code? Because I always get exception when I call MakeDirectoryInGuest().Many thanks.
_service = _client.Connect(_hostName);
NameValueCollection nvcFilter = new NameValueCollection();
nvcFilter.Add("Name", "W81x64");
_vm = (VirtualMachine)_client.FindEntityView(typeof(VirtualMachine), null, nvcFilter, null);
string DirectoryPath = @"C:\TestFolder\";
NamePasswordAuthentication auth = new NamePasswordAuthentication();
auth.Password = "admin";
auth.Username = "password";
auth.InteractiveSession = false;
GuestFileManager guestfilemgr = new GuestFileManager(VimClient, _service.FileManager);
guestfilemgr.MakeDirectoryInGuest(_vm.Runtime.Host,auth, DirectoryPath, true);
The wrong place is
Then,it's work.