Export (0) Print
Expand All

Msvm_ComputerSystem class

Hyper-V

Represents a physical computer system or virtual machine.

To retrieve information for the VMMS, use the Msvm_VirtualSystemManagementService class.

The following syntax is simplified Managed Object Format (MOF) code, and it includes all of the inherited properties.

Syntax

[Dynamic, Provider("VmmsWmiInstanceAndMethodProvider")]class Msvm_ComputerSystem : CIM_ComputerSystem
{
  string   InstanceID;
  string   Caption;
  string   Description;
  string   ElementName;
  datetime InstallDate;
  uint16   OperationalStatus[];
  string   StatusDescriptions[];
  string   Status;
  uint16   HealthState = 5;
  uint16   CommunicationStatus;
  uint16   DetailedStatus;
  uint16   OperatingStatus;
  uint16   PrimaryStatus;
  uint16   EnabledState = 2;
  string   OtherEnabledState;
  uint16   RequestedState;
  uint16   EnabledDefault = 2;
  datetime TimeOfLastStateChange;
  uint16   AvailableRequestedStates[];
  uint16   TransitioningToState;
  string   CreationClassName;
  string   Name = "GUID";
  string   PrimaryOwnerName;
  string   PrimaryOwnerContact;
  string   Roles[];
  string   NameFormat;
  string   OtherIdentifyingInfo[];
  string   IdentifyingDescriptions[];
  uint16   Dedicated[];
  string   OtherDedicatedDescriptions[];
  uint16   ResetCapability = 1;
  uint16   PowerManagementCapabilities[];
  uint64   OnTimeInMilliseconds;
  uint32   ProcessID;
  datetime TimeOfLastConfigurationChange;
  uint16   NumberOfNumaNodes;
  uint16   ReplicationState;
  uint16   ReplicationHealth;
  uint16   ReplicationMode;
  uint16   FailedOverReplicationType;
  uint16   LastReplicationType;
  DateTime LastApplicationConsistentReplicationTime;
  DateTime LastReplicationTime;
  DateTime LastSuccessfulBackupTime;
  uint16   EnhancedSessionModeState;
};

Members

The Msvm_ComputerSystem class has these types of members:

Methods

The Msvm_ComputerSystem class has these methods.

MethodDescription
InjectNonMaskableInterrupt

Injects a non-maskable interrupt into the virtual machine. This method is only supported for instances of the Msvm_ComputerSystem class that represent a virtual machine.

Windows 8.1:  This method is not supported until Windows 8.1 and Windows Server 2012 R2.

RequestReplicationStateChange

Requests that the replication state of the virtual machine be changed to the specified value. This method is only supported for instances of the Msvm_ComputerSystem class that represent a virtual machine.

RequestReplicationStateChangeEx

Requests that the replication state of the virtual machine be changed to the specified value. This method is only supported for instances of the Msvm_ComputerSystem class that represent a virtual machine.

Windows 8.1:  This method is not supported until Windows 8.1 and Windows Server 2012 R2.

RequestStateChange

Requests that the state of the virtual machine be changed. This method is only supported for instances of the Msvm_ComputerSystem class that represent a virtual machine.

SetPowerState

This method is not supported.

 

Properties

The Msvm_ComputerSystem class has these properties.

AvailableRequestedStates
Data type: uint16 array
Access type: Read-only

Indicates the possible values for the RequestedState parameter of the RequestStateChange method used to initiate a state change. The values listed will be a subset of the values contained in the RequestedStatesSupported property of the associated instance of CIM_EnabledLogicalElementCapabilities, where the values selected are a function of the current state of the CIM_EnabledLogicalElement object. This property can be non-Null if an implementation is able to advertise the set of possible values as a function of the current state. This property will be Null if an implementation is unable to determine the set of possible values as a function of the current state.

This property is inherited from CIM_EnabledLogicalElement.

