pub struct VirtualMachineGuestCustomizationManager { /* private fields */ }Expand description
GuestCustomizationManager is a singleton managed object that provides APIs for guest customization of a running VM.
Implementations§
Source§impl VirtualMachineGuestCustomizationManager
impl VirtualMachineGuestCustomizationManager
pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self
Sourcepub async fn abort_customization_task(
&self,
vm: &ManagedObjectReference,
auth: &dyn GuestAuthenticationTrait,
) -> Result<ManagedObjectReference>
pub async fn abort_customization_task( &self, vm: &ManagedObjectReference, auth: &dyn GuestAuthenticationTrait, ) -> Result<ManagedObjectReference>
Abort any running guest customization process in the guest and remove the guest customization lock in the guest as well.
As a result of the operation, the guest configuration may be left in an undefined state, which is however fine because guest customization is idempotent. A later successful guest customization can set the guest configuration to a valid state. The virtual machine must be in the powered-on state and the VMware Tools must be running. The VM is typically a cloned VM after the InstantClone operation. See VirtualMachine.InstantClone_Task.
Required privileges: VirtualMachine.Provisioning.Customize
§Parameters:
§vm
The Virtual Machine managed object reference.
Refers instance of VirtualMachine.
§auth
The guest authentication data. See GuestAuthentication.
§Returns:
This method returns a Task object with which to monitor the operation.
Refers instance of Task.
§Errors:
TaskInProgress: if the virtual machine is busy.
InvalidPowerState: if the VM is not powered on.
InvalidState: if the operation cannot be performed because of the virtual machine’s current state. For example, if the VMware Tools is not running.
InvalidGuestLogin: if the the guest authentication information was not accepted.
GuestPermissionDenied: if the provided guest authentication is not sufficient to perform the guest customization.
CustomizationFault: if a customization error occurs.
Sourcepub async fn customize_guest_task(
&self,
vm: &ManagedObjectReference,
auth: &dyn GuestAuthenticationTrait,
spec: &CustomizationSpec,
config_params: Option<&[Box<dyn OptionValueTrait>]>,
) -> Result<ManagedObjectReference>
pub async fn customize_guest_task( &self, vm: &ManagedObjectReference, auth: &dyn GuestAuthenticationTrait, spec: &CustomizationSpec, config_params: Option<&[Box<dyn OptionValueTrait>]>, ) -> Result<ManagedObjectReference>
Customize a running virtual machine.
The virtual machine must be in the powered-on state and the VMware Tools must be running. The VM is typically a cloned VM after the InstantClone operation. See VirtualMachine.InstantClone_Task.
Required privileges: VirtualMachine.Provisioning.Customize
§Parameters:
§vm
The Virtual Machine managed object reference.
Refers instance of VirtualMachine.
§auth
The guest authentication data. See GuestAuthentication.
§spec
Is a CustomizationSpec. It specifies the virtual machine’s configuration.
§config_params
addtional key/value pair list to support third party customization.
§Returns:
This method returns a Task object with which to monitor the operation.
Refers instance of Task.
§Errors:
TaskInProgress: if the virtual machine is busy.
InvalidPowerState: if the VM is not powered on.
InvalidState: if the operation cannot be performed because of the virtual machine’s current state. For example, if the VMware Tools is not running.
InvalidGuestLogin: if the the guest authentication information was not accepted.
GuestPermissionDenied: if the provided guest authentication is not sufficient to perform the guest customization.
CustomizationFault: if a customization error occurs.
Sourcepub async fn start_guest_network_task(
&self,
vm: &ManagedObjectReference,
auth: &dyn GuestAuthenticationTrait,
) -> Result<ManagedObjectReference>
pub async fn start_guest_network_task( &self, vm: &ManagedObjectReference, auth: &dyn GuestAuthenticationTrait, ) -> Result<ManagedObjectReference>
Start the network service in the guest, e.g.
acquire IPs from DHCP. The virtual machine must be in the powered-on state and the VMware Tools must be running. The VM is typically a cloned VM after the InstantClone operation. See VirtualMachine.InstantClone_Task.
Required privileges: VirtualMachine.Provisioning.Customize
§Parameters:
§vm
The Virtual Machine managed object reference.
Refers instance of VirtualMachine.
§auth
The guest authentication data. See GuestAuthentication.
§Returns:
This method returns a Task object with which to monitor the operation.
Refers instance of Task.
§Errors:
TaskInProgress: if the virtual machine is busy.
InvalidPowerState: if the VM is not powered on.
InvalidState: if the operation cannot be performed because of the virtual machine’s current state. For example, if the VMware Tools is not running.
InvalidGuestLogin: if the the guest authentication information was not accepted.
GuestPermissionDenied: if the provided guest authentication is not sufficient to perform the guest customization.
CustomizationFault: if a customization error occurs.
Trait Implementations§
Source§impl Clone for VirtualMachineGuestCustomizationManager
impl Clone for VirtualMachineGuestCustomizationManager
Source§fn clone(&self) -> VirtualMachineGuestCustomizationManager
fn clone(&self) -> VirtualMachineGuestCustomizationManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more