Is this a bug in the Hyper-V WMI Provider?


i've been messing hyper-v wmi provider recently.  namely, i've been trying enumerate value of disk on ide controller 0.

this script

 

set objwmiservice2 = getobject("winmgmts:\\.\root\virtualization")
set colvmitems = objwmiservice2.execquery("select * msvm_computersystem")
each vm in colvmitems
    guid = vm.name
    set coldisks = objwmiservice2.execquery("select caption,connection msvm_resourceallocationsettingdata instanceid '%" & guid & "%'")
    each disk in coldisks
        on error resume next
        strconnection = ucase(join(disk.connection,","))
        on error goto 0
        wscript.echo disk.caption & " = " & strconnection
    next
next

 

now, works enough.  correctly return path of vhd on ide controller 0 (in our case, system drive).  however, if mount iso on ide controller 1 value of ide controller 0 returns path iso , not path vhd.

is bug or there design reason it?

anyone got ideas?


Windows Server  >  Hyper-V



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file