Yeah, if we see from requirement view.. we can do that in a single query. Apart of it, if I am correct then there is only one XML API available to instantiate profiles from template.
1<lsInstantiateNTemplate dn="" cookie="" inTargetOrg=""
2inServerNamePrefixOrEmpty="" inNumberOf="" inHierarchical="no">
3</lsInstantiateNTemplate>
If you make use of the Cisco UCS powertool 0.9.6.0, then the in-built Ucs Cmdlets will take care of forming and sending the xml query for you.
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba | Get-UcsVhbaInterface | select Dn,Initiator,Vnet
Dn Initiator Vnet
-- --------- ----
org-root/ls-sp11/fc-hba1/if-default 20:00:00:25:B5:AA:AA:AA 1
org-root/ls-test/fc-vhba2/if-default 20:00:00:25:B5DDD 2
The -xml option gives us more details about the internal functioning of the cmdlet.
It shows us the query that was generated and sent when we executed the cmdlet and the response we received.
PS C:\> Get-UcsServiceProfile -type instance -xml
==>bgl-samc17:<configResolveClass classId="lsServer" cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" inHierarchical="false"><inFilter><and><e
q class="lsServer" property="type" value="instance" /><wcard class="lsServer" property="dn" value="^org-root/" /></and></inFilter></configResolveClass
>
<==bgl-samc17: <configResolveClass cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" response="yes" classId="lsServer"> <outConfigs> <lsServer
agentPolicyName="" assignState="unassigned" assocState="unassociated" biosProfileName="" bootPolicyName="" configQualifier="" configState="not-appli
ed" descr="" dn="org-root/ls-sp11" dynamicConPolicyName="" extIPState="none" fltAggr="1" fsmDescr="" fsmFlags="" fsmPrev="ConfigureSuccess" fsmProgr="
100" fsmRmtInvErrCode="none" fsmRmtInvErrDescr="" fsmRmtInvRslt="" fsmStageDescr="" fsmStamp="2012-02-06T05:46:13.595" fsmStatus="nop" fsmTry="0" host
FwPolicyName="" identPoolName="" intId="186797" localDiskPolicyName="" maintPolicyName="" mgmtAccessPolicyName="" mgmtFwPolicyName="" name="sp11" oper
BiosProfileName="" operBootPolicyName="org-root/boot-policy-default" operDynamicConPolicyName="" operHostFwPolicyName="" operIdentPoolName="org-root/u
uid-pool-default" operLocalDiskPolicyName="org-root/local-disk-config-default" operMaintPolicyName="org-root/maint-default" operMgmtAccessPolicyName="
" operMgmtFwPolicyName="" operPowerPolicyName="org-root/power-policy-default" operScrubPolicyName="org-root/scrub-default" operSolPolicyName="" operSr
cTemplName="" operState="unassociated" operStatsPolicyName="org-root/thr-policy-default" operVconProfileName="" owner="management" pnDn="" powerPolicy
Name="default" scrubPolicyName="" solPolicyName="" srcTemplName="" statsPolicyName="default" type="instance" usrLbl="" uuid="derived" uuidSuffix="00
00-000000000000" vconProfileName=""/> <lsServer agentPolicyName="" assignState="unassigned" assocState="unassociated" biosProfileName="" bootPolicyNa
me="" configQualifier="insufficient-resources,mac-address-assignment" configState="failed-to-apply" descr="" dn="org-root/ls-test" dynamicConPolicyNa
me="" extIPState="none" fltAggr="4294967299" fsmDescr="Configuring Service Profile test(FSM:sam:dme:LsServerConfigure)" fsmFlags="sam:dme:LsServerConf
igure:modification" fsmPrev="ConfigureApplyIdentifiers" fsmProgr="45" fsmRmtInvErrCode="none" fsmRmtInvErrDescr="" fsmRmtInvRslt="" fsmStageDescr="Res
olving and applying identifiers(FSM-STAGE:sam:dme:LsServerConfigure:ApplyIdentifiers)" fsmStamp="2012-02-06T10:10:29.915" fsmStatus="ConfigureApplyIde
ntifiers" fsmTry="1" hostFwPolicyName="" identPoolName="" intId="186914" localDiskPolicyName="default" maintPolicyName="" mgmtAccessPolicyName="" mgmt
FwPolicyName="" name="test" operBiosProfileName="" operBootPolicyName="org-root/boot-policy-default" operDynamicConPolicyName="" operHostFwPolicyName=
"" operIdentPoolName="org-root/uuid-pool-default" operLocalDiskPolicyName="org-root/local-disk-config-default" operMaintPolicyName="org-root/maint-def
ault" operMgmtAccessPolicyName="" operMgmtFwPolicyName="" operPowerPolicyName="org-root/power-policy-default" operScrubPolicyName="org-root/scrub-defa
ult" operSolPolicyName="" operSrcTemplName="" operState="config-failure" operStatsPolicyName="org-root/thr-policy-default" operVconProfileName="" owne
r="management" pnDn="" powerPolicyName="default" scrubPolicyName="" solPolicyName="default" srcTemplName="" statsPolicyName="default" type="instance
" usrLbl="" uuid="12340000-0000-0000-0000-000000000000" uuidSuffix="0000-000000000000" vconProfileName=""/> </outConfigs> </configResolveClass>
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba -xml
==>bgl-samc17:<configResolveClass classId="vnicFc" cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" inHierarchical="false"><inFilter><or><wcar
d class="vnicFc" property="dn" value="^org-root/ls-sp11/" /><wcard class="vnicFc" property="dn" value="^org-root/ls-test/" /></or></inFilter></configR
esolveClass>
<==bgl-samc17: <configResolveClass cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" response="yes" classId="vnicFc"> <outConfigs> <vnicFc ada
ptorProfileName="" addr="20:00:00:25:B5:AA:AA:AA" adminVcon="any" bootDev="disabled" configQualifier="" configState="not-applied" dn="org-root/ls-sp1
1/fc-hba1" equipmentDn="" fltAggr="0" identPoolName="" instType="manual" maxDataFieldSize="2048" name="hba1" nodeAddr="20:00:00:25:B5:BB:BB:BB" nwTemp
lName="" operAdaptorProfileName="org-root/fc-profile-default" operIdentPoolName="org-root/wwn-pool-default" operNwTemplName="" operOrder="1" operPinTo
GroupName="" operQosPolicyName="" operSpeed="line-rate" operStatsPolicyName="org-root/thr-policy-default" operVcon="any" order="1" owner="logical" per
sBind="disabled" persBindClear="no" pinToGroupName="" qosPolicyName="" statsPolicyName="default" switchId="A" type="fc"/> <vnicFc adaptorProfileNam
e="" addr="20:00:00:25:B5DDD" adminVcon="any" bootDev="disabled" configQualifier="" configState="not-applied" dn="org-root/ls-test/fc-vhba2" eq
uipmentDn="" fltAggr="0" identPoolName="" instType="manual" maxDataFieldSize="2048" name="vhba2" nodeAddr="20:00:00:25:B5:CC:CC:CC" nwTemplName="" ope
rAdaptorProfileName="org-root/fc-profile-default" operIdentPoolName="org-root/wwn-pool-default" operNwTemplName="" operOrder="unspecified" operPinToGr
oupName="" operQosPolicyName="" operSpeed="line-rate" operStatsPolicyName="org-root/thr-policy-default" operVcon="any" order="1" owner="logical" persB
ind="disabled" persBindClear="no" pinToGroupName="" qosPolicyName="" statsPolicyName="default" switchId="A" type="fc"/> </outConfigs> </configResolv
eClass>
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba | Get-UcsVhbaInterface -xml
==>bgl-samc17:<configResolveClass classId="vnicFcIf" cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" inHierarchical="false"><inFilter><or><wc
ard class="vnicFcIf" property="dn" value="^org-root/ls-sp11/fc-hba1/" /><wcard class="vnicFcIf" property="dn" value="^org-root/ls-test/fc-vhba2/" /></
or></inFilter></configResolveClass>
<==bgl-samc17: <configResolveClass cookie="1328522891/149f3955-d9f4-460f-bac1-c6458fd9379c" response="yes" classId="vnicFcIf"> <outConfigs> <vnicFcIf
dn="org-root/ls-sp11/fc-hba1/if-default" initiator="20:00:00:25:B5:AA:AA:AA" name="default" operState="indeterminate" operVnetDn="fabric/san/net-def
ault" operVnetName="default" owner="logical" switchId="A" type="fc" vnet="1"/> <vnicFcIf dn="org-root/ls-test/fc-vhba2/if-default" initiator="20:0
0:00:25:B5DDD" name="vsan2" operState="indeterminate" operVnetDn="fabric/san/net-vsan2" operVnetName="vsan2" owner="logical" switchId="A" type
="fc" vnet="2"/> </outConfigs> </configResolveClass>
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba | Get-UcsVhbaInterface | select Dn,Initiator,Vnet
Dn Initiator Vnet
-- --------- ----
org-root/ls-sp11/fc-hba1/if-default 20:00:00:25:B5:AA:AA:AA 1
org-root/ls-test/fc-vhba2/if-default 20:00:00:25:B5DDD 2
You can download the lastest version of Cisco UCS PowerTool 0.9.6.0 and Getting Started guide from
http://developer.cisco.com/web/unifiedcomputing/microsoft
Thanks,
Vijay Vikrant Balyan
I do not have any issues generating the required XML I am just wondering what would be the best approach. Furthermore I don't think those cmdlets will run very well on my linux management station.
Yeah, if we see from requirement view.. we can do that in a single query. Apart of it, if I am correct then there is only one XML API available to instantiate profiles from template.
1<lsInstantiateNTemplate dn="" cookie="" inTargetOrg=""
2inServerNamePrefixOrEmpty="" inNumberOf="" inHierarchical="no">
3</lsInstantiateNTemplate>
Hi Eelco, rather than generate zones based on deployed server profiles you could pre-generate the MDS zone configuration based on the WWNN and WWPN pools configured for your service profiles.EELCO NIEUWSTAD:Because I find it very boring (and I am lazy) to create aliases and zones for all HBA's of my server profiles in my MDS switch I would like to write a script to do it for me.
Luke Poskitt:rather than generate zones based on deployed server profiles you could pre-generate the MDS zone configuration based on the WWNN and WWPN pools configured for your service profiles.EELCO NIEUWSTAD:Because I find it very boring (and I am lazy) to create aliases and zones for all HBA's of my server profiles in my MDS switch I would like to write a script to do it for me.
This. Because we can create and assign the boot luns ahead of time, I can create boot luns and install OS's for servers I don't actually have yet. For example, if I've got 8 blades but I know the environment is going to grow to 32. I can generate all 32 service profiles, create boot luns and then swap service profiles doing full installations on each LUN.
When I'm done, I switch back to the 8 I want to use now and when the new blades arrive, I can assign them where needed and the OS is ready to go. You could even pre-assign the service profiles to chassis / blade locations ahead of time and they'll just pop into the right place when the gear arrives.
Subject: RE: best way to query WWPN of all HBA
Replied by: Sage Harvey on 07-06-2013 08:49:10 AM
RE: best way to query WWPN of all HBA
Subject: RE: best way to query WWPN of all HBA
Replied by: Sage Harvey on 07-06-2013 08:51:32 AMLuke Poskitt:This. Because we can create and assign the boot luns ahead of time, I can create boot luns and install OS's for servers I don't actually have yet. For example, if I've got 8 blades but I know the environment is going to grow to 32. I can generate all 32 service profiles, create boot luns and then swap service profiles doing full installations on each LUN.Hi Eelco, rather than generate zones based on deployed server profiles you could pre-generate the MDS zone configuration based on the WWNN and WWPN pools configured for your service profiles.EELCO NIEUWSTAD:Because I find it very boring (and I am lazy) to create aliases and zones for all HBA's of my server profiles in my MDS switch I would like to write a script to do it for me.
When I'm done, I switch back to the 8 I want to use now and when the new blades arrive, I can assign them where needed and the OS is ready to go. You could even pre-assign the service profiles to chassis / blade locations ahead of time and they'll just pop into the right place when the gear arrives.
Sage
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:
This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community