Enabled (2)
Disabled (3)
Shut Down (4)
Offline (6)
Test (7)
Defer (8)
Quiesce (9)
Reboot (10)
Reset (11)
DMTF Reserved (.. )
Caption
Data type: string
Access type: Read-only

A short description of the object. This property is inherited from the CIM_ManagedElement class, and it will contain one of the following values.

ValueMeaning
"Virtual Machine"

The instance represents a virtual machine.

"Hosting Computer System"

The instance represents the hosting computer.

 

CommunicationStatus
Data type: uint16
Access type: Read-only

Indicates the ability of the instrumentation to communicate with the underlying managed element. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

CreationClassName
Data type: string
Access type: Read-only

The name of the class or subclass that is used in the creation of an instance. This property is inherited from CIM_System, and it is always set to "Msvm_ComputerSystem".

Dedicated
Data type: uint16 array
Access type: Read-only

Indicates whether the computer system is a special-purpose system (dedicated to a particular use), versus being a general-purpose system. This property is inherited from CIM_ComputerSystem, and it is always set to 0 (Not Dedicated).

Description
Data type: string
Access type: Read-only

A description of the object. This property is inherited from CIM_ManagedElement, and it will contain one of the following values.

ValueMeaning
"Microsoft Virtual Computer System"

The instance represents a virtual machine.

"Microsoft Hosting Computer System"

The instance represents the hosting computer.

 

DetailedStatus
Data type: uint16
Access type: Read-only

Complements the PrimaryStatus property with additional status detail. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

ElementName
Data type: string
Access type: Read-only

A display name for the object. This property is inherited from CIM_ManagedElement, and it is always set to the display name of the computer for a virtual machine or the NetBIOS name of the management operating system.

EnabledDefault
Data type: uint16
Access type: Read-only

An administrator's default or startup configuration for the enabled state of an element. This property is inherited from CIM_EnabledLogicalElement and will be one of the following values.

Enabled (2)
Disabled (3)
Enabled but Offline (6)
EnabledState
Data type: uint16
Access type: Read-only

The enabled and disabled states of an element. This property can also indicate the transitions between these requested states. This property is inherited from the CIM_EnabledLogicalElement class, and it is set to 2 (Enabled) for a physical computer or one of the following values for a virtual machine. For a graphical view of these states, see Remarks.

ValueMeaning
Unknown
0

The state of the element could not be determined.

Other
1
Enabled
2

The element is running.

Disabled
3

The element is turned off.

Shutting Down
4

The element is in the process of going to a Disabled state.

Not Applicable
5

The element does not support being enabled or disabled.

Enabled but Offline
6

The element might be completing commands, and it will drop any new requests.

In Test
7

The element is in a test state.

Deferred
8

The element might be completing commands, but it will queue any new requests.

Quiesce
9

The element is enabled but in a restricted mode. The behavior of the element is similar to the Enabled state (2), but it processes only a restricted set of commands. All other requests are queued.

Starting
10

The element is in the process of going to an Enabled state (2). New requests are queued.

 

EnhancedSessionModeState
Data type: uint16
Access type: Read-only

Specifies the current state of enhanced session mode on the virtual machine.

The Hyper-V WMI provider raises an __InstanceModificationEvent each time the EnhancedSessionModeState of the Msvm_ComputerSystem class changes. If an active vmconnection session receives an __InstanceModificationEvent, it attempts to switch to enhanced session mode if the user enabled that setting.

Windows 8.1:  This value is not supported until Windows 8.1 and Windows Server 2012 R2.

EnhancedSessionModeState can be one of these values:

ValueMeaning
2

Enhanced mode is allowed and available on the virtual machine.

3

Enhanced mode is not allowed on the virtual machine.

6

Enhanced mode is allowed and but not currently available on the virtual machine.

 

FailedOverReplicationType
Data type: uint16
Access type: Read-only

The type of recovery data point that was applied during the failover operation.

Note  This property is deprecated starting with Windows 8.1; instead, use the property of the same name in the Msvm_ReplicationRelationship class to get the value for the primary or extended relationship.

