Поделиться через


Msvm_ComputerSystem class

Represents a physical computer system or virtual computer system (VM).

To retrieve information for the VMMS, use Msvm_VirtualSystemManagementService.

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

Syntax

[Dynamic, Provider("VmmsWmiInstanceAndMethodProvider"), AMENDMENT]
class Msvm_ComputerSystem : CIM_ComputerSystem
{
  string   Caption;
  string   Description;
  string   ElementName;
  datetime InstallDate;
  uint16   OperationalStatus[];
  string   StatusDescriptions[];
  string   Status;
  uint16   HealthState = 0;
  uint16   EnabledState = 5;
  string   OtherEnabledState;
  uint16   RequestedState;
  datetime TimeOfLastStateChange;
  string   Name = "GUID";
  string   PrimaryOwnerName;
  string   PrimaryOwnerContact;
  string   IdentifyingDescriptions[];
  string   OtherIdentifyingInfo[];
  uint16   Dedicated[] = 0;
  string   OtherDedicatedDescriptions[];
  uint16   ResetCapability = 1;
  uint16   PowerManagementCapabilities[];
  uint16   EnabledDefault;
  string   CreationClassName;
  string   Roles[];
  string   NameFormat;
  uint64   OnTimeInMilliseconds;
  datetime TimeOfLastConfigurationChange;
  uint32   ProcessID;
  uint16   AssignedNumaNodeList[];
};

Members

The Msvm_ComputerSystem class has these types of members:

Methods

The Msvm_ComputerSystem class has these methods.

Method Description
RequestStateChange Requests that the state of the computer system be changed. This method is only valid for instances of Msvm_ComputerSystem that represent a VM. This method is inherited from CIM_EnabledLogicalElement.
SetPowerState This method is not supported.

Properties

The Msvm_ComputerSystem class has these properties.

AssignedNumaNodeList

Data type: uint16 array

Access type: Read-only

Qualifiers: ArrayType ("Indexed")

An array of NUMA nodes that are currently assigned to the VM.

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64)

A short textual description (one-line string) of the object. This property is inherited from CIM_ManagedElement and it is set to "Virtual Machine" if the instance represents a VM or "Hosting Computer System" if the instance represents the management operating system.

CreationClassName

Data type: string

Access type: Read-only

Qualifiers: Key, MaxLen (256)

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 set to "Msvm_ComputerSystem".

Dedicated

Data type: uint16 array

Access type: Read-only

Qualifiers: MappingStrings ("MIB.IETF|MIB-II.sysServices", "FC-GS.INCITS-T11 | Platform | PlatformType"), ArrayType ("Indexed"), ModelCorrespondence ("CIM_ComputerSystem.OtherDedicatedDescriptions")

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 set to 0 (Not Dedicated).

Description

Data type: string

Access type: Read-only

A textual description of the object. This property is inherited from CIM_ManagedElement and it is set to "Microsoft Virtual Computer System" if the instance represents a VM or "Microsoft Hosting Computer System" if the instance represents the management operating system.

ElementName

Data type: string

Access type: Read-only

A user-friendly name for the object. This property is inherited from CIM_ManagedElement and it is set to the display name of the computer for a VM or the NetBIOS name of the management operating system.

EnabledDefault

Data type: uint16

Access type: Read/write

An administrator's default or startup configuration for the enabled state of an element. This property is inherited from CIM_EnabledLogicalElement and it is always set to 2 (Enabled).

EnabledState

Data type: uint16

Access type: Read-only

Qualifiers: ModelCorrespondence ("CIM_EnabledLogicalElement.OtherEnabledState")

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

The possible values are.

Unknown (0)

Indicates that the state of the VM cannot be determined.

Other (1)

Indicates that the state of the VM is described in the OtherEnabledState property.

Enabled (2)

Indicates that the VM is running.

Disabled (3)

Indicates that the VM is turned off

Shutting Down (4)

Indicates that the VM is in the process of changing to a Disabled state.

Not Applicable (5)

Indicates the VM does not support to be enabled or disabled.

Enabled but Offline (6)

Indicates that the VM might be completing commands and that it drops any new requests.

In Test (7)

Indicates that the VM is in a saved state.

Deferred (8)

Indicates that the VM might be completing commands, but that it queues any new requests.

Quiesce (9)

Indicates that the VM is enabled but is in a restricted mode.

Starting (10)

The VM is starting. This is a transitional state between 3 (Disabled) and 2 (Enabled) initiated by a call to the RequestStateChange method with a RequestedState parameter of 2 (Enabled).

DMTF Reserved

Reserved.

Vendor Reserved

Reserved.

HealthState

Data type: uint16

Access type: Read-only

The current health of the element. This attribute expresses the health of this element but not necessarily that of its subcomponents. The possible values are 5 and 25, where 5 means the element is entirely healthy and 25 means there is a critical error.

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 VM pauses, and EnabledState is set to 32768 (Paused).

This property is inherited from CIM_ManagedSystemElement.

Unknown (0)

The implementation cannot report on HealthState at this time.

OK (5)

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

Critical failure (25)

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

IdentifyingDescriptions

Data type: string array

Access type: Read-only

Qualifiers: ArrayType ("Indexed"), ModelCorrespondence ("CIM_ComputerSystem.OtherIdentifyingInfo")

This property is inherited from CIM_ComputerSystem and it is set to NULL.

InstallDate

Data type: datetime

Access type: Read-only

Qualifiers: MappingStrings ("MIF.DMTF|ComponentID|001.5")

