Sys::Virt - interface to libvirt virtual machine management API
The Sys::Virt::Domain module represents a guest domain managed by the virtual machine monitor.
Sys::Virt::Domain
Returns an integer with a locally unique identifier for the domain.
Returns a 16 byte long string containing the raw globally unique identifier (UUID) for the domain.
Returns a printable string representation of the raw UUID, in the format 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'.
Returns a string with a locally unique name of the domain
Returns an XML document containing a complete description of the domain's configuration
Returns a string containing the name of the OS type running within the domain.
Temporarily stop execution of the domain, allowing later continuation by calling the resume method.
resume
Resume execution of a domain previously halted with the suspend method.
suspend
Take a snapshot of the domain's state and save the information to the file named in the $filename parameter. The domain can later be restored from this file with the restore_domain method on the Sys::Virt object.
$filename
restore_domain
Immediately terminate the machine, and remove it from the virtual machine monitor. The $dom handle is invalid after this call completes and should not be used again.
$dom
Returns a hash reference summarising the execution state of the domain. The elements of the hash ar
The maximum memory allowed for this domain, in kilobytes
The current memory allocated to the domain in kilobytes
The current number of virtual CPUs enabled in the domain
The execution state of the machine, which will be one of the constants &Sys::Virt::Domain::STATE_*.
Set the maximum memory for the domain to the value $mem. The value of the $mem parameter is specified in kilobytes
$mem
Returns the current maximum memory allowed for this domain in kilobytes.
Request that the guest OS perform a gracefull shutdown and poweroff.
Request that the guest OS perform a gracefull shutdown and optionally restart. The $flags parameter determines how the domain restarts (if at all). It should be one of the constants &Sys::Virt::Domain::REBOOT_* listed later in this document.
$flags
The first set of constants enumerate the possible machine runtime states, returned by the get_info method.
get_info
The domain is active, but is not running / blocked (eg idle)
The domain is active and running
The domain is active, but execution is blocked
The domain is active, but execution has been paused
The domain is active, but in the shutdown phase
The domain is inactive, and shut down.
The domain is inactive, and crashed.
The next set of constants enumerate the different flags which can be passed when requesting a reboot.
Destroy the domain, rather than restarting the domain
Restart the domain after shutdown is complete
Leave the domain inactive after shutdown is complete
Restart the domain under a different (automatically generated) name after shutdown is complete
Daniel P. Berrange <berrange@redhat.com>
Copyright (C) 2006 Red Hat
Sys::Virt is distributed under the terms of the GPLv2 or later
Sys::Virt, Sys::Virt::Error, http://libvirt.org
http://libvirt.org
To install Sys::Virt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sys::Virt
CPAN shell
perl -MCPAN -e shell install Sys::Virt
For more information on module installation, please visit the detailed CPAN module installation guide.