Fetch KVP of VM running on another node
hello,
i having 2 node cluster running windows 2008 r2 - hyper-v enabled. (node1, node2)
now, when try fetching kvp of vm running on node2 node1 blank response using below code, when try fetch kvp of vm running on node1 correct results. why behavior or code needs changed ?
please help.
filter import-cimxml{ $cimxml = [xml]$_ $cimobj = new-object -typename system.object foreach ($cimproperty in cimxml.selectnodes("/instance/property")){ $cimobj | add-member -membertype noteproperty -name $cimproperty.name -value $cimproperty.value } $cimobj } $vm = get-wmiobject -computername node2 -namespace root\virtualization -query "select * msvm_computersystem name='98238abc-b7ed-499a-a8be-4e7f32dd3284'" $kvp = get-wmiobject -computername node2 -namespace root\virtualization -query "associators of {$vm} assocclass=msvm_systemdevice resultclass=msvm_kvpexchangecomponent" $guestkvp = get-wmiobject -computername node2-namespace root\virtualization -query "associators of {$kvp} assocclass=msvm_elementsettingdata resultclass=msvm_kvpexchangecomponentsettingdata" $guestkvp.hostexchangeitems | import-cimxml
thanks.
hello. have solved issue. not setting computername correctly while adding new kvp vm. during fetching getting no data. thanks.
Windows Server > Hyper-V
Comments
Post a Comment