2

I want to only install the packages that provide virsh to create and manage KVM virtual machines. What do I need to install, what do I need not install to skip the GUI elements?

For the record, I want to run them headless. KVM displays the VMs' visual output using VNC transmitting on certain ports. It would be great if someone could tell me how to know and control what those ports are.

Oxwivi
  • 17,849

2 Answers2

5

virsh is provided by the package libvirt-bin. If you type

virshENTER

on the command line, Ubuntu tells you the package name and how to install it:

sudo apt-get install libvirt-bin python-libvirt

This does not seem to depend on GUI stuff. python-libvirt makes it easy to install KVM guests as opposed to directly editing virsh's XML machine configuration to create them. Refer to man python-libvirt for more info.

Oxwivi
  • 17,849
Jan
  • 3,598
0

You can run VMs totally headless, but then you need to set up the guest OS to use serial console. Recent QEMU versions (post-0.14) can also route BIOS output to serial console.

See also https://bugs.launchpad.net/ubuntu/+source/vm-builder/+bug/302880