« Previous - Version 8/15 (diff) - Next » - Current version
Ohad Levy, 05/11/2011 06:58 am


Virtual Machine Provisioning

Libvirt

As of version 0.2, Foreman provides an interface to build virtual guests using libvirtd, in order to use it, make sure you have:

Requirements

  1. The ruby libvirtd binding (the libvirt-ruby package on Ubuntu or ruby-libvirt package on RHEL)
  2. Foreman needs to be able to access libvirtd, this depends on how you communicate with libvirt, for exmaple, if you use qemu+ssh protocol, then the foreman user needs to be able to ssh to the hypervisor(the physical machine) and that user needs to be in the libvirt group.
  3. Configure the hypervisor under the settings tab

Now you should see hypervisor options when creating a new node.

Notes

  1. it has been mostly tested on KVM.
  2. You should already have a network bridge and a storage pool configured on your hypervisor
  3. at the moment, you are required to have a storage group called "default" - until #720 is resolved.
  4. on systems that don't support netcf (such as Ubuntu), it is not possible to show the list of allowed interfaces, and its a free text field (you need to provide the interface bridge name or internal NAT network name)

ruby-libvirt RPMS for RHEL/CentOS can be found here (until they will be accepted into EPEL)

RHEL5.6+ - http://koji.fedoraproject.org/koji/buildinfo?buildID=215002
RHEL6 - http://koji.fedoraproject.org/koji/buildinfo?buildID=215016

For older version of RHEL5 you may use the following RPM

Note that a foreman restart would be required if you install the rpm for the first time.

As of foreman 0.3 it is now possible to browse though your virtual machines, stop / start destroy etc, under the hypervisor page

Also available in: HTML TXT