Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.