KIWI Migrate

Jump to: navigation, search

KIWI 迁移

从已安装系统创建镜像Creating image from the installed OS

如果你想从已安装系统创建Live(CD/DVD)或将其迁移到一个虚拟机,本教程刚好适合你。

创建KIWI镜像

 kiwi -m mysys --destdir /mnt/mysys --exclude /somefolder --exclude /anotherfolder --logfile /tmp/kiwi.log

destdir 应该在 --exclude 列表中。 mysys 是镜像的名称。

为构建镜像准备好KIWI

 kiwi --prepare /mnt/mysys --root /where you have lot of space/ --logfile /tmp/kiwi-prepare.log

最终创建镜像

在你能够创建镜像之前, 修改 /mnt/mysys/config.xml 以添加丢失的信息,也请同样的为所要安装的包提供一个正确的安装的路径。

 kiwi --type <imagetype> --create /mnt/mysys -d /mnt/mysys-image --logfile /tmp/kiwi-create.log

镜像类型可以是 live, usb, xen 等等. 如需了解受支持的镜像类型,请见 /usr/share/doc/packages/kiwi/kiwi.pdf 。