Ravada(3)

๐Ÿ“ฆ
version 2.4.1 ยท 2 versions
, in fedora 43

โœจ NAME โœจ

okay so bestie, meet Ravada โ€” the Remote Virtual Desktop Manager ๐Ÿ’–. She's a Perl module (that's why she's chillin' in section 3, the User Contributed Perl Documentation corner of the manual universe), and she runs the whole virtual desktop situation. Remote desktops? Managed. Domains? Managed. Vibes? Immaculate. ๐Ÿ‘‘


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

the little "hello world" of it all, fr fr:

  use Ravada;

  my $ravada = Ravada->new()

that's it, that's the whole entry point. you use her, you new her, and now you have a $ravada object that does literally everything below ๐Ÿ’…


๐Ÿ› ๏ธ BUILD ๐Ÿ› ๏ธ

Internal constructor. that's it, that's the whole thing โ€” she's internal, meaning she's not for you to poke at directly, she just does the constructing behind the scenes. let her cook. ๐Ÿ™ˆ


๐ŸŒธ display_ip ๐ŸŒธ

Returns the default display IP read from the config file. like, she went into the config, grabbed the default display IP, and is handing it to you. iconic behavior. โœจ


๐ŸŒˆ nat_ip ๐ŸŒˆ

Returns the IP for NATed environments. NAT girlies, this one's for you ๐Ÿซถ


๐Ÿ’œ disconnect_vm ๐Ÿ’œ

Disconnect all the Virtual Managers connections. every single one. not some. all. it's giving "everyone out of the pool" ๐ŸŠ


๐Ÿฆ‹ create_domain ๐Ÿฆ‹

Creates a new domain based on an ISO image or another domain. two flavors, pick your fighter:

  my $domain = $ravada->create_domain(
         name => $name
    , id_iso => 1
  );

  my $domain = $ravada->create_domain(
         name => $name
    , id_base => 3
  );

so either you're spawning from an ISO (id_iso), or you're spawning from a base domain (id_base). either way you get a $domain back ๐ŸŽ


๐Ÿ“ remove_domain ๐Ÿ“

Removes a domain. bye bestie ๐Ÿ‘‹

  $ravada->remove_domain($name);

โญ search_domain โญ

  my $domain = $ravada->search_domain($name);

goes and finds your domain by $name and hands it back.


๐Ÿงš search_domain_by_id ๐Ÿงš

  my $domain = $ravada->search_domain_by_id($id);

same energy, except you're searching by $id instead of by name. iykyk.


๐Ÿ‘‘ list_vms ๐Ÿ‘‘

List all the Virtual Machine Managers. the whole roster, no filter, no gatekeeping.


๐Ÿ”ฅ list_domains ๐Ÿ”ฅ

List all created domains:

  my @list = $ravada->list_domains();

and here's the fun part โ€” this list can be filtered ๐Ÿ˜:

  my @active = $ravada->list_domains(active => 1);
  my @inactive = $ravada->list_domains(active => 0);

  my @user_domains = $ravada->list_domains(user => $id_user);

  my @user_active = $ravada->list_domains(user => $id_user, active => 1);

active => 1 for the ones that are up, active => 0 for the ones that are napping ๐Ÿ˜ด, user => $id_user to scope it to one user, and you can absolutely stack them together like the last one. mix and match, she's flexible. ๐Ÿ’…


๐Ÿ’– list_domains_data ๐Ÿ’–

List all domains in raw format. Returns a list of id => { name , id , is_active , is_base }.

  my @list = $ravada->list_domains_data();

  $c->render(json => @list);

raw data in, JSON out. perfect for yeeting straight into a render call ๐Ÿ“ค


๐ŸŒŸ list_bases ๐ŸŒŸ

List all base domains.

  my @list = $ravada->list_domains();

(yes bestie, the example literally calls list_domains(). we're just relaying the lore exactly as it's written, no editing the source ๐Ÿ’€)