Possible values are:

None (0)
Regular (1)
Application consistent (2)
Planned (3 )
HealthState
Data type: uint16
Access type: Read-only

Specifies the current health of the element. This attribute expresses the health of this element but not necessarily that of its subcomponents.

When a critical error occurs, check the event log for details. The EnabledState property can also contain more information. For example, when disk space is critically low, HealthState is set to 25, the virtual machine pauses, and EnabledState is set to 32768 (Paused).

This property is inherited from CIM_ManagedSystemElement.

ValueMeaning
OK
5

The virtual machine is fully functional and is operating within normal operational parameters and without error.

Major Failure
20

The virtual machine has suffered a major failure. This value is used when one or more disks that contain the virtual machine's VHDs is low on disk space and the virtual machine has been paused.

Critical failure
25

The element is nonfunctional, and recovery might not be possible. This can indicate that the worker process for the virtual machine (Vmwp.exe) is not responding to control or information requests, or that one or more disks that contain the VHDs for the virtual machine are low on disk space.

 

IdentifyingDescriptions
Data type: string array
Access type: Read-only

This property is inherited from CIM_ComputerSystem, and it is always set to Null.

InstallDate
Data type: datetime
Access type: Read-only

The date and time the virtual machine configuration was created for a virtual machine, or Null, for a management operating system. This property is inherited from CIM_ManagedSystemElement.

InstanceID
Data type: string
Access type: Read-only
Qualifiers: Key

Uniquely identifies an instance of this class. This property is inherited from CIM_ManagedElement.

In Windows 8, there is a single instance of ReplicationSettingData for every computer system or virtual machine. For Windows 8.1, a recovery virtual machine has two instances of ReplicationSettingData. This change differentiates and associates setting data with replication relationship.

Property nameWindows 8 valueWindows 8.1 value
InstanceIDMicrosoft:<vmguid>\HVRMicrosoft:<vmguid>\HVR\<0/1>

 

In the Windows 8.1 value, 0 indicates primary and 1 indicates extended replication. For more info about extended replication, see Msvm_ReplicationRelationship.

LastApplicationConsistentReplicationTime
Data type: DateTime
Access type: Read-only

The time at which the last application-consistent replication was received for the virtual machine.

Note  This property is deprecated starting with Windows 8.1; instead, use the property of the same name in the Msvm_ReplicationRelationship class to get the value for the primary or extended relationship.

LastReplicationTime
Data type: DateTime
Access type: Read-only

The time at which the last replication is received on recovery for the virtual machine.

Note  This property is deprecated starting with Windows 8.1; instead, use the property of the same name in the Msvm_ReplicationRelationship class to get the value for the primary or extended relationship.

LastReplicationType
Data type: uint16
Access type: Read-only

The type of the last replication that was received for the virtual machine.

Note  This property is deprecated starting with Windows 8.1; instead, use the property of the same name in the Msvm_ReplicationRelationship class to get the value for the primary or extended relationship.

Possible values are:

None (0)
Regular (1)
Application consistent (2)
Planned (3 )
LastSuccessfulBackupTime
Data type: DateTime
Access type: Read-only

The time at which the last successful backup has completed for the virtual machine.

Name
Data type: string
Access type: Read-only

The label by which the object is known. This property is inherited from CIM_System, and it is always set to "GUID".

NameFormat
Data type: string
Access type: Read-only

A string that identifies how the system name was generated, using the subclass heuristic. This property is inherited from CIM_ComputerSystem, and it is always set to Null.

NumberOfNumaNodes
Data type: uint16
Access type: Read-only

The number of nonuniform memory access (NUMA) nodes of the computer system. When Msvm_ComputerSystem represents the hosting computer system, this property contains the count of physical NUMA nodes. When Msvm_ComputerSystem represents a virtual machine, this property contains the number of virtual NUMA nodes that are presented to the guest operating system through the ACPI System Resource Affinity Table (SRAT).

