NAME
Net::Gandi::Hosting::VM - Interface to manage VM.
DESCRIPTION
A VM (Virtual Machine) describes a server’s resources and state.
vm_list
Returns the list of VMs associated with apikey, matched by filters, if specified.
Available params are:
id
memory
state
shares
hostname
cores
datacenter_id
items_per_page
page
sort_by
vm_count
Returns the number of VMs associated with apikey, matched by filters, if specified.
Available params are:
id
memory
state
shares
hostname
cores
datacenter_id
vm_info
Return a mapping of the VM attributes.
Parameter: None
use Net::Gandi;
my $vm = Net::Gandi::Hosting::VM->new( apikey => 'myapikey', id => 42 );
my $info = $vm->vm_info;
vm_create
Creates a VM and returns the corresponding operations.
vm_create_from
Creates a Disk, and then, a VM, and returns the corresponding operations. It combines the API method disk.create, and vm.create. This is a convenient method to do the disk.create and vm.create in a single API call. Three operations are created and returned (in this order): disk_create, iface_create, vm_create
vm_update
Updates a VM.
vm_disk_attach
Attach a disk to a VM. The account associated with apikey MUST own both VM and disk. A disk can only be attached to one VM.
vm_disk_detach
Detach a disk from a VM. The disk MUST not be mounted on the VM. If the disk position is 0, the VM MUST be halted to detach the disk
Params: disk_id
vm_start
Starts a VM and return the corresponding operation Parameter: None
vm_stop
Stops a VM and returns the corresponding operation. Parameter: None
vm_reboot
Reboots a VM and returns the corresponding operation Parameter: None
Deletes a VM. Deletes the disk attached in position 0, the disk used as system disk. Also deletes the first network interface. Detach all extra disks and network interfaces. Parameter: None
AUTHOR
Natal Ngétal, <hobbestig@cpan.org>
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 14:
Non-ASCII character seen before =encoding in 'server’s'. Assuming UTF-8