The date and time the VM configuration was created for a VM or NULL for a management operating system. This property is inherited from CIM_ManagedSystemElement.

Name

Data type: string

Access type: Read-only

Qualifiers: Key, MaxLen (256)

The label by which the object is known. This property is inherited from CIM_System and it is set to "GUID". This corresponds to the SystemName properties of the Msvm_VirtualSystemGlobalSettingData and Msvm_VirtualSystemSettingData classes.

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 set to NULL.

OnTimeInMilliseconds

Data type: uint64

Access type: Read-only

Qualifiers: Units ("MilliSeconds")

For the VM, this property describes the total up time, in milliseconds, since the machine was last turned on, reset, or restored. This time excludes the time the VM was in the paused state. For the management operating system, this property is set to NULL.

OperationalStatus

Data type: uint16 array

Access type: Read-only

Qualifiers: ArrayType ("Indexed"), ModelCorrespondence ("CIM_ManagedSystemElement.StatusDescriptions")

An array containing 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.

The possible values are.

OK (2)

The VM is functional and operating normally.

Degraded (3)

The VM is only partially functional. This indicates that the storage containing the configuration is not accessible. A VM in this state may only be turned off or deleted.

**Windows Server 2008: **

This value is not supported before Windows Server 2008 R2.

Predictive Failure (5)

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

**Windows Server 2008: **

This value is not supported before Windows Server 2008 R2.

Stopped (10)

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

**Windows Server 2008: **

This value is supported and indicates that the virtual machine is stopped.

In Service (11)

The VM is processing a request.

Dormant (15)

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

**Windows Server 2008: **

This value is supported and indicates that the VM is suspended or 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 VM. If OperationalStatus[0] is 2 (OK), then the operation indicated by OperationalStatus[1] can be interrupted.

**Windows Server 2008: **

This value at index one (1) is not supported before Windows Server 2008 R2.

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

Value Meaning
Creating Snapshot
32768
A snapshot is in the process of being created for the VM.
Applying Snapshot
32769
A snapshot is in the process of being applied to the VM.
Deleting Snapshot
32770
A snapshot is in the process of being deleted from the VM.
Waiting to Start
32771
The VM will be started after the automatic startup delay configured through the AutomaticStartupActionDelay property of the Msvm_VirtualSystemGlobalSettingData class has elapsed.
Merging Disks
32772
Virtual hard disks from previously deleted snapshots are being merged.
Exporting Virtual Machine
32773
The VM is being exported.
Migrating Virtual Machine
32774
The VM is being migrated live from one physical computer to another.

OtherDedicatedDescriptions

Data type: string array

Access type: Read-only

Qualifiers: ArrayType ("Indexed"), ModelCorrespondence ("CIM_ComputerSystem.Dedicated")

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 set to NULL.

OtherEnabledState

Data type: string

Access type: Read-only

Qualifiers: ModelCorrespondence ("CIM_EnabledLogicalElement.EnabledState")

The enabled or disabled state of the VM 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

Qualifiers: MaxLen (256), ArrayType ("Indexed"), ModelCorrespondence ("CIM_ComputerSystem.IdentifyingDescriptions")

This property is inherited from CIM_ComputerSystem and it is set to NULL.

PowerManagementCapabilities

Data type: uint16 array

Access type: Read-only

Qualifiers: Deprecated ("CIM_PowerManagementCapabilities.PowerCapabilities"), MappingStrings ("MIF.DMTF|System Power Controls|001.2")

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

PrimaryOwnerContact

Data type: string

Access type: Read/write

Qualifiers: MaxLen (256), MappingStrings ("MIF.DMTF|General Information|001.4")

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 set to NULL.

PrimaryOwnerName

Data type: string

Access type: Read/write

Qualifiers: MaxLen (64), MappingStrings ("MIF.DMTF|General Information|001.3")

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

ProcessID

Data type: uint32

Access type: Read-only

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

RequestedState

Data type: uint16

Access type: Read-only

Qualifiers: ModelCorrespondence ("CIM_EnabledLogicalElement.EnabledState")

The last requested or desired state for the VM 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.

**Windows Server 2008: **

This property is not supported before Windows Server 2008 R2 and is always set to 12 (Not Applicable).

ResetCapability

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("MIF.DMTF|System Hardware Security|001.4")

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

Other (1)

Other.

Roles

Data type: string array

Access type: Read/write

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 set to NULL.

Status

Data type: string

Access type: Read-only

Qualifiers: Deprecated ("CIM_ManagedSystemElement.OperationalStatus"), MaxLen (10)

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

StatusDescriptions

Data type: string array

Access type: Read-only

Qualifiers: ArrayType ("Indexed"), ModelCorrespondence ("CIM_ManagedSystemElement.OperationalStatus")

An array containing 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 VM 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 VM configuration file was last modified. The configuration file is modified during certain VM operations, as well as when any of the VM or device settings are added, modified, or removed.

TimeOfLastStateChange

Data type: datetime

Access type: Read-only

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

Remarks

The following illustration shows the EnabledState values for Windows Server 2008 R2.

state diagram for enabledstate values for windows server 2008 r2

**Windows Server 2008: **

The following illustration shows the EnabledState values for Windows Server 2008.

state diagram for enabledstate values for windows server 2008

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
None supported
Minimum supported server
Windows Server 2008
End of client support
None supported
End of server support
Windows Server 2012 R2
Namespace
Root\Virtualization
MOF
WindowsVirtualization.mof

See also

CIM_ComputerSystem

CIM_ComputerSystem

__InstanceModificationEvent

Msvm_ComputerSystem (V2)

Virtual System Classes