OnTimeInMilliseconds
Data type: uint64
Access type: Read-only

For the virtual machine, this property indicates the time, in milliseconds, since the machine was last turned on, reset, or restored. This time excludes the time the virtual machine was in the paused state. For the management operating system, this property is set to Null.

OperatingStatus
Data type: uint16
Access type: Read-only

Provides current status information for the operational condition of the element and can be used for providing more detail with respect to the value of the EnabledState property. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

OperationalStatus
Data type: uint16 array
Access type: Read-only

An array that contains the current statuses of the object. This property is inherited from CIM_ManagedSystemElement. The value at index zero (0) is one of the following values.

ValueMeaning
OK
2

The virtual machine is functional and operating normally.

Degraded
3

The virtual machine is only partially functional. This indicates that the storage that contains the configuration is not accessible. A virtual machine in this state can only be turned off or deleted.

Predictive Failure
5

The virtual machine is functional but may fail in the future. This indicates that the storage that contains the virtual machine's virtual hard disk is low on free space. The virtual machine will be paused if more disk space is not made available.

Stopped
10

This value is not supported. If the virtual machine is stopped, the EnabledState property will have a value of 3 (Disabled).

In Service
11

The virtual machine is processing a request.

Dormant
15

This value is not supported. If the virtual machine is suspended or paused, the EnabledState property will have a value of 32769 (Suspended) or 32768 (Paused).

 

The value at index one (1) is optional and contains secondary status information. A client should use the primary status from index zero (0) to determine whether a new request can be issued to the virtual machine. If OperationalStatus[0] is 2 (OK), then the operation indicated by OperationalStatus[1] can be interrupted.

The value at OperationalStatus[1] is one of the following values.

ValueMeaning
Creating Snapshot
32768

A snapshot is in the process of being created for the virtual machine.

Applying Snapshot
32769

A snapshot is in the process of being applied to the virtual machine.

Deleting Snapshot
32770

A snapshot is in the process of being deleted from the virtual machine.

Waiting to Start
32771

The virtual machine will be started after the automatic startup delay has elapsed.

Merging Disks
32772

Virtual hard disks from previously deleted snapshots are being merged.

Exporting Virtual Machine
32773

The virtual machine is being exported.

Migrating Virtual Machine
32774

The virtual machine is being migrated live from one physical computer to another.

 

OtherDedicatedDescriptions
Data type: string array
Access type: Read-only

A string that describes how or why the system is dedicated when the Dedicated array includes the value 2 (Other). This property is inherited from CIM_ComputerSystem, and it is always set to Null.

OtherEnabledState
Data type: string
Access type: Read-only

The enabled or disabled state of the virtual machine when the EnabledState property is set to 1 (Other). This property must be set to Null when EnabledState is any value other than 1. This property is inherited from CIM_EnabledLogicalElement, and it is always set to Null.

OtherIdentifyingInfo
Data type: string array
Access type: Read-only

This property is inherited from CIM_ComputerSystem, and it is always set to Null.

PowerManagementCapabilities
Data type: uint16 array
Access type: Read-only

This property is inherited from CIM_ComputerSystem, but it is not used.

PrimaryOwnerContact
Data type: string
Access type: Read-only

A string that indicates how the primary system owner can be reached (for example, a phone number or an email address). This property is inherited from CIM_System, and it is always set to Null.

PrimaryOwnerName
Data type: string
Access type: Read-only

The name of the primary system owner. This property is inherited from CIM_System, and it is always set to Null.

PrimaryStatus
Data type: uint16
Access type: Read-only

Provides high level status information. This property should be used in conjunction with the DetailedStatus property to provide high level and detailed health status information for the element and its subcomponents. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

ProcessID
Data type: uint32
Access type: Read-only

The identifier of the process under which this virtual machine is running. This value can be used to uniquely identify the instance of Vmwp.exe on the system that is running the virtual machine.

