Click to Rate and Give Feedback
MSDN
MSDN Library
Hyper-V
Storage Classes
Msvm_ImageManagementService Class

Manages the virtual media (.vhd, .iso, or .vfd files) for a virtual machine.

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


class Msvm_ImageManagementService : CIM_Service
{
  string Caption;
  string Description;
  string ElementName;
  datetime InstallDate;
  string Name;
  uint16 OperationalStatus[];
  string StatusDescriptions[];
  string Status;
  uint16 HealthState;
  uint16 EnabledState;
  string OtherEnabledState;
  uint16 RequestedState;
  uint16 EnabledDefault;
  datetime TimeOfLastStateChange;
  string SystemCreationClassName;
  string SystemName;
  string CreationClassName;
  string Name;
  string PrimaryOwnerName;
  string PrimaryOwnerContact;
  string StartMode;
  boolean Started;
};

Methods

The Msvm_ImageManagementService class defines the following methods.

Method Description

RequestStateChange

This method is not supported.

StartService

This method is not supported.

StopService

This method is not supported.

CreateDynamicVirtualHardDisk

Creates a dynamically-expanding virtual hard disk (.vhd) file.

CreateFixedVirtualHardDisk

Creates a fixed-sized virtual hard disk (.vhd) file.

CreateDifferencingVirtualHardDisk

Creates a differencing virtual hard disk (.vhd) file.

ReconnectParentVirtualHardDisk

Fixes broken links between parent and child disk image files.

CreateVirtualFloppyDisk

Creates a virtual floppy disk (.vfd) file.

MergeVirtualHardDisk

Merges a differencing virtual hard disk file with its parents. This function will also update any local virtual machines which depend on the files being merged. If the user executing this function does not have permission to update the all virtual machines, then this function will fail.

CompactVirtualHardDisk

Compacts a dynamic virtual hard disk file. Compacting is the process of unallocating unused portions of the virtual hard disk.

ExpandVirtualHardDisk

Expands an existing virtual hard disk (.vhd) file. If the disk image is already attached to the virtual machine, it will send notifications to the running virtual machine about disk expansion.

ConvertVirtualHardDisk

Converts the type of an existing virtual hard disk.

GetVirtualHardDiskInfo

Retrieves information about the virtual hard disk files.

Mount

Mounts a virtual disk image file in loopback mode.

Unmount

Unmounts an existing virtual disk image file in loopback mode.

ValidateVirtualHardDisk

Validates whether a virtual disk image can be opened in read-only mode.

Properties

The Msvm_ImageManagementService class defines the following 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 "Hyper-V Image Management Service".

CreationClassName
Data type: string
Access type: Read-only

The name of the class or subclass used in the creation of an instance. This property is inherited from CIM_Service and it is set to "Msvm_ImageManagementService".

Description
Data type: string
Access type: Read-only

A textual description of the object. This property is inherited from CIM_ManagedElement and it is always set to "Provides Image Management servicing for Hyper-V".

ElementName
Data type: string
Access type: Read-only

This property is inherited from CIM_ManagedElement and it is set to "Hyper-V Image Management Service".

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 it is always set to 2 ("Enabled").

EnabledState
Data type: uint16
Access type: Read-only

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 always set to 5 ("Not Applicable").

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.

Name
Data type: string
Access type: Read-only

The label by which the object is known. This property is inherited from CIM_ManagedSystemElement and it is set to "vhdsvc".

Name
Data type: string
Access type: Read-only

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

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

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

OtherEnabledState
Data type: string
Access type: Read-only

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

PrimaryOwnerContact
Data type: string
Access type: Read-only

A string that provides information about how the primary owner of the service can be reached (for example, phone number, e-mail address, and so on). This property is inherited from CIM_Service and it is set to "".

PrimaryOwnerName
Data type: string
Access type: Read-only

The name of the primary owner for the service, if one is defined. The primary owner is the initial support contact for the service. This property is inherited from CIM_Service and it is set to "Microsoft".

RequestedState
Data type: uint16
Access type: Read-only

The last requested or desired state for the element. 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. A particular instance of EnabledLogicalElement might not support RequestedStateChange. If this occurs, the value 12 ("Not Applicable") is used. This property is inherited from CIM_EnabledLogicalElement and it is always set to 12 ("Not Applicable").

Started
Data type: boolean
Access type: Read-only

Indicates whether the service has been started. This property is inherited from CIM_Service and it is set to TRUE.

StartMode
Data type: string
Access type: Read-only

A string value that indicates whether the service is automatically started by a system, an operating system, or is started only upon request. This property is inherited from CIM_Service 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

Strings that describe the various OperationalStatus array values. This property is inherited from CIM_ManagedSystemElement.

SystemCreationClassName
Data type: string
Access type: Read-only

The scoping system's creation class name. This property is inherited from CIM_Service and it is set to "Msvm_ComputerSystem".

SystemName
Data type: string
Access type: Read-only

The name of the hosting computer system. This property is inherited from CIM_Service.

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 and it is always set to NULL.

Requirements

MOF

Declared in WindowsVirtualization.mof.

Namespace

Defined in \\.\Root\Virtualization.

See Also

CIM_Service
Storage Classes


Send comments about this topic to Microsoft

Build date: 9/4/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker