VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
Classes | List of all members
Com::Vmware::Vcenter::Vm::Hardware::Boot::Device Class Reference
Inheritance diagram for Com::Vmware::Vcenter::Vm::Hardware::Boot::Device:

## Classes
class | Entry
class | EntryCreateSpec
class | Type

## Avaliable Methods
public method | get ()
public method | new ()
public method | set ()

## Detailed Description

The `Com::Vmware::Vcenter::Vm::Hardware::Boot::Device` interface provides methods* for configuring the device order used when booting a virtual machine.

The boot order may be specified using a mixture of device classes and device instances, chosen from among the following:

- :attr:`Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Type.CDROM` : Boot from a virtual CD-ROM drive; the device instance(s) will be chosen by the BIOS subsystem.
- :attr:`Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Type.FLOPPY` : Boot from a virtual floppy drive; the device instance(s) will be chosen by the BIOS subsystem.
- :attr:`Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Type.DISK` : Boot from a virtual disk device; the device instance is specified explicitly in :attr:`Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Entry.disks` list, and multiple instances may be specified in the list.
- :attr:`Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Type.ETHERNET` : Boot from a virtual Ethernet adapter; the device instance is specified explicitly as :attr:`Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Entry.nic` , and multiple adapters may be specified in the boot order list.

## Member Function Documentation

public method Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::get | ( |  | ) |

Returns an ordered list of boot devices for the virtual machine. If the list is empty, the virtual machine uses a default boot sequence.

Parameters

  vm | [REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.

Return values

  Ordered | list of configured boot devices. The return type will be Array of Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Entry

Exceptions

  Com::Vmware::Vapi::Std::Errors::Error | if the system reports an error while responding to the request.
  Com::Vmware::Vapi::Std::Errors::NotFound | if the virtual machine is not found.
  Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if the virtual machine's configuration state cannot be accessed.
  Com::Vmware::Vapi::Std::Errors::ServiceUnavailable | if the system is unable to communicate with a service to complete the request.
  Com::Vmware::Vapi::Std::Errors::Unauthenticated | if the user can not be authenticated.
  Com::Vmware::Vapi::Std::Errors::Unauthorized | if the user doesn't have the required privileges.

Code:
click to view
# Number of lines of code in get: 10
sub get {
my ($self, %args) = @_;
my $vm = $args {vm};
$self->validate_args (method_name => 'get',
method_args => \%args);
return $self->invoke (method_name => 'get',
method_args => \%args);
}

public method Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::new | ( |  | ) |

Constructor to initialize the object

Parameters

  api_provider | - protocol connection to use with stubs created by this factory
  StubConfig | - Stub's additional configuration

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 11
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $stub_config = $args {stub_config};
my $api_provider = $args {api_provider};
my $self = $class->SUPER::new('stub_config' => $stub_config,
'api_provider' => $api_provider);
bless $self, $class;
return $self;
}

public method Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::set | ( |  | ) |

Sets the virtual devices that will be used to boot the virtual machine. The virtual machine will check the devices in order, attempting to boot from each, until the virtual machine boots successfully. If the list is empty, the virtual machine will use a default boot sequence. There should be no more than one instance of class Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Entry for a given device type except :attr:`Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Type.ETHERNET` in the list .

Parameters

  vm | [REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
  devices | [REQUIRED] Ordered list of boot devices. . The value must be Array of Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Entry.

Exceptions

  Com::Vmware::Vapi::Std::Errors::Error | if the system reports an error while responding to the request.
  Com::Vmware::Vapi::Std::Errors::NotFound | if the virtual machine is not found, or if any of the specified virtual devices is not found.
  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if a any of the CDROM, DISK, ETHERNET, FLOPPY values appears in more than one `Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Entry` with the exception of :attr:`Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Type.ETHERNET` , which may appear multiple times if the virtual machine has been configured with multiple Ethernet adapters.
  Com::Vmware::Vapi::Std::Errors::ResourceBusy | if the virtual machine is busy performing another operation.
  Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if the virtual machine's configuration state cannot be accessed.
  Com::Vmware::Vapi::Std::Errors::ServiceUnavailable | if the system is unable to communicate with a service to complete the request.
  Com::Vmware::Vapi::Std::Errors::Unauthenticated | if the user can not be authenticated.
  Com::Vmware::Vapi::Std::Errors::Unauthorized | if the user doesn't have the required privileges.

Code:
click to view
# Number of lines of code in set: 11
sub set {
my ($self, %args) = @_;
my $vm = $args {vm};
my $devices = $args {devices};
$self->validate_args (method_name => 'set',
method_args => \%args);
return $self->invoke (method_name => 'set',
method_args => \%args);
}

The documentation for this class was generated from the following file:

- Com/Vmware/Vcenter/Vm/Hardware/Boot/Device.pm