name not showing when using getvmmemory

Feb 3, 2009 at 8:45 PM

When I issue get-vm, I get this:
Host                      VMElementName             State        Up-Time (mS) Owner
--------                  -------------             -----        ------------ -----
VALACAR                   TARONDOR                  Running      263138539    VALACAR\Administrator
VALACAR                   NARMACIL                  Running      263128618    VALACAR\Administrator
VALACAR                   MINARDIL                  Running      263125950    VALACAR\Administrator
VALACAR                   TELEMNAR                  Running      263098447    VALACAR\Administrator
VALACAR                   SHARKY                    Running      263130661    VALACAR\Administrator
VALACAR                   ELDACAR                   Running      257016608    VALACAR\Administrator
VALACAR                   NETINFO-DEV               Running      263166588    VALACAR\Administrator
VALACAR                   SHARKEY                   Stopped      0            VALACAR\Administrator
VALACAR                   VINYARION                 Running      263200175    VALACAR\Administrator
VALACAR                   SHADOWFAX                 Running      14553426     VALACAR\Administrator
VALACAR                   MEN                       Running      263174123    VALACAR\Administrator
VALACAR                   CALMACIL                  Running      263137198    VALACAR\Administrator
VALACAR                   MINALCAR                  Running      263137229    VALACAR\Administrator

when I issue get-vmmemory, I get this:

VMElmentName                   VirtualQuantity  Limit            Reservation
------------                   ---------------  -----            -----------
                               2048             2048             2048
                               2048             2048             2048
                               2048             2048             2048
                               4096             4096             4096
                               2048             2048             2048
                               2048             2048             2048
                               1024             1024             1024
                               2048             2048             2048
                               512              512              512
                               2048             2048             2048
                               512              512              512
                               2048             2048             2048
                               2048             2048             2048


The VM names are not visible.

:)

Blake

Feb 3, 2009 at 9:58 PM
It might just be a simple typo - VMElmentName looks incorrect to me.
Coordinator
Feb 8, 2009 at 11:44 PM
The element name is a type in the format XML file. I can't find anything wrong with the code which gets the VM names though.

Just out of interest are you running against a local or remote machine ?
Feb 9, 2009 at 3:17 PM
I am running it locally on the Hyper-V server.
Feb 24, 2009 at 3:47 PM
I am running it locally - I'd like to use this to give me output of all the current VMs and their memory allocation.  But it gives me blank for the name.  ??  Any ideas?
Coordinator
Mar 16, 2009 at 3:34 PM
Finally been able to repro !!

It only affects Running VMs with snapshots.

In the Formatting XML search for memory and you'll find a section with this line in it

           <scriptBlock>(get-wmiobject -computername $_.__Server -namespace root\virtualization -query "associators of {$_} ").elementName</scriptBlock>

it need to be changed to           
<scriptBlock>(get-wmiobject -computername $_.__Server -namespace root\virtualization -query "associators of {$_}  where resultclass=Msvm_VirtualSystemSettingData").elementName</scriptBlock>

Otherwise where there are snapshots multiple items will be returned.

I've now got to go through the XML looking for other places where this might occur before posting a proper fix
Coordinator
Mar 16, 2009 at 3:35 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.