I use vmware and qemu

  • CosmicTurtle0@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 months ago

    How “scriptable” is virt-manager?

    My biggest issue with VirtualBox is that I have to install OSes as if I’m actually installing them. There aren’t any images (at least that I’m aware of) that can run with a command, like deploying an EC2.

    • Skull giver@popplesburger.hilciferous.nl
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      3 months ago

      virt-manager is a frontend for a bunch of virtualisation systems, but usually it’s configured for qemu+kvm+libvirt.

      Libvirt is a dedicated API to managing virtual machines. It’s probably most versatile when launching new VMs on it by using the libvirt XML definitions, but there’s an API you can use if you want more low level access, and optional command line tooling as well.

      Something like virt-install --name=lemmyvm --vcpus=1 --memory=2048 --cdrom=/tmp/debian-netinst.iso --disk size=50 --os-variant=debian12 should automatically install a Debian 12 VM (from a downloaded ISO) through the automated setup process. It’s been a while since I used that, though, so you may need an extra step or two to get the setup to autocomplete today. I think cloudinit is how you auto setup Linux distros these days?

    • Alex@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      3 months ago

      Virt-manager isn’t super scriptable but the underlying libvirt can be controlled by virsh which is a shell interface to libvirt. You can use both at the same time, e.g. start and stop via virsh and access to gui container via virt-manager/virt-viewer.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      3 months ago

      Virtual manager isn’t scriptable at all as it is just a GUI for libvirt. You are probably looking for qemu or virsh (libvirt)