This topic has not yet been rated - Rate this topic

IVMVirtualMachine::RemoveActivationValue method

Virtual Server

The RemoveActivationValue method removes the value of the specified activation setting for this virtual machine.

Syntax


HRESULT RemoveActivationValue(
  [in]  BSTR activationKey
);

Parameters

activationKey [in]

Key used to identify the activation value as stored in the "*.vmc" file.

Return value

This method can return one of these values.

This method supports standard return values, as well as the following. For information on Virtual Server specific return values not listed below, see HRESULT Codes Specific to the Virtual Server.

Return codeDescription
S_OK

The operation was successful.

E_INVALIDARG

The activationKey parameter is NULL or empty.

VM_E_VM_UNKNOWN

The configuration is unknown.

VM_E_PREF_NOT_FOUND

The preference was not found, or this configuration has no valid activation.

DISP_E_EXCEPTION

An unexpected error has occurred.

 

Remarks

This method provides low-level access to any activation value. It can be used to remove activation values for customer-defined keys. Be careful if you use this method to remove system activation values, since some values cannot be changed while the virtual machine is running. When a virtual machine is started, a copy is made of its configuration values, which becomes its set of activation values. Activation values are maintained until the virtual machine is shut down or restarted. Note that Virtual Server may only use the configuration to store values for certain keys, that is, the activation value may never be used.

Note  The virtual machine session must be running before any activation values can be changed.

Activation keys are stored internally in a hierarchical manner similar to the registry keys in Windows. To specify a specific subkey, a "key path" is constructed which specifies the various keys in a slash mark–delimited format.

For example, to remove the value of the "default_action" key located in the following key tree:

<settings>
    <undo_drives>
        <default_action type="integer">1</ram_size>

The activationKey path string would be specified as follows:

"settings/undo_drives/default_action"

Requirements

Product

Microsoft Virtual Server 2005 onWindows Server 2003

Download

Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003

Header

VsComInterfaces.h

See also

IVMVirtualMachine

 

 

Send comments about this topic to Microsoft

Build date: 10/26/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.