Rex::Box::KVM(3pm)
β¨ Rex::Box::KVM β¨
okay bestie, so this page is Rex::Box::KVM, which lives in the User Contributed Perl Documentation corner of your man pages, and it's literally the KVM module for Rex/Boxes π
π NAME π
Rex::Box::KVM β the Rex/Boxes KVM Module. that's it, that's the name, short n sweet, she's giving minimalism π
πΈ DESCRIPTION πΈ
so this is a Rex/Boxes module that lets you use KVM VMs π₯οΈβ¨ and here's the important part, no cap: you need to have libvirt installed. like, you can't skip that step, it's the whole vibe, libvirt is the main character and you're just showing up for her π«Ά
π¦ EXAMPLES π¦
kay so to use this module inside your Rexfile you can run these commands, periodt:
use Rex::Commands::Box;
set box => "KVM";
task "prepare_box", sub {
box {
my ($box) = @_;
$box->name("mybox");
$box->url("http://box.rexify.org/box/ubuntu-server-12.10-amd64.kvm.qcow2");
$box->network(1 => {
name => "default",
});
$box->auth(
user => "root",
password => "box",
);
$box->setup("setup_task");
};
};
and if you're more of a YAML girlie (valid, iconic, same energy) you can use this template:
type: KVM
vms:
vmone:
url: http://box.rexify.org/box/ubuntu-server-12.10-amd64.kvm.qcow2
setup: setup_task
and then you just use it like this in your Rexfile, super simple:
use Rex::Commands::Box init_file => "file.yml";
task "prepare_vms", sub {
boxes "init";
};
like?? it's giving effortless ππ
π METHODS π
also pls pls pls go look at the Methods of Rex::Box::Base β this module inherits all methods of it, so everything in there is yours too, it's the family package deal fr fr π«Άβ¨
π new(name => $vmname)
the constructor, used when you're in OO mode:
my $box = Rex::Box::KVM->new(name => "vmname");
she's born π
π memory($memory_size)
sets the memory of a VM, measured in megabyte. yeah. megabytes. don't come at me, that's what it says π
β info
returns a hashRef of vm information. that's the tea, she's gossipy, she tells you everything π«Ά
π§ ip
this method returns the ip of a vm on which the ssh daemon is listening. so like, that's the ip you actually want, the one that answers when you knock π₯
ngl bestie the only rule here is libvirt or it's over, everything else is smooth sailing π
okay that's the whole page!! this was perl v5.40.1, dated 2025-10-03, and the source doc is Rex::Box::KVM(3pm) π mwah, go build some VMs, you ate πβ¨
π¦ where this page comes from
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms