Sys::Virt::DomainSnapshot - Represent & manage a libvirt guest
domain
The "Sys::Virt::DomainSnapshot"
module represents a guest domain managed by the virtual machine monitor.
- my $str =
$domss->get_name()
- Return the name of the snapshot
- my $xml =
$domss->get_xml_description($flags)
- Returns an XML document containing a complete description of the domain
snapshot's configuration. The $flags parameter
accepts the following constants
- $domss->delete($flags)
- Deletes this snapshot object & its data. The optional
$flags parameter controls what should be deleted
via the
"Sys::Virt::DomainSnapshot::DELETE_*"
constants.
- $domss->revert_to($flags)
- Revert the domain to the state associated with this snapshot. The optional
$flags control the state of the VM after the
revert via the
"Sys::Virt::DomainSnapshot::REVERT_*"
constants.
- $parentss = $domss->get_parent();
- Return the parent of the snapshot, if any
- $res = $domss->is_current()
- Returns a true value if this is the current snapshot. False
otherwise.
- $res = $domss->has_metadata()
- Returns a true value if this snapshot has metadata associated with
it.
- $count = $domss->num_of_child_snapshots()
- Return the number of saved snapshots which are children of this
snapshot
- @names = $domss->list_child_snapshot_names()
- List the names of all saved snapshots which are children of this snapshot
. The names can be used with the
"lookup_snapshot_by_name"
- @snapshots = $domss->list_child_snapshots()
- Return a list of all snapshots that are children of this snapshot. The
elements in the returned list are instances of the
Sys::Virt::DomainSnapshot class. This method requires O(n) RPC calls, so
the "list_all_children" method is
recommended as a more efficient alternative.
- my @snapshots =
$domss->list_all_children($flags)
- Return a list of all domain snapshots that are children of this snapshot.
The elements in the returned list are instances of the
Sys::Virt::DomainSnapshot class. The $flags
parameter can be used to filter the list of return domain snapshots.
Daniel P. Berrange <berrange@redhat.com>
Copyright (C) 2006 Red Hat Copyright (C) 2006-2007 Daniel P.
Berrange
This program is free software; you can redistribute it and/or
modify it under the terms of either the GNU General Public License as
published by the Free Software Foundation (either version 2 of the License,
or at your option any later version), or, the Artistic License, as specified
in the Perl README file.
Sys::Virt, Sys::Virt::Error,
"http://libvirt.org"