Ravada - Remove Virtual Desktop Manager
use Ravada; my $ravada = Ravada->new()
Internal constructor
Returns the default display IP read from the config file
Disconnect all the Virtual Managers connections.
Creates a new domain based on an ISO image or another domain.
my $domain = $ravada->create_domain( name => $name , id_iso => 1 ); my $domain = $ravada->create_domain( name => $name , id_base => 3 );
Removes a domain
$ravada->remove_domain($name);
my $domain = $ravada->search_domain($name);
my $domain = $ravada->search_domain_by_id($id);
List all created domains
my @list = $ravada->list_domains();
List all domains in raw format. Return a list of id => { name , id , is_active , is_base }
my $list = $ravada->list_domains_data(); $c->render(json => $list);
List all base domains
my @list = $ravada->list_domains();
List information about the bases
List all ISO images
List information about the images
sub _list_images_lxc { my $self = shift; my @domains; my $sth = $CONNECTOR->dbh->prepare( "SELECT * FROM lxc_templates ORDER BY name" ); $sth->execute; while (my $row = $sth->fetchrow_hashref) { push @domains,($row); } $sth->finish; return @domains; }
sub _list_images_data_lxc { my $self = shift; my @data; for ($self->list_images_lxc ) { push @data,{ id => $_->{id} , name => $_->{name} }; } return \@data; }
$ravada->remove_volume($file);
Before processing requests, old killed requests must be cleaned.
This is run in the ravada backend. It processes the commands requested by the fronted
$ravada->process_requests();
Process requests that take log time. It will fork on each one
Process all the requests, long and short
Returnsa list ofthe types of Virtual Machines available on this system
Opens a VM of a given type
my $vm = $ravada->open_vm('KVM');
Searches for a VM of a given type
my $vm = $ravada->search_vm('kvm');
Imports a domain in Ravada
my $domain = $ravada->import_domain( vm => 'KVM' ,name => $name ,user => $user_name );
Returns the version of the module
Francesc Guasch-Ortiz , frankie@telecos.upc.edu
Sys::Virt