openSUSE:Appliances events workshop Nuremberg 2010 projects system to image
System to Image Migration: p2i
The p2i module in kiwi allows to inspect and migrate a running system into a kiwi image description. From this description it is then possible to create an appliance for another environment like for example a virtual machine
The migration only takes care for contents and not for infrastructure like partition table layout or bootloader setup This is because this values could be different according to the desired target image type and it also might be required to redetect them on initial deployment
The migration collects the following information:
- packages and patterns which makes up the system
- repositories which provides them
- configurations via the autoyast cloneconfig module
- packaged but modified files and directories
- unpackaged files and directories
The result of this analyse is an image description and a report file presented to the user. The user now gets an impression how clean the system is and also needs to decide what files and directories which are not provided by packages should be part of the overlay files inside the image description. In many cases this results in the following tasks for the user:
- if packages are installed multiple times the user need to check the reported ones and either use the latest one provided by the repo or list each of them with it full qualified name in the generated kiwi XML file
- if packages are installed but not found in any repo make sure you can provide a repo for it or ignore them knowing that they won't be part of the later image
- check the modified files. The migration puts them into the overlay tree automatically. You shouldn't have binaries as overlay files. If you have one check why
- check the unpackaged files / directories reported by kiwi. This most likely includes stuff like personal data (pictures, movies, etc) but also source checkouts on developer machine and any other data created by the user. All kind of data which should be part of the image and can't be restored from remote should be considered to be part of the overlay tree and needs to be copied there
In this early version of the module the report is just an informal page and doesn't allow some interaction. In future releases it should be possible to import the report to the Studio interface and guide the user through the process