- buster 1:1.40.2-2
NAME¶virt-p2v-make-kiwi - Build the virt-p2v kiwi configuration
virt-p2v-make-kiwi [--inject-ssh-identity path] [-o kiwi-folder]
DESCRIPTION¶virt-p2v(1) converts a physical machine to run virtualized on KVM, managed by libvirt, OpenStack, oVirt, Red Hat Enterprise Virtualisation (RHEV), or one of the other targets supported by virt-v2v(1).
Kiwi is a tool used mainly by SUSE Linux Enterprise and openSUSE to build live CDs, make appliances and so on. It is driven by a few files including an xml description of the machine.
virt-p2v-make-kiwi builds a folder containing all the pieces needed for kiwi to build a bootable P2V live CD ISO, USB key, or PXE image. This tool only builds the kiwi configuration, but this manual page describes some of the ways you can use the kiwi configuration.
BUILDING THE KIWI CONFIGURATION¶Using virt-p2v-make-kiwi is very simple:
will build a kiwi configuration based on the current machine’s distribution.
To control the name of the output folder, use the -o parameter.
BUILDING A LIVE CD / ISO¶Once you have the kiwi configuration folder, you can use kiwi(1) to make a live CD:
sudo kiwi --build p2v.kiwi -d build --type iso
Before running this, you may have to tweak the "config.xml" file to change the locale and keyboard mapping to the one you need.
If running on a SUSE Linux Entreprise Server, add the path to your packages repositories using the "--ignore-repos" and "--add-repo" kiwi parameters.
The generated ISO image will be placed in the "build" folder.
BUILDING A BOOTABLE USB KEY¶Use the dd(1) program to write the ISO created above to a USB key:
sudo dd if=path/to/p2v.iso of=/dev/sdX
BUILDING A PXE BOOT IMAGE¶To create a PXE boot image, run kiwi in such a way:
sudo kiwi --build $PWD/p2v.kiwi -d build --add-profile netboot --type pxe
For more details on how to use the generated image, report to the kiwi documentation on PXE images: https://doc.opensuse.org/projects/kiwi/doc/#chap.pxe
ADDING AN SSH IDENTITY¶You can inject an SSH identity (private key) file to the kiwi config and hence into the ISO using the --inject-ssh-identity option. Note that you cannot inject a key once the ISO has been built.
First create a key pair. It must have an empty passphrase:
ssh-keygen -t rsa -N '' -f id_rsa
This creates a private key ("id_rsa") and a public key ("id_rsa.pub") pair. The public key should be appended to the "authorized_keys" file on the virt-v2v conversion server (usually to "/root/.ssh/authorized_keys").
The private key should be added to the kiwi config and then discarded:
virt-p2v-make-kiwi [...] --inject-ssh-identity id_rsa rm id_rsa
The ISO can then be built from the kickstart in the usual way (see above), and it will contain the embedded SSH identity (/var/tmp/id_rsa).
When booting virt-p2v, specify the URL of the injected file like this:
│ User name: [root_____________________________] │ │ │ │ Password: [ <leave this field blank> ] │ │ │ │ SSH Identity URL: [file:///var/tmp/id_rsa___________] │
or if using the kernel command line, add:
For more information, see "SSH IDENTITIES" in virt-p2v(1).
- Display help.
- --inject-ssh-identity id_rsa
- Add an SSH identity (private key) file into the kickstart. See "ADDING AN SSH IDENTITY" above.
- -o OUTPUT
- --output OUTPUT
- Write kiwi configuration to the "OUTPUT" folder. If not specified, the default is p2v.kiwi in the current directory.
- Display version number and exit.
- The virt-p2v(1) binary which is copied into the kiwi configuration.
The location of the binary can be changed by setting the "VIRT_P2V_DATA_DIR" environment variable.
- Various data files that are used to make the kiwi appliance.
The location of these files can be changed by setting the "VIRT_P2V_DATA_DIR" environment variable.
- The directory where virt-p2v-make-kiwi looks for data files and the virt-p2v binary (see "FILES" above). If not set, a compiled-in location is used.
SEE ALSO¶virt-p2v(1), virt-p2v-make-disk(1), virt-v2v(1), kiwi(1), http://libguestfs.org/.
COPYRIGHT¶Copyright (C) 2016 SUSE Ltd.
LICENSE¶This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
BUGS¶To get a list of bugs against libguestfs, use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
When reporting a bug, please supply:
- The version of libguestfs.
- Where you got libguestfs (eg. which Linux distro, compiled from source, etc)
- Describe the bug accurately and give a way to reproduce it.
- Run libguestfs-test-tool(1) and paste the complete, unedited output into the bug report.