ReplicationHealth
Data type: uint16
Access type: Read-only

The replication health for the virtual machine.

Note  This property is deprecated starting with Windows 8.1; instead, use the property of the same name in the Msvm_ReplicationRelationship class to get the value for the primary or extended relationship.

Possible values are:

Not applicable (0)
Ok (1)
Warning (2)
Critical (3)
ReplicationMode
Data type: uint16
Access type: Read-only

Specifies the replication mode for the virtual machine. This will be one of the following values.

ValueMeaning
0

None

1

Primary

2

Recovery

3

Replica

4

Extended replica

 

ReplicationState
Data type: uint16
Access type: Read-only

The replication state for the virtual machine.

Note  This property is deprecated starting with Windows 8.1; instead, use the property of the same name in the Msvm_ReplicationRelationship class to get the value for the primary or extended relationship.

Possible values are:

Disabled (0)
Ready for replication (1)
Waiting to complete initial replication (2)
Replicating (3)
Synced replication complete (4)
Recovered (5)
Committed (6)
Suspended (7)
Critical (8)
Waiting to start resynchronization (9)
Resynchronizing (10)
Resynchronization suspended (11)
Failover in progress (12)
Failback in progress (13)
Failback complete (14)
RequestedState
Data type: uint16
Access type: Read-only

The last requested or desired state for the virtual machine as passed to the RequestStateChange method, or 12 (Not Applicable) if no state change is in progress. The actual state of the element is represented by EnabledState. This property is provided to compare the last requested and current enabled or disabled states. This property is inherited from CIM_EnabledLogicalElement.

ResetCapability
Data type: uint16
Access type: Read-only

This property is inherited from CIM_ComputerSystem, and it is always set to 1 (Other).

Roles
Data type: string array
Access type: Read-only

An array of strings that describe the roles the system plays in the information technology environment. This property is inherited from CIM_System, and it is always set to Null.

Status
Data type: string
Access type: Read-only

This property is inherited from CIM_ManagedSystemElement, but it is not used.

StatusDescriptions
Data type: string array
Access type: Read-only
Qualifiers: ArrayType ("Indexed")

An array that contains strings that describe the corresponding OperationalStatus array values. For example, if 11 (In Service) is the value assigned to OperationalStatus[0], then StatusDescriptions[0] may contain an explanation as to why the virtual machine is processing a request. This property is inherited from CIM_ManagedSystemElement.

TimeOfLastConfigurationChange
Data type: datetime
Access type: Read-only

The date and time when the virtual machine configuration file was last modified. The configuration file is modified during certain virtual machine operations, as well as when any of the virtual machine or device settings are added, modified, or removed.

TimeOfLastStateChange
Data type: datetime
Access type: Read-only

The date and time when the enabled state of the element last changed. This property is inherited from CIM_EnabledLogicalElement.

TransitioningToState
Data type: uint16
Access type: Read-only

Indicates the target state to which the instance is transitioning. This property is inherited from CIM_EnabledLogicalElement, but it is not used.

Remarks

The following illustration shows the EnabledState values.

State diagram for EnabledState values for Windows Server 2008 R2

When a property of the Msvm_ComputerSystem class changes, the WMI provider indicates an __InstanceModificationEvent event that describes the changes. The previous state is contained in the PreviousInstance property, and the new state is contained in the TargetInstance property. This event is asynchronous; by the time the __InstanceModificationEvent event is processed, the TargetInstance property may not reflect the current state.

Access to the Msvm_ComputerSystem class might be restricted by UAC Filtering. For more information, see User Account Control and WMI.

Examples

See Querying Networking Objects.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Namespace

\\Root\Virtualization\V2

MOF

WindowsVirtualization.V2.mof

See also

__InstanceModificationEvent
CIM_ComputerSystem
Msvm_ComputerSystem (V1)
Virtual System Classes

 

 

Community Additions

ADD
Show:
© 2014 Microsoft