1Ravada(3)             User Contributed Perl Documentation            Ravada(3)
2
3
4

NAME

6       Ravada - Remote Virtual Desktop Manager
7

SYNOPSIS

9         use Ravada;
10
11         my $ravada = Ravada->new()
12
13   BUILD
14       Internal constructor
15
16   display_ip
17       Returns the default display IP read from the config file
18
19   nat_ip
20       Returns the IP for NATed environments
21
22   disconnect_vm
23       Disconnect all the Virtual Managers connections.
24
25   create_domain
26       Creates a new domain based on an ISO image or another domain.
27
28         my $domain = $ravada->create_domain(
29                name => $name
30           , id_iso => 1
31         );
32
33
34         my $domain = $ravada->create_domain(
35                name => $name
36           , id_base => 3
37         );
38
39   remove_domain
40       Removes a domain
41
42         $ravada->remove_domain($name);
43
44   search_domain
45         my $domain = $ravada->search_domain($name);
46
47   search_domain_by_id
48         my $domain = $ravada->search_domain_by_id($id);
49
50   list_vms
51       List all the Virtual Machine Managers
52
53   list_domains
54       List all created domains
55
56         my @list = $ravada->list_domains();
57
58       This list can be filtered:
59
60         my @active = $ravada->list_domains(active => 1);
61         my @inactive = $ravada->list_domains(active => 0);
62
63         my @user_domains = $ravada->list_domains(user => $id_user);
64
65         my @user_active = $ravada->list_domains(user => $id_user, active => 1);
66
67   list_domains_data
68       List all domains in raw format. Return a list of id => { name , id ,
69       is_active , is_base }
70
71          my @list = $ravada->list_domains_data();
72
73          $c->render(json => @list);
74
75   list_bases
76       List all base domains
77
78         my @list = $ravada->list_domains();
79
80   list_bases_data
81       List information about the bases
82
83   list_images
84       List all ISO images
85
86   list_images_data
87       List information about the images
88
89       sub _list_images_lxc {
90           my $self = shift;
91           my @domains;
92           my $sth = $CONNECTOR->dbh->prepare(
93               "SELECT * FROM lxc_templates ORDER BY name"
94           );
95           $sth->execute;
96           while (my $row = $sth->fetchrow_hashref) {
97               push @domains,($row);
98           }
99           $sth->finish;
100           return @domains; }
101
102       sub _list_images_data_lxc {
103           my $self = shift;
104           my @data;
105           for ($self->list_images_lxc ) {
106               push @data,{ id => $_->{id} , name => $_->{name} };
107           }
108           return \@data; }
109
110   remove_volume
111         $ravada->remove_volume($file);
112
113   clean_old_requests
114       Before processing requests, old requests must be cleaned.
115
116   process_requests
117       This is run in the ravada backend. It processes the commands requested
118       by the fronted
119
120         $ravada->process_requests();
121
122   process_long_requests
123       Process requests that take log time. It will fork on each one
124
125   process_all_requests
126       Process all the requests, long and short
127
128   process_priority_requests
129       Process all the priority requests, long and short
130
131   list_vm_types
132       Returnsa list ofthe types of Virtual Machines available on this system
133
134   open_vm
135       Opens a VM of a given type
136
137         my $vm = $ravada->open_vm('KVM');
138
139   search_vm
140       Searches for a VM of a given type
141
142         my $vm = $ravada->search_vm('kvm');
143
144   vm
145       Returns the list of Virtual Managers
146
147   import_domain
148       Imports a domain in Ravada
149
150           my $domain = $ravada->import_domain(
151                                   vm => 'KVM'
152                                   ,name => $name
153                                   ,user => $user_name
154                                   ,spinoff_disks => 1
155           );
156
157   set_debug_value
158       Sets debug global variable from setting
159
160   setting
161       Returns the value of a configuration setting
162
163   restore_backup
164         Restores a virtual machine from a backup file
165
166   version
167       Returns the version of the module
168

AUTHOR

170       Francesc Guasch-Ortiz    , frankie@telecos.upc.edu
171

SEE ALSO

173       Sys::Virt
174
175
176
177perl v5.36.0                      2023-03-19                         Ravada(3)
Impressum