Description of problem: After conversion using the automated kernel command line mode, virt-p2v really ought to power off the machine. Version-Release number of selected component (if applicable): virt-p2v from git, or RHEL 7.1 How reproducible: 100% Steps to Reproduce: Please see my reproducer steps here: https://bugzilla.redhat.com/show_bug.cgi?id=1229262#c2 Actual results: virt-p2v runs invisibly (or fails invisibly), and there's no obvious conclusion to the conversion, unless you study the log files on the conversion server. Expected results: virt-p2v should power off the server after completion.
Upstream fixes: 716244c33718c866edce9e7ee8f21ee612f53337 b45f6a04359b4b64256b7b21a04416fa772c9423 These fixes actually add various commands you can use to run scripts before and after conversion: p2v.pre=COMMAND p2v.pre="COMMAND ARG ..." Select a pre-conversion command to run. Any command or script can be specified here. If the command contains spaces, you must quote the whole command with double quotes. The default is not to run any command. p2v.post=poweroff p2v.post=reboot p2v.post=COMMAND p2v.post="COMMAND ARG ..." Select a post-conversion command to run if conversion is successful. This can be any command or script. If the command contains spaces, you must quote the whole command with double quotes. If virt-p2v is running as root, and the command line was set from "/proc/cmdline" (not --cmdline), then the default is to run the poweroff(8) command. Otherwise the default is not to run any command. p2v.fail=COMMAND p2v.fail="COMMAND ARG ..." Select a post-conversion command to run if conversion fails. Any command or script can be specified here. If the command contains spaces, you must quote the whole command with double quotes. The default is not to run any command. I have included the fixes in the latest test ISO at: http://oirase.annexia.org/virt-p2v/RHEL-7.2-preview/
Tested with: livecd-p2v-201506091319.iso virt-v2v-1.28.1-1.38.el7.x86_64 libguestfs-1.28.1-1.38.el7.x86_64 1.Check virt-p2v manual: # man virt-p2v,the part about p2v.pre,p2v.post have been added. p2v.pre=COMMAND p2v.pre="COMMAND ARG ..." Select a pre-conversion command to run. Any command or script can be specified here. If the command contains spaces, you must quote the whole command with double quotes. The default is not to run any command. p2v.post=poweroff p2v.post=reboot p2v.post=COMMAND p2v.post="COMMAND ARG ..." Select a post-conversion command to run if conversion is successful. This can be any command or script. If the command contains spaces, you must quote the whole command with double quotes. If virt-p2v is running as root, and the command line was set from "/proc/cmdline" (not --cmdline), then the default is to run the poweroff(8) command. Otherwise the default is not to run any command. p2v.fail=COMMAND p2v.fail="COMMAND ARG ..." Select a post-conversion command to run if conversion fails. Any command or script can be specified here. If the command contains spaces, you must quote the whole command with double quotes. The default is not to run any command. 2.Use virt-p2v to convert host. For default(didn't set anything about p2v.post) in kernel command line,it will poweroff after conversion. If set p2v.fail=reboot or p2v.post=reboot,If the conversion fail or finish,the host will reboot. Refer to the above comments,move the bug to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2183.html