[et-mgmt-tools] Cobbler Image Cloning Patches

Bryan Kearney bkearney at redhat.com
Wed Nov 12 13:14:26 UTC 2008

Michael asked that I post a summary about the some cobbler patches from 
yesterday which provide a virt-image driver to koan. Here is the quick 
summary which I sent to the cobbler list:

-- bk

The patches allow the user to import a pre-configured image (virtual 
appliance) into cobbler, and to provision it via koan. Outside of koan, 
the process would be something akin to:

I) Create the appliance from a kickstart file using he appliance-creator 
[1] tool. This creates a raw image file and a virt-image xml [2] file 
which is the metadata about the appliance.
II) Locate a VMWare appliance and convert it the virt-image file using 
the  virt-convert [3]tooling. Again, this gives you a raw disk and 
appliance metadata in the form of an XML File.
III) Install the appliance into your hypervisor of choice using 
virt-image tool.

These patches allow the metadata in the appliance xml file (output of I 
or II)  to be stored within cobbler. The mapping for this information is 
below. Koan then uses this data on the client machine to copy the image 
file and to install it using virt-image libraries. In effect, this is 
step III above.

The process for this is then:
A) Assume you have an image which is located on network accessable storage
B) Add the image to cobbler using "cobbler add image -name FOO ..... " 
or one of the APIs. The image-type should be virt-clone.
C) Using koan, deploy the image using a command such as "koan --server 
localhost --image base --virt --virt-path /tmp"
D) During deployment, koan will create one NIC based on the new 
network_count attribute. These are filled either with bridges defined in 
the image or with the default network connection.

The image type of "virt-clone" will tell koan to use the virt-image 
driver. The --virt-path argument says where to copy the image to 
locally.. since this is a clone. The --virt-type argument can be used, 
or virt-image will detect your hypervisor.

I would like to see a tool which does all of step B based off of the 
existing xml file, but that is not written yet. I also noticed I need to 
add network_count to the cli add function.

Any comments or concerns are appreciated.

-- bk

[1] http://www.thincrust.net/tooling.html
[2] http://people.redhat.com/dlutter/kronolith-appliance/virt-image-xml.html
[3] http://www.thincrust.net/tooling-conversion.html

Mapping between Cobbler and virt-image xml
Cobbler :: Virt-Image-XML :: Notes
CobblerImage.name :: image.name :: Overridden at command line
CobblerImage.arch :: None :: Need to translate this since virt-image 
seems to use i686 not i386
CobblerImage.file :: image.domain.boot.drive | image.storage.disk at file 
    :: What is lost is the ability to denote boot drives
CobblerImage.parent :: None :: Not needed as this is internal cobbler logic
CobblerImage.depth :: None :: Not needed as this is internal cobbler logic
CobblerImage.owners :: None :: Not needed as this is internal cobbler logic
CobblerImage.virt_ram :: image.domain.devices.memory ::
CobblerImage.virt_file_size :: None ::
CobblerImage.virt_path :: None :: Used to denote where to copy the image 
on the local filesystem
CobblerImage.virt_cpus :: image.domain.devices.vcpu ::
CobblerImae.network_count :: image.domain.networks ::
CobblerImage.virt_type :: image.domain.boot at type | 
image.domain.boot.os.loader at dev :: See Issue 2
CobblerImage.virt_bridge :: :: Creates one nic on the guest for each entry
CobblerImage.xml_file :: None :: No need to store the file, virt-image 
is called directlry
CobblerImage.image_type :: virt-clone :: May need to break this down 
once we resolve the issues below
CobblerImage.breed, :: None ::
CobblerImage.os_version, :: None ::


More information about the et-mgmt-tools mailing list