๐ŸŽ€ list_bases_data ๐ŸŽ€

List information about the bases. the data-flavored sibling of list_bases ๐Ÿ’


๐Ÿ’ซ list_images ๐Ÿ’ซ

List all ISO images. every single one.


๐Ÿซถ list_images_data ๐Ÿซถ

List information about the images. and she's showing her whole implementation here, no secrets between us:

  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; }

๐ŸŒบ remove_volume ๐ŸŒบ

  $ravada->remove_volume($file);

takes that $file and removes the volume. gone. poof. ๐Ÿซง


๐Ÿงผ clean_old_requests ๐Ÿงผ

Before processing requests, old requests must be cleaned. hygiene check first, always. you don't process on top of old mess, that's not the vibe. โœจ


โšก process_requests โšก

This is run in the ravada backend. It processes the commands requested by the frontend. (frontend asks, backend does โ€” classic split, main character energy from both sides ๐Ÿ‘‘)

  $ravada->process_requests();

๐Ÿข process_long_requests ๐Ÿข

Process requests that take long time. It will fork on each one. so yeah, each long request gets its own little process baby, they don't block each other ๐ŸŒฑ


๐ŸŒˆ process_all_requests ๐ŸŒˆ

Process all the requests โ€” long and short. the full sweep.


๐Ÿ”” process_priority_requests ๐Ÿ””

Process all the priority requests โ€” long and short. jump the line, bestie, you're important ๐Ÿ’…


๐Ÿงฎ list_vm_types ๐Ÿงฎ

Returns a list of the types of Virtual Machines available on this system. she'll tell you exactly what this machine can spin up.


๐Ÿšช open_vm ๐Ÿšช

Opens a VM of a given type:

  my $vm = $ravada->open_vm('KVM');

hand her a type, she hands you a $vm. simple as that ๐ŸŽ


๐Ÿ” search_vm ๐Ÿ”

Searches for a VM of a given type:

  my $vm = $ravada->search_vm('kvm');

same idea as open_vm, but she's searching for it instead. lowercase 'kvm' in this example, because that's exactly what the page says and we do not alter the sacred text ๐Ÿ“œ


๐Ÿ’œ vm ๐Ÿ’œ

Returns the list of Virtual Managers.


๐Ÿ“ฅ import_domain ๐Ÿ“ฅ

Imports a domain in Ravada:

    my $domain = $ravada->import_domain(
                            vm => 'KVM'
                            ,name => $name
                            ,user => $user_name
                            ,spinoff_disks => 1
    );

you tell her which vm ('KVM' here), the name, the user, and whether to spinoff_disks => 1, and she imports that domain straight into Ravada. welcome home ๐Ÿก


๐Ÿž set_debug_value ๐Ÿž

Sets debug global variable from setting. debug mode: activated ๐Ÿ”


โš™๏ธ setting โš™๏ธ

Returns the value of a configuration setting. ask her about a setting, she tells you what it's set to. no guessing required ๐Ÿ’


๐Ÿ’พ restore_backup ๐Ÿ’พ

Restores a virtual machine from a backup file. your "oh no" insurance policy, and she's got you ๐Ÿซ‚


๐Ÿท๏ธ version ๐Ÿท๏ธ

Returns the version of the module. always good to know which era of Ravada you're living in โณ


๐Ÿ‘ฉโ€๐Ÿ’ป AUTHOR ๐Ÿ‘ฉโ€๐Ÿ’ป

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

shoutout to the author, absolute legend, thank you for your service ๐Ÿซก๐Ÿ’–


๐Ÿ”— SEE ALSO ๐Ÿ”—

  • Sys::Virt โ€” the related module, go read her too

and that's the whole page, bestie! this documentation shipped as perl v5.42.0, dated 2025-09-20, in the classic Ravada(3) manual page format ๐Ÿ’…โœจ now go forth and manage some remote virtual desktops, you've got this ๐Ÿฆ‹๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from