There are two ways to deploy Ubuntu imported ISOs using cobbler.
PXE booting: The usual method to deploy Ubuntu machines, both bare-metal installations and Virtual Machines in KVM.
koan: Helper cobbler program that helps with the deployment of Virtual Machines in any host where it is installed.
Deploying via PXE
In order to be able to deploy via PXE boot, we need to take into consideration the existence of a DHCP server on the network. If the DHCP server is installed on the same machine where Cobbler is running, the choice is between having Cobbler to manage the DHCP server or configuring the DHCP server manually.
A DHCP server not managed by Cobbler has to be configured so to answer to bootp queries serving the pxelinux.0 boot file.
Bare Metal Machines
To deploy using cobbler in Bare Metal machines, we simply need to enter to the BIOS configuration and set the system to boot from LAN, or PXE, depending on the BIOS itself.
Once this is done, reboot the machine and a list of available will be provided.
KVM Virtual Machines
To deploy Virtual Machines using the imported ISO profile through cobbler, we simply need to create a new Virtual Machine and specify that we are PXE booting. However, we need to consider that PXE will only work in KVM when using a bridge interface, typically br0.
Once the Virtual Machine is created, it will boot and search for the PXE server through the network. Once it is found, it will provide with the list of available profiles to install. We simply select the profile we would like to install to be able to proceed with the installation. These profiles are shown as follows:
Deploying via koan
Koan, is a helper program provided along with cobbler to be able to install virtual machines in a host server, as well as perform some other tasks. The first thing is that we need to install koan in the host machine for the Virtual Machines:
sudo apt-get install koan
Once installed, the command to be used is simply koan:
However, it requires a set of options. Some of these options are:
--server: Specifies the Cobbler server from where to obtain information.
--list: Specifies that we want to list any of profiles, systems, images.
--profile: Specifies the profile to be used.
--virt: Specifies that we will install Virtual Machines.
--virt-name:' Specifies the Virtual Machine name.
--virt-bridge: Specifies the bridge interface to use by the Virtual Machine, (i.e. virbr0, br0)
Listing Available Profiles
The first thing to do is always determine what Ubuntu distribution, release, and/or architecture we would like to install. For this we need to list all the available profiles in the cobbler server. We do this as follows, assuming the IP address of our cobbler server is 192.168.1.2:
koan --server=192.168.1.2 --list=profiles
The command will provide an output similar to:
- looking for Cobbler at http://192.168.1.2/cobbler_api natty-i386 natty-x86_64
Deploying Virtual Machines
Once we have determined what profile we would like to install, we do as follows to proceed with the installation:
sudo koan --virt --server=192.168.1.2 --profile=natty-i386 --virt-name=natty-test-koan --virt-bridge=br0
One this is executed, koan will utilize virtinst to create and launch the Virtual Machine. The installation will proceed normally.