IVMVirtualMachine::Name property
The Name property contains the name of the virtual machine configuration.
This property is read/write.
Syntax
HRESULT put_Name(
[in] BSTR virtualMachineName
);
HRESULT get_Name(
[out] BSTR *virtualMachineName
);
VB |
---|
|
Property value
The name of the virtual machine configuration. The total length of the fully qualified path that includes the virtual machine name configuration file cannot be more than 256 characters.
This property value is read/write.
Error codes
Name | Meaning |
---|---|
|
The operation was successful. |
|
The virtualMachineName parameter is NULL. |
|
The virtualMachineName parameter is not valid or is an empty string. |
|
Unknown configuration. |
|
virtualMachineName contains too many characters. |
|
virtualMachineName contains one of the following invalid characters "*?:<>/|\"". |
|
virtualMachineName already exists as a name of another virtual machine. |
|
An unexpected error has occurred. |
Remarks
Virtual machine names are case-insensitive, e.g. "MyVM" and "myvm" refer to the same virtual machine. This is the default property for IVMVirtualMachine.
Due to the method in which links to a ".vmc" configuration file are maintained by Virtual Server, the effective maximum length of a virtual machine name is roughly 150 characters. The actual usable maximum length will vary for each system.
Examples
The following example displays the Name property value of a VMVirtualMachine object.
Set objVS = CreateObject("VirtualServer.Application")
Set objVM = objVS.FindVirtualMachine("Windows Server 2003")
Wscript.Echo "VM Name: " & objVM.Name
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|