閱讀英文版本

分享方式:


Msvm_StorageJob class

Represents an image operation job created by the Microsoft Hyper-V Image Management Service.

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

Syntax

class Msvm_StorageJob : CIM_ConcreteJob
{
  string   Caption = "Storage Job";
  string   Description;
  string   ElementName = "Storage Job";
  datetime InstallDate;
  uint16   OperationalStatus[] = { 2 };
  string   StatusDescriptions[] = { "OK" };
  string   Status;
  uint16   HealthState = 5;
  string   JobStatus;
  datetime TimeSubmitted;
  datetime ScheduledStartTime;
  datetime StartTime;
  datetime ElapsedTime;
  uint32   JobRunTimes;
  uint8    RunMonth;
  sint8    RunDay;
  sint8    RunDayOfWeek;
  datetime RunStartInterval;
  uint16   LocalOrUtcTime;
  datetime UntilTime;
  string   Notify;
  string   Owner;
  uint32   Priority;
  uint16   PercentComplete;
  boolean  DeleteOnCompletion;
  uint16   ErrorCode;
  string   ErrorDescription;
  string   ErrorSummaryDescription;
  uint16   RecoveryAction;
  string   OtherRecoveryAction;
  string   InstanceID;
  string   Name = "Storage Job";
  uint16   JobState;
  datetime TimeOfLastStateChange;
  datetime TimeBeforeRemoval = 00000000000500.000000:000";
  uint16   Type;
  UINT32   JobCompletionStatusCode;
  string   Parent;
  string   Child;
};

Members

The Msvm_StorageJob class has these types of members:

  • Methods
  • Properties

Methods

The Msvm_StorageJob class has these methods.

Method Description
GetError

This method is not supported.

GetErrorEx

When the job is executing or has terminated without error, then this method returns no Msvm_Error instance. However, if the job has failed because of some internal problem or because the job has been terminated by a client, then one or more Msvm_Error instance is returned.

KillJob

This method is not supported.

RequestStateChange

This method is not supported.

 

Properties

The Msvm_StorageJob class has these properties.

Caption

Data type: string

Access type: Read-only

A short textual description (one-line string) of the object. This property is inherited from CIM_ManagedElement and it is always set to "Storage Job".

Child

Data type: string

Access type: Read-only

On failure of the asynchronous operation, this property contains the file path to the child of the VHD being affected by this operation.

DeleteOnCompletion

Data type: boolean

Access type: Read-only

This property is inherited from CIM_Job.

Description

Data type: string

Access type: Read-only

A textual description of the object. This property is inherited from CIM_ManagedElement.

ElapsedTime

Data type: datetime

Access type: Read-only

The length of time that the job has been executing. This property is inherited from CIM_Job.

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 "Storage Job" by default.

ErrorCode

Data type: uint16

Access type: Read-only

This property is inherited from CIM_Job.

ErrorDescription

Data type: string

Access type: Read-only

This property is inherited from CIM_Job.

ErrorSummaryDescription

Data type: string

Access type: Read-only

This property is inherited from CIM_Job.

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 0 to 30, where 5 means the element is entirely healthy and 30 means the element is completely non-functional. This property is inherited from CIM_ManagedSystemElement and it is always set to 5.

InstallDate

Data type: datetime

Access type: Read-only

The date and time the virtual machine configuration was created. This property is inherited from CIM_ManagedSystemElement.

InstanceID

Data type: string

Access type: Read-only

For instances associated with a virtual system, this defaults to "Microsoft:GUID\device-specific data". For instances which define potential settings for a virtual system, this defaults to "Microsoft:Definition\GUID\Type", where Type is "Maximum", "Minimum", "Default", or "Increment". This property is inherited from CIM_ConcreteJob.

JobCompletionStatusCode

Data type: UINT32

Access type: Read-only

The HRESULT code that describes the completion status for the asynchronous operation.

JobRunTimes

Data type: uint32

Access type: Read-only

This property is inherited from CIM_Job.

JobState

Data type: uint16

Access type: Read-only

The operational state of a job. It can also indicate transitions between these states, for example, 6 (Shutting Down) and 3 (Starting). This property is inherited from CIM_ConcreteJob.

Value Meaning
New 2

The job has never been started.

Starting 3

The job is moving from the 'New', 'Suspended', or 'Service' states into the 'Running' state.

Running 4

The job is running.

Suspended 5

The job is stopped, but can be restarted in a seamless manner.

Shutting Down 6

