sahmed24's Posts

ok, i see that VIX API works for Linux. i am writing code in C#, will the same code work for Linux? and what about vsphere webservices sdk, will it manage linux machiens?
thanks lamw does the vSphere webservices capable of managing linux machines and VIX API capable of running guest operations inside linux machines? //Rizwan
thanks, but i am using vSphere Web Services SDK, because i need to control more than just automating one machine. I am not using VIX API.
Hi Does vSphere Web Service SDK works with linux machines. Can start/stop/copy data in to / copy data from/ run programs etc on Linux machines from vSphere Web SDK? //Rizwan
thanks for the answer. i am going to run ESX not ESXi. This should not limit functionality on SDK either, right? //Rizwan
Hi i am wondering if i can use the vShpere web services SDK if i have vSphere Essential License? if yes, then do i have all the functionality available or there are some limitation in SDK with... See more...
Hi i am wondering if i can use the vShpere web services SDK if i have vSphere Essential License? if yes, then do i have all the functionality available or there are some limitation in SDK with the license type? //Rizwan
Hi i am having this issue, when i delete vApp from my C# code, the program flow just moves ahead. i want it to wait until the deletion process is finished. how can i do that. //Rizwan
ok, i found the issue, it was kind of stupid of me. i missed this line. mInfo.limitSpecified = true;
Hi i am trying to create a resource pool in C#. Below is the code. 'crmor' is the MOB to computer resource. i get exception saying specified parameter is incorrect. i dont know how to fix it. ... See more...
Hi i am trying to create a resource pool in C#. Below is the code. 'crmor' is the MOB to computer resource. i get exception saying specified parameter is incorrect. i dont know how to fix it. ManagedObjectReference resourcePool = _connectVCenter.Cb.getServiceUtil().GetMoRefProp(crmor, "resourcePool"); SharesInfo sInfo = new SharesInfo(); sInfo.level = SharesLevel.normal; sInfo.shares = 0; ResourceAllocationInfo cInfo = new ResourceAllocationInfo(); cInfo.limit = -1; cInfo.shares = sInfo; cInfo.limitSpecified = true; cInfo.reservation = 0; cInfo.reservationSpecified = true; cInfo.expandableReservation = true; cInfo.expandableReservationSpecified = true; ResourceAllocationInfo mInfo = new ResourceAllocationInfo(); mInfo.limit = -1; mInfo.shares = sInfo; mInfo.reservation = 0; mInfo.reservationSpecified = true; mInfo.expandableReservation = true; mInfo.expandableReservationSpecified = true; ResourceConfigSpec resourceSpec = new ResourceConfigSpec(); resourceSpec.cpuAllocation = cInfo; resourceSpec.memoryAllocation = mInfo; ManagedObjectReference newPool = _service.CreateResourcePool(resourcePool, "NewPooool", resourceSpec); A first chance exception of type 'System.Web.Services.Protocols.SoapException' occurred in System.Web.Services.dll System.Web.Services.Protocols.SoapException: A specified parameter was not correct. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Vim25Api.VimService.CreateResourcePool(ManagedObjectReference _this, String name, ResourceConfigSpec spec) at Cryptzone.Automation.vCenter.VMCloneManager.CreateResourcePool(Dictionary`2 options) in C:\Automation\ConsoleApplication1\Cryptzone.Automation.vCenter\VMCloneManager.cs:line 124
Hi i am unable to get managed object reference to a resource pool. If i do the code below i get the reference to a resource pool (i dont know which resource pool is that one) Ma... See more...
Hi i am unable to get managed object reference to a resource pool. If i do the code below i get the reference to a resource pool (i dont know which resource pool is that one) ManagedObjectReference resourcePool = _connectVCenter.Cb.getServiceUtil().GetMoRefProp(crmor, "resourcePool"); where cmor is MOB to computer resource. So how can i get the MOB to a resource pool inside host.
how do i run the VMs behind the NAT pool. can you please explain more. yes, i know lab manager has fencing that can do it, but i am not interested in lab manager. i need to use vApp of vCente... See more...
how do i run the VMs behind the NAT pool. can you please explain more. yes, i know lab manager has fencing that can do it, but i am not interested in lab manager. i need to use vApp of vCenter Server.
Hi consider this scenario. i have a testing environment in the form of vApp, that consists of two virtual machines, with static IPs. I want to run parallel tests. so i make clone of these ma... See more...
Hi consider this scenario. i have a testing environment in the form of vApp, that consists of two virtual machines, with static IPs. I want to run parallel tests. so i make clone of these machiens, and start all in parallel. or in inshort multiple instances of same vApp are running. is there a way to avoid ip conflicts, i..e somehow make vApp run with in boundaries so it doesnt interfere with outside world. basically avoid ip conflicts //Rizwan
thanks lamw //Rizwan
ok, i have found the way. i succeeded in creating the linked clone from the snapshot. though it failed when i did it from the current state.
ok, i have the answer now. the size and the time, is comparable to what it was in vmware workstation, i.e. few kilobytes, and couple of seconds (even less). i failed in creating linked clon... See more...
ok, i have the answer now. the size and the time, is comparable to what it was in vmware workstation, i.e. few kilobytes, and couple of seconds (even less). i failed in creating linked clone from the current state of the machine, but i succeeded in creating linked clone from the snapshot. thats what i changed from the code in my previous post relocSpec.diskMoveType = "createNewChildDiskBacking"; //VMSnapshot.VMSnapshot snapshot = new VMSnapshot.VMSnapshot(); ManagedObjectReference ssRef = getSnapshotReference(vmRef, "WinXP", "snapshot_name"); cloneSpec.snapshot = ssRef;
Hi how can i create 'linked clone' of vApp from vSphere web services SDK? //Rizwan
i have read the document that you have mentioned. i have read almost everything related to creating linked clone in vSphere. the problem i have is that i can not find VirtualMachineRelocateDiskMo... See more...
i have read the document that you have mentioned. i have read almost everything related to creating linked clone in vSphere. the problem i have is that i can not find VirtualMachineRelocateDiskMoveOptions enumeration in my vimApi (Vim25Services2005.dll), VirtualMachineRelocateDiskMoveOptions. createNewChildDiskBacking is a string value, so i used that string value directly and assigned it to the diskMoveType (all that has been showed in my previous reply). post related to linked clone I had two questions on my previous reply, both are open, can you look at them?
i have found out the backing options, i dont understand how to compare the parent of clone to the original image. there is 'parent' property in backing object. this is how i get the backing obje... See more...
i have found out the backing options, i dont understand how to compare the parent of clone to the original image. there is 'parent' property in backing object. this is how i get the backing object. VirtualMachineConfigInfo configInfoParent = cb.getServiceUtil().GetDynamicProperty(vmRef, "config") as VirtualMachineConfigInfo; VirtualDevice vDeviceParent = configInfoParent.hardware.device[9] as VirtualDevice; VirtualDiskFlatVer2BackingInfo backingInfoParent = vDeviceParent.backing as VirtualDiskFlatVer2BackingInfo; VirtualMachineConfigInfo configInfoClone = cb.getServiceUtil().GetDynamicProperty(vmRef, "config") as VirtualMachineConfigInfo; VirtualDevice vDeviceClone = configInfoClone.hardware.device[9] as VirtualDevice; VirtualDiskFlatVer2BackingInfo backingInfoClone = vDeviceClone.backing as VirtualDiskFlatVer2BackingInfo; - Regarding Size of my linked clone, my linked clone is of 2GB and it took 11 minutes, i dont remember changing setting of ESXi. this is how i create linked clone ManagedObjectReference vmRef = service.FindByInventoryPath(sic.searchIndex, vmPath); VirtualMachineCloneSpec cloneSpec = new VirtualMachineCloneSpec(); VirtualMachineRelocateSpec relocSpec = new VirtualMachineRelocateSpec(); relocSpec.diskMoveType = "moveChildMostDiskBacking"; cloneSpec.location = relocSpec; cloneSpec.powerOn = false; cloneSpec.template = false; ManagedObjectReference cloneTask = service.CloneVMTask(vmRef, vmFolderRef, clonedName, cloneSpec); . Am i creating the linked clone in correct way? //Rizwan
i read the post, it says "Since it's base disk is backed by the parent VM in which the Linked Clone was created from, you could look at it's VirtualDisk device and check to see if it's parent... See more...
i read the post, it says "Since it's base disk is backed by the parent VM in which the Linked Clone was created from, you could look at it's VirtualDisk device and check to see if it's parent is set, if so it'll point back to the main VM's VirtualDiskFlatVer2BackingInfo in which the LC was cloned from. " i dont know how to get VirtualDisk device of a virtual machine, and read VirtualDiskFlatVer2BackingInfo. all i have is the ManagedObjectReference to the the original virtual machine and the cloned virtual machine. secondly can you tell me what is usually the size of linnked clone, i know vmware workstation it could be below 1MB.
hi if i create two clones, one is full and other is linked, how can i identify which one is linked and which one is full. is there a property/type that tells that whether it is linked or full.... See more...
hi if i create two clones, one is full and other is linked, how can i identify which one is linked and which one is full. is there a property/type that tells that whether it is linked or full. i dont know how to find this either programatically or manually (from Vsphere client) //Rizwan