Updated: July 29, 2009
Once again, we are going to talk about Kiwi. Kiwi is an Imaging System, a part of the greater openSUSE Build Service, a complex, omnipotent imaging/virtualization solution that allows you to create any which kind of operating system images, fully customizable and deployable in a vast range of formats, based on your own installation, the vanilla openSUSE or any other Linux distribution.
Kiwi can achieve these tasks using XML templates, as it is geared toward power users who like automation and scripting. However, Kiwi also supports work by the means of much simpler, much friendlier GUI frontends called Image Creator and Product Creator.
Some time ago, we had a tutorial on Kiwi. There, we learned how to use the former utility. We used it to create a VMDK virtual machine based on the default openSUSE build and then tested our product in VMware Server. Similarly, we could have created live CD/DVDs, thin installs, Xen machines, or even Amazon EC2 images, something we did the long way manually a while back - and which we also learn to how to do using Kiwi in a separate tutorial.
We did not dabble in converting our own installation into one of these custom, redistributable images. As promised, we will do that today - using the Product Creator.
Product Creator allows you to convert your own physical installations into new, deployable builds. This is similar to what VMware Converter can do, with additional features, much finer tweakability and a total control of individual packages that you want to include.
Like Image Creator, Product Creator is a GUI wizard, friendly, simple and powerful. So follow me, and enjoy another virtualization mega-hack.
This is a very simple affair. Open YaST and search for product-creator package. Install it. After the package is installed, Product Creator will show in YaST under Miscellaneous, alongside Image Creator.
Now comes the fun part. When you fire up Product Creator, it will ask you whether you want to use an auto-configured YaST Control File - you can create these during the installation - or the Package Manager. We'll go with the first option.
Your next step is to choose the repositories you want to configure in the image. You will have to manually highlight each one and select it. This is a bit tedious, but you can get it sorted out in a few minutes. Later on, you can use existing configurations or templates from the command line.
You can change the Target architecture if you like, but you need to pay attention. Some repositories do not support every available architecture. This is specially true for i386, i586 and i686, all of which define 32-bit architecture, with some differences.
In fact, you will be warned if you choose a wrong selection.
You will now have to select a repository, among the several choices you have marked earlier, which contains the basic boot files, without which the system cannot be created.
Your next step is to choose the output format. The best idea is to create the bootable ISO image, but you can also leave the file and directory structure in its expanded form. The choice is yours. Similarly, you will have to choose the destination path. If you're short on free space, you can check the box titled Copy only needed files to save space.
After that, you may optionally load a configuration file that specifies additional parameters with which the ISO file will be generated. If you're using the wizard for the first time or are unsure about this step, simply move forward.
Now comes the best part - choosing the ingredients and baking the cake. Here, you have a complete freedom in choosing what bits get installed. Of course, the more you choose the bigger the final result.
You can also optionally digitally sign your image. This can be particularly useful in business environments. At home, you probably need not bother.
Finally, review your choices and click Finish.
Your image configuration is ready. Now, you can build it. Or edit the settings. If you click Close, nothing will happen. Your configuration will be saved until a later time when you actually wish to create the image. This is done by clicking Create Product. Add, Edit and Delete buttons allow you to create additional profiles, offering you lots of flexibility in your games with image building and packaging.
The most interesting part of this menu is the Create Image with KIWI ... button. If you click on the little arrow on the right side, you will expand a drop-down menu with additional build options.
And we're back to Kiwi, with its powerful settings and multiple formats. You can choose between live ISO, USB Stick, Xen machine, and Virtual Disk (VMDK/QEMU) images.
Once you click the right button, the image will be built and verified.
The last step is to burn the ISO and test it on a real machine. And there you go! Now, you may find it hard to believe that the actual screenshots below come from MY own build rather than the standard openSUSE 11 installation, but you will have to take my word for it.
One of my readers has asked me about Kiwi's ability to create Amazon EC2 machines, as I have mentioned this in several articles. Well, Kiwi can do this and even has a sample configuration file included under /usr/share.
Working with Product Creator is as easy and fun as working with Image Creator, with similar, similarly impressive results. You do not have to have any advanced knowledge of system internals to build your own custom images.
Kiwi and the Image Creator and Product Creator frontends form a powerful, multipurpose suite that lets you fine tune your installations to the maximum. You now have the ability to deploy your systems in five-six different formats, add/remove packages and repositories, choose the image size, convert images, choose the desktop environment, and much more. Kiwi offers total freedom to use your imagination and creativity to produce beautiful solutions.
Today, you have learned how to use the second half of the Kiwi system, the creation of images from an existing installation. This tutorial complements the first part, the creation of images based on external repositories.
In the follow up articles, we will focus on the Build Service and SUSE Studio.