The job is moving to a 'Completed', 'Terminated', or 'Killed' state.

Completed 7

The job has completed normally.

Terminated 8

The job has been stopped by a 'Terminate' state change request. The job and all its underlying processes are ended and can be restarted (this is job-specific) only as a new job.

Killed 9

The job has been stopped by a 'Kill' state change request. Underlying processes might have been left running, and cleanup might be required to free up resources.

Exception 10

The job is in an abnormal state that might be indicative of an error condition. Actual status might be displayed though job-specific objects.

Service 11

The job is in a vendor-specific state that supports problem discovery, or resolution, or both.

DMTF Reserved 12–32767

Reserved.

Vendor Reserved 32768–65535

Reserved.

 

JobStatus

Data type: string

Access type: Read-only

A free-form string that represents the job status. This property is inherited from CIM_Job.

LocalOrUtcTime

Data type: uint16

Access type: Read-only

This property is inherited from CIM_Job.

Name

Data type: string

Access type: Read-only

The label by which the object is known. This property is inherited from CIM_ConcreteJob and it is the same as the ElementName property.

Notify

Data type: string

Access type: Read-only

The user that is notified upon job completion or failure. This property is inherited from CIM_Job.

OperationalStatus

Data type: uint16 array

Access type: Read-only

The current statuses of the object. This property is inherited from CIM_ManagedSystemElement and each array element is always set to 2 (OK).

OtherRecoveryAction

Data type: string

Access type: Read-only

This property is inherited from CIM_Job.

Owner

Data type: string

Access type: Read-only

The user who submitted the job. This property is inherited from CIM_Job.

Parent

Data type: string

Access type: Read-only

On failure of the asynchronous operation, this property contains the file path to the parent of the VHD being affected by this operation.

PercentComplete

Data type: uint16

Access type: Read-only

This property is inherited from CIM_Job.

Priority

Data type: uint32

Access type: Read-only

The importance of a job's execution. This property is inherited from CIM_Job.

RecoveryAction

Data type: uint16

Access type: Read-only

This property is inherited from CIM_Job.

RunDay

Data type: sint8

Access type: Read-only

This property is inherited from CIM_Job.

RunDayOfWeek

Data type: sint8

Access type: Read-only

This property is inherited from CIM_Job.

RunMonth

Data type: uint8

Access type: Read-only

This property is inherited from CIM_Job.

RunStartInterval

Data type: datetime

Access type: Read-only

This property is inherited from CIM_Job.

ScheduledStartTime

Data type: datetime

Access type: Read-only

This property is inherited from CIM_Job.

StartTime

Data type: datetime

Access type: Read-only

The time that the job began. This property is inherited from CIM_Job.

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

Strings that describe the various OperationalStatus array values. This property is inherited from CIM_ManagedSystemElement and each array element is always set to "OK".

TimeBeforeRemoval

Data type: datetime

Access type: Read-only

The amount of time that the job is retained after it has finished executing, either succeeding or failing in that execution. The job must remain in existence for some period of time regardless of the value of the DeleteOnCompletion property. The default is five minutes. This property is inherited from CIM_ConcreteJob.

TimeOfLastStateChange

Data type: datetime

Access type: Read-only

The time at which the virtual machine's state was last modified. This property is inherited from CIM_EnabledLogicalElement.

TimeSubmitted

Data type: datetime

Access type: Read-only

The time that the job was submitted. This property is inherited from CIM_Job.

Type

Data type: uint16

Access type: Read-only

The type of asynchronous operation being tracked by this instance of Msvm_StorageJob.

Value Meaning
DiskJobTypeInvalid 0
DiskJobTypeCreation 1

Creating a virtual hard disk (VHD) image.

DiskJobTypeFloppyCreation 2

Creating a virtual floppy disk image (VFD).

DiskJobTypeCompaction 3

Compacting the size of a VHD image.

DiskJobTypeExpansion 4

Expanding the size of a VHD image.

DiskJobTypeMerging 5

Merging multiple VHD images into a single image.

DiskJobTypeForking 6

Forking a single VHD image into multiple images.

DiskJobTypeConversion 7

Converting the type of a VHD image.

DiskJobTypeLoopbackMount 8

Mounting the VHD on the management operating system.

 

UntilTime

Data type: datetime

Access type: Read-only

The time at which the job is invalid or should be stopped. This property is inherited from CIM_Job.

Remarks

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

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

Namespace

Root\Virtualization

MOF

WindowsVirtualization.mof

See also

CIM_ConcreteJob

Storage Classes