Ravada::Request(3)
๐ NAME ๐
Ravada::Request โ the requests library for Ravada, bestie. This is the whole Ravada::Request(3) situation, straight out of the User Contributed Perl Documentation corner of the perl world. โจ
You use this to request a command to the ravada backend. That's the whole vibe: you make a request object, the backend does the thing. ๐ซถ
๐ธ BUILD ๐ธ
Internal object builder, do not call. Like, i'm serious. It's giving "staff only" door. ๐
๐ฆ open ๐ฆ
Opens the information of a previous request by id. ๐
my $req = Ravada::Request->open($id);
โจ info โจ
Returns information of the request. That's it, that's the whole job. ๐
๐ create_domain ๐
my $req = Ravada::Request->create_domain(
name => 'bla'
, id_iso => 1
);
๐ remove_domain ๐
my $req = Ravada::Request->remove_domain(
name => 'bla'
, uid => $user->id
);
๐ฅ start_domain ๐ฅ
Requests to start a domain. Let's go, main character energy. ๐
my $req = Ravada::Request->start_domain(
name => 'name'
, uid => $user->id
);
Mandatory arguments โ one of those must be passed:
nameorid_domainuid: user idremote_ip: [optional] IP of the remote client that requested to start the domain
๐ start_clones ๐
Requests to start the clones of a base. One base, many clones, iconic behaviour fr fr. โจ
my $req = Ravada::Request->start_clones( name => 'name', uid => $user->id );
๐ฆ pause_domain ๐ฆ
Requests to pause a domain. Time for a little nap bestie ๐ด
my $req = Ravada::Request->pause_domain( name => 'name', uid => $user->id );
๐ resume_domain ๐
Requests to pause a domain. yes, the doc literally says "pause" here โ i'm just the messenger, i don't make the rules ๐
my $req = Ravada::Request->resume_domain( name => 'name', uid => $user->id );
๐ force_shutdown_domain ๐
Requests to stop a domain now ! No waiting, no soft exit, no "give me a sec". Straight to the point. โก
my $req = Ravada::Request->force_shutdown_domain( name => 'name' , uid => $user->id );
๐ธ shutdown_domain ๐ธ
Requests to stop a domain. The gentle version. ๐ซถ
my $req = Ravada::Request->shutdown_domain( name => 'name' , uid => $user->id );
my $req = Ravada::Request->shutdown_domain( name => 'name' , uid => $user->id
,timeout => $timeout );
๐ force_reboot_domain ๐
Requests to stop a domain now ! (same one-liner as force_shutdown_domain, copy-paste era, we've all been there ๐ญ)
my $req = Ravada::Request->force_reboot_domain( name => 'name' , uid => $user->id );
๐ reboot_domain ๐
Requests to reboot a domain. Round two, but make it scheduled. ๐
my $req = Ravada::Request->reboot_domain( name => 'name' , uid => $user->id );
my $req = Ravada::Request->reboot_domain( name => 'name' , uid => $user->id
,timeout => $timeout );
โญ new_request โญ
Creates a new request. Fresh out of the box, no cap. ๐ฆ
$req = Ravada::Request->new_request(
start_domain
,uid => $user->id
,id_domain => $domain->id
);
๐ lock_domain ๐
Checks if that request belongs to a virtual machine and sets it as locked. Nobody touch it, it's busy. ๐
๐ unlock_domain ๐
Checks if that request belongs to a virtual machine and unlocks it. Free at last. ๐ฆ
๐ status ๐
Returns or sets the status of a request.
$req->status('done');
my $status = $req->status();
โฐ at โฐ
Sets the time when the request will be scheduled. Future plans, we love to see it. โจ
๐ result ๐
Returns the result of the request if any.
my $result = $req->result;
๐ command ๐
Returns the requested command.
๐ args ๐
Returns the requested command. (yes bestie, the doc says "command" here too, and yes, there's another args further down โ keep scrolling ๐)
my $command = $req->command;
๐ args ๐
Returns the arguments of a request or the value of one argument field. Two ways to ask, both valid. ๐
my $args = $request->args();
print $args->{name};
print $request->args('name');
๐ arg ๐
Sets or gets the value of an argument of a Request.
๐ง defined_arg ๐ง
Returns if an argument is defined. Existence check, we love a boundary. โจ
๐ธ copy_screenshot ๐ธ
Request to copy a screenshot from a domain to another. Say cheese. ๐ง
๐ set_base_vm ๐
Enables a base in a Virtual Manager.
๐ remove_base_vm ๐
Disables a base in a Virtual Manager.
๐ฆ type ๐ฆ
Returns the type of the request.
๐ข count_requests ๐ข
Returns the number of working requests of the same type. Counting bestie, we're counting. ๐งฎ
my $n = $request->working_requests();
๐ง requests_limit ๐ง
Returns the limit of requests of a type.
๐ domain_autostart ๐
Sets the autostart flag on a domain. Up and running before you even get there. โจ
โ ๏ธ autostart_domain โ ๏ธ
Deprecated for domain_autostart. Old name, new name, use the new one. ๐
๐ enforce_limits ๐
Enforces virtual machine limits, ie: an user can only run one virtual machine at a time, so the older ones are shut down. The limit is the limit, periodt. ๐
my $req = Ravada::Request->enforce_limits(
timeout => $timeout
);
Arguments:
timeout: seconds that are given to a virtual machine to shutdown itself. After this time, it gets powered off. Defaults to 120 seconds.
It is advisable configure virtual machines so they shut down easily if asked to. Just a few hints:
- install ACPI services
- Set default action for power off to shutdown, do not ask the user
๐ refresh_machine ๐
Refresh a machine information. Glow-up, but for data. โจ
๐ฐ๏ธ done_recently ๐ฐ๏ธ
Returns whether this command has been requested successfully recently. ๐
if ($request->done_recently($seconds)) {
... skips work ...
} else {
... does work ...
}
This method is used for commands that take long to run as garbage collection.
๐ stop ๐
Stops a request killing the process. Killing the process! Dramatic but correct. ๐
$request->stop();
โญ priority โญ
Returns the priority of the request.
โ requirements_done โ
Returns whether a request requirements have been fulfilled.
ie when a request must execute after another request completes.
๐ redo ๐
Set the request to be executed again. Round two, bestie. ๐ฆ
๐งน remove ๐งน
Remove all requests that comply with the conditions. Clean sweep, very satisfying. โจ
๐ซ refresh ๐ซ
Refresh request status and data. Vibe check, but for a request. ๐ซถ
๐ POD ERRORS ๐
Hey! The above document had some coding errors, which are explained below:
Around line 1679:
You forgot a '=back' before '=head2'
not me calling out the doc's own typos ๐ญ it's fine, we still love it
and that's the whole page bestie!! ๐ this one shipped as perl v5.42.0, dated 2025-09-20 โ write that in your notes, it's part of the lore. ๐โจ๐ฆ๐๐ธ๐ ๐ซถ๐๐โญ๐
๐ฆ where this page comes from
- fedora 43: ravada 2.4.1-1.fc43 ยท AGPL-3.0-only AND Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms