Rex::Vi...LibVirt(3)

πŸ“¦ version 1.14.3, in nixos 26.05, nixpkgs unstable

πŸ’– Rex::Virtualization::LibVirt(3) πŸ’–

okay bestie so you're reading a User Contributed Perl Documentation page for Rex::Vi...LibVirt(3) and honestly? you're about to have a lovely time πŸ’…


πŸ¦‹ NAME πŸ¦‹

Rex::Virtualization::LibVirt β€” the LibVirt Virtualization Module, aka your new fave little helper πŸŽ€


🌸 DESCRIPTION 🌸

With this module you can manage LibVirt. that's it, that's the whole vibe ✨ it's giving "small but mighty" and we're obsessed fr fr πŸ‘‘


✨ SYNOPSIS ✨

okay so here's the whole mood board of what you can do, literally copy-paste energy 🫢

use Rex::Commands::Virtualization;

set virtualization => "LibVirt";

print Dumper vm list => "all";
print Dumper vm list => "running";

vm destroy => "vm01";

vm delete => "vm01";

vm start => "vm01";

vm shutdown => "vm01";

vm reboot => "vm01";

vm option => "vm01",
      max_memory => 1024*1024,
      memory    => 512*1024;

print Dumper vm info => "vm01";

# creating a vm on a kvm host
vm create => "vm01",
   storage    => [
     {
       file  => "/mnt/data/libvirt/images/vm01.img",
       dev   => "vda",
     }
   ];

print Dumper vm hypervisor => "capabilities";

like… look at that. vm list => "all", vm list => "running", vm destroy => "vm01", vm delete => "vm01", vm start => "vm01", vm shutdown => "vm01", vm reboot => "vm01" β€” the whole lifecycle is right there, no cap πŸ”₯

then vm option => "vm01" with max_memory => 1024*1024 and memory => 512*1024, and print Dumper vm info => "vm01" when you wanna peek πŸ‘€

and for the kvm-host girlies, creating a vm is literally this:

vm create => "vm01",
   storage    => [
     {
       file  => "/mnt/data/libvirt/images/vm01.img",
       dev   => "vda",
     }
   ];

finally print Dumper vm hypervisor => "capabilities"; when you just gotta know what your hypervisor is serving πŸ’€βœ¨


πŸ’œ reminder bestie: the code blocks above are verbatim, so don't go "fixing" the formatting, it's iconic as-is πŸŽ€

🌈 sign-off 🌈

and that's the page!! this little gem was rendered by perl v5.42.3 on 2023-08-05 β€” go off, vintage queen πŸ‘‘πŸ«Ά

now go manage some LibVirt, slay, and hydrate πŸ’–πŸ§šβ­

πŸ“¦ where this page comes from