virt-p2v-make-kiwi(1)

πŸ’… virt-p2v-make-kiwi(1) β€” the manual, but make it make sense

okay so first things first, bestie: this is a page from the Virtualization Support corner of the internet, and it's called virt-p2v-make-kiwi. say that five times fast, i dare you. it builds the kiwi config for virt-p2v and it's lowkey iconic πŸŽ€


✨ NAME ✨

virt-p2v-make-kiwi β€” build the virt-p2v kiwi configuration, periodt πŸ’…

🌸 SYNOPSIS 🌸

virt-p2v-make-kiwi [--inject-ssh-identity path] [-o kiwi-folder]

πŸ’– DESCRIPTION πŸ’–

so virt-p2v(1) is the whole point of this: it converts a physical machine so it can run virtualized on KVM, managed by libvirt, OpenStack, oVirt, Red Hat Enterprise Virtualisation (RHEV), or literally any of the other targets that virt-v2v(1) supports. main character energy fr fr.

Kiwi is a tool mainly used by SUSE Linux Enterprise and openSUSE to build live CDs, make appliances, and so on. it's driven by a few files, including an xml description of the machine. no cap.

virt-p2v-make-kiwi builds a folder containing all the pieces kiwi needs to build a bootable P2V live CD ISO, USB key, or PXE image. heads up though: this tool only builds the kiwi configuration β€” but this manual page describes some of the ways you can use that kiwi configuration afterwards. we're giving you the starter pack, not the whole meal πŸ“

the root user on the disk image uses p2v as its initial password. yes, really. write that down.

πŸ¦‹ BUILDING THE KIWI CONFIGURATION πŸ¦‹

using virt-p2v-make-kiwi is genuinely so simple bestie:

virt-p2v-make-kiwi

that's it. it will build a kiwi configuration based on the current machine's distribution. slay.

and if you want to control the name of the output folder, just use the -o parameter. easy.

πŸ”₯ 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 actually need. (yes, the defaults might not be your vibe. that's normal.)

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
bestie be SO careful with dd. that of= is not a suggestion, it's a vibe check that can eat your disk πŸ™ˆ

⭐ 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. but note: you cannot inject a key once the ISO has been built. it's a now-or-never situation, iykyk.

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). cute!

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:

p2v.identity=file:///var/tmp/id_rsa

for more information, see SSH IDENTITIES in virt-p2v(1).

πŸ‘‘ OPTIONS πŸ‘‘

  • --help β€” display help. that's the whole thing. it's giving helpful.
  • --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. (that's the default, no cap.)
  • -V / --version β€” display version number and exit. bye bestie ✨

πŸŽ€ FILES πŸŽ€

  • $libdir/virt-p2v/virt-p2v.xz β€” 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.
  • $datadir/virt-p2v/issue, $datadir/virt-p2v/launch-virt-p2v.in, $datadir/virt-p2v/kiwi, $datadir/virt-p2v/p2v.service β€” 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.

πŸ’œ ENVIRONMENT VARIABLES πŸ’œ

  • VIRT_P2V_DATA_DIR β€” 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/.

🌸 AUTHORS 🌸

CΓ©dric Bosdonnat

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, see https://www.gnu.org/licenses/.

πŸ’€ BUGS πŸ’€

to get a list of bugs against libguestfs (which include virt-p2v), 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 virt-p2v.
  • where you got virt-p2v (eg. which Linux distro, compiled from source, etc)
  • describe the bug accurately and give a way to reproduce it. πŸ“

and that's the page!! πŸŽ‰ this lil rewrite is from virt-p2v-1.42.4, dated 2024-11-05 β€” mwah, go build something iconic bestie πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from