stripeyfish's Posts

Have just had to do this and after a lot of digging and coming across your 0 reply post! Firstly I automated the set up a vSwitch with vmkernel portgroups each with single bound physical adapt... See more...
Have just had to do this and after a lot of digging and coming across your 0 reply post! Firstly I automated the set up a vSwitch with vmkernel portgroups each with single bound physical adapter. Then enabled s.w iSCSI using UpdateSoftwareInternetScsiEnabled API Once enabled, for my environment I set up iSCSI IQN required, and add targets I then use QueryCandiateNics to look through devices I can use for binding. Up to you to filter through the list an return only the ones that comply as far as I can see. It returns iSCSIPortInfo list. From this list, extract the ones that comply - I just looked at portgroupname I know I have set up. Then call BindVnic passing in the adapter name (e.g. vmhba41) and the iSCSIPortInfo.vnicDevice et voila... my NICs were bound as if I had done it through the UI
Thanks again for pointing me in right direction... all sorted! :smileygrin: All done in C# I connect direct to the new host using System.Net.WebClient and download the default SSL cert from hos... See more...
Thanks again for pointing me in right direction... all sorted! :smileygrin: All done in C# I connect direct to the new host using System.Net.WebClient and download the default SSL cert from host/ssl_cert Then read file into byte stream and process using System.Security.Cryptography.X509Certificates.X509Certtifcate2 to get at the thumbprint. Finally split up into pairs with : in between (took me a few moments of wondering why still not working until looked up HostConnectSpec!) Then host added.. at last!!!
Thanks - had been wondering about how to get the thumbprint from the self signed certs on the new hosts. Will give that a try. Might try to extract from the fault first but already have code to u... See more...
Thanks - had been wondering about how to get the thumbprint from the self signed certs on the new hosts. Will give that a try. Might try to extract from the fault first but already have code to upload new certs once certificate server built so should be able to cobble something this way too. Am in a chicken and egg scenario as building lots of environments, the cert server gets built within each new environment. Once its built I use it to gen the certs and replace the default ones. But obviously whilst building up each environment from ground up the cert server not built yet. Cheers for speedy reply
I have some WebServices C# code that used to switch off the vCenter Server advanced setting client.VerifySLLCertificates (set to false) then use the .AddStandaloneHost_Task to add a host. This wa... See more...
I have some WebServices C# code that used to switch off the vCenter Server advanced setting client.VerifySLLCertificates (set to false) then use the .AddStandaloneHost_Task to add a host. This was against vSphere4 and worked no problem. Now trying to do the same thing with 5.1, except that due to SSO, client.VerifySLLCertificates is set to true and greyed out. Using UpdateOptions to try to set this to false fails. Trying to add a host using .AddStandaloneHost_Task fails with SSLVerifyFault. So how do I add a host now!? I dont want to go through replacing certificates at the point of setting up the infrastructure. The PowerCLI equivilent command seems to have a force flag but need to get this done in in C# WebServices. Basically need code equivalent of ticking the checkbox in the GUI when adding a host to say you verify the thumbprint. All pointers gratefully received! SF.
Check out this blog post... could be your answer.
Uploaded a new version that now supports vCenter 5.1. Now you can export and import your custom alarms between vCenters and also between vCenter versions with just a few mouse clicks. Jump st... See more...
Uploaded a new version that now supports vCenter 5.1. Now you can export and import your custom alarms between vCenters and also between vCenter versions with just a few mouse clicks. Jump straight to download page to try it out. There is a comprehensive user guide on the page as well which gives you full run down on the utility. Hope you find it useful. Post or link to my blog if you do and as before all feedback, suggestions, issues greatly received :smileygrin:
I don't think licensing has got anything to do with what you can do to host via the API. If an API supports direct action on a host then that's all you need. I use sdk to connect direct to hosts ... See more...
I don't think licensing has got anything to do with what you can do to host via the API. If an API supports direct action on a host then that's all you need. I use sdk to connect direct to hosts to set name, welcome message, ip adress, DNS etc. do need to check licence has not run out though. Apologies if not understanding the question.
I have found that sometimes it is better if you get VirtualMachineConfigSpec from existing machine and update it as opposed to creating a new VirtualMachineConfigSpec with just the changes you ne... See more...
I have found that sometimes it is better if you get VirtualMachineConfigSpec from existing machine and update it as opposed to creating a new VirtualMachineConfigSpec with just the changes you need set. I.e. get configspec from your first VM, update the MAC, then use this to reconfigure the new VM; or maybe just get VirtualDeviceConfigSpec part from current VM, update the MAC bit, set this in the new VirtualMachineConfigSpec and reconfigure the new VM. There is usually one bit you have forgotten to set that is required which means the change you are trying to make just wont apply
When using CreateVM_Task against vCenter connection I always leave the host parameter null so vCenter places itself. Odd that the code works against host directly - means you most likely have yo... See more...
When using CreateVM_Task against vCenter connection I always leave the host parameter null so vCenter places itself. Odd that the code works against host directly - means you most likely have your config spec correct. datastore path name syntax is: "[" + datastoreName + "]/" + vm.name + "/" + vm.name + ".vmx"
the licence manager can be accessed via the API. I use SDK to add licences and assign to hosts and vcenter for automation of new green field sites. If you open the API ref guide and search for li... See more...
the licence manager can be accessed via the API. I use SDK to add licences and assign to hosts and vcenter for automation of new green field sites. If you open the API ref guide and search for licence under properties that will give you an idea of all the things you can do with licensing via the api.
If you want to get a list of descriptions for all alarms currently defined, then you first need to get a reference to the AlarmManager from the ServiceContent obtained from your connection to vCe... See more...
If you want to get a list of descriptions for all alarms currently defined, then you first need to get a reference to the AlarmManager from the ServiceContent obtained from your connection to vCenter. The use GetAlarm on the AlarmManager to get an array of ManagedObject IDs for all the alarms. Then loop through this list of mObj, to obtain the AlarmInfo (using info) using a property collector function. Info.Description will be the description for each alarm. What are you trying to do with Alarms? If its import and export I have that covered - see link below Stripey
Once you have a list of mObj for the Alarms, then retrieve AlarmInfo from the mObj for each Alarm using 'info' property. AlarmInfo inherits the 'description' property from AlarmSpec. I can di... See more...
Once you have a list of mObj for the Alarms, then retrieve AlarmInfo from the mObj for each Alarm using 'info' property. AlarmInfo inherits the 'description' property from AlarmSpec. I can dig out some code if you like Stripey
Finding an easier way of managing alarms within vCenter has been bugging me for a while. I know there are the following VMware KBs to help: Restoring the default vCenter Server alarms Restoring... See more...
Finding an easier way of managing alarms within vCenter has been bugging me for a while. I know there are the following VMware KBs to help: Restoring the default vCenter Server alarms Restoring and copying vCenter Server alarms But these didnt really help provide something that was easy to use and backup / restore / return alarms to cutomised set. I also didnt want to get in to PowerShell and wanted something that could just be a standard Windows UI driven process. There have been several posts in the past and when vSphere 5 came out I expected this to be addressed out of the box but not to be! Anyway to cut to the chase have been brushing up on my C# skills and getting familiar with the Web Services SDK, serialisation and other things and have managed to put together something that thought I would share on the community forums. Also as a technical exercise and to learn a bit about WordPress, have started a blog to host it :smileygrin: If you would like to be my guinea pigs please have a peruse of the User Guide I have put together for the application. The WordPress hosted blog has links to download the installer if you want to give it a whirl. All comments / feedback / bug reports(!) greatly received. SF