RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1147313 - virt-v2v cmd with option --qemu-boot doesn't work: "qemu-system-x86_64: command not found"
Summary: virt-v2v cmd with option --qemu-boot doesn't work: "qemu-system-x86_64: comm...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-29 01:43 UTC by zhoujunqin
Modified: 2015-03-05 13:45 UTC (History)
7 users (show)

Fixed In Version: libguestfs-1.27.60-1.1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:45:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
the detail log of v2v command (403.26 KB, text/plain)
2014-09-29 01:43 UTC, zhoujunqin
no flags Details
detail log juzhou-307_debug.log (397.25 KB, text/plain)
2014-09-30 09:23 UTC, zhoujunqin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Description zhoujunqin 2014-09-29 01:43:42 UTC
Created attachment 942097 [details]
the detail log of v2v command

Description of problem:
virt-v2v cmd with option --qemu-boot doesn't work:  "qemu-system-x86_64: command not found"

Version-Release number of selected component (if applicable):
libguestfs-1.27.55-1.1.el7.x86_64
virt-v2v-1.27.55-1.1.el7.x86_64
qemu-kvm-rhev-2.1.2-1.rwmj1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Check virt-v2v manual page:
# man virt-v2v
....
       -o qemu
           Set the output method to qemu.

           This is similar to -o local, except that a shell script is written which you can use to boot the guest in qemu.  The converted disks and shell script are written to the directory specified by
           -os.

           When using this output mode, you can also specify the --qemu-boot option which boots the guest under qemu immediately.
...

2. Copy xen guest image and xml file from xen server to v2v server:

3. Run virt-v2v to connect a xen pv/hvm guest either by -i disk with option --qemu-boot
# virt-v2v -i disk rhel6.6-pv-x64-test.img  -o qemu -os  /var/tmp/ -on juzhou-5 --qemu-boot
[   0.0] Opening the source -i disk rhel6.6-pv-x64-test.img
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[ 102.0] Initializing the target -o qemu -os /var/tmp/ --qemu-boot
[ 102.0] Inspecting the overlay
[ 107.0] Checking for sufficient free disk space in the guest
[ 107.0] Estimating space required on target for each disk
[ 107.0] Converting Red Hat Enterprise Linux Server release 6.6 Beta (Santiago) to run on KVM
This guest has virtio drivers installed.
[ 134.0] Mapping filesystem data to avoid copying unused and blank areas
[ 134.0] Closing the overlay
[ 134.0] Copying disk 1/1 to /var/tmp/juzhou-5-sda (raw)
    (100.00/100%)
[ 157.0] Creating output metadata
[ 157.0] Finishing off
/var/tmp/juzhou-5.sh: line 4: qemu-system-x86_64: command not found


Actual results:
conversion finished but guest didn't boot up with error message:
/var/tmp/juzhou-5.sh: line 4: qemu-system-x86_64: command not found

Expected results:
Guest can boot up under qemu immediately.

Additional info:
1. # cat /var/tmp/juzhou-5.sh
#!/bin/sh -

qemu-system-x86_64 \
        -no-user-config -nodefaults \
        -name 'juzhou-5' \
        -machine accel=kvm:tcg \
        -m 2048 \
        -drive 'file=/var/tmp/juzhou-5-sda,format=raw,if=virtio' \
        -netdev user,id=net0 \
        -device virtio-net-pci,netdev=net0 \
        -display gtk \
        -vga qxl \
        -serial stdio

2. My system doesn't have command "qemu-system-x86_64", i guess it's the root cause.
# grep qemu-system -a3A3 /usr/src/debug/libguestfs-1.27.55/v2v/output_qemu.ml
    let nl = " \\\n\t" in
    fpf "#!/bin/sh -\n";
    fpf "\n";
    fpf "qemu-system-%s" guestcaps.gcaps_arch;
    fpf "%s-no-user-config -nodefaults" nl;
    fpf "%s-name %s" nl (quote source.s_name);
    fpf "%s-machine accel=kvm:tcg" nl;
3. Attached log is the detail log for "virt-v2v".

Comment 2 Richard W.M. Jones 2014-09-29 07:05:01 UTC
RHEL 7-only patch here:

https://github.com/libguestfs/libguestfs/commit/67f3a117c873a92263cd79095c0dc58392a4a4d3

Will be in virt-v2v >= 1.27.56.

Comment 3 Richard W.M. Jones 2014-09-29 15:44:41 UTC
Need QA ack before I can add this to the erratum.

Comment 4 Cui Lei 2014-09-30 01:11:06 UTC
qa ack+

Comment 6 zhoujunqin 2014-09-30 09:21:59 UTC
Test with new build:
libguestfs-1.27.56-1.1.el7.x86_64
virt-v2v-1.27.56-1.1.el7.x86_64

steps:
1. Copy xen guest image and xml file from xen server to v2v server:

2. Run virt-v2v to connect a xen pv/hvm guest by -i disk with option --qemu-boot

[root@rhel7new-display ~]# virt-v2v -i disk /var/lib/xen/images/xen-pv-rhel6.4-x86_64.img  -o qemu -os /var/tmp -on juzhou-306 --qemu-boot 
[   0.0] Opening the source -i disk /var/lib/xen/images/xen-pv-rhel6.4-x86_64.img
[   1.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[   3.0] Initializing the target -o qemu -os /var/tmp --qemu-boot
[   3.0] Inspecting the overlay
[   6.0] Checking for sufficient free disk space in the guest
[   6.0] Estimating space required on target for each disk
[   6.0] Converting Red Hat Enterprise Linux Server release 6.4 (Santiago) to run on KVM
This guest has virtio drivers installed.
[  29.0] Mapping filesystem data to avoid copying unused and blank areas
[  30.0] Closing the overlay
[  31.0] Copying disk 1/1 to /var/tmp/juzhou-306-sda (raw)
    (100.00/100%)
[  39.0] Creating output metadata
[  39.0] Finishing off
[root@rhel7new-display ~]# GTK support is disabled

Result:
Conversion finished but guest not boot up with: GTK support is disabled
Please help me check, i will attach detail log later.

Comment 7 zhoujunqin 2014-09-30 09:23:08 UTC
Created attachment 942646 [details]
detail log juzhou-307_debug.log

Comment 8 Richard W.M. Jones 2014-09-30 09:47:58 UTC
OK looks as if both gtk and sdl are disabled in the RHEL version
of qemu, so we won't be able to make the --qemu-boot option work.

Comment 9 Richard W.M. Jones 2014-09-30 10:07:51 UTC
I have disabled the --qemu-boot option in RHEL 7, sadly:

https://github.com/libguestfs/libguestfs/commit/e184e7818e6cff390fef1942aa0a4b006863852b

Comment 10 zhoujunqin 2014-10-08 07:24:38 UTC
Try to verify it with new build:
libguestfs-1.27.58-1.1.el7.x86_64
virt-v2v-1.27.58-1.1.el7.x86_64

Steps:
1. Try to convert a guest with --qemu-boot option:
# virt-v2v -i disk rhel6.6-pv-x64-test.img  -o qemu -os  /var/tmp/ -on juzhou-1 --qemu-boot
virt-v2v: error: -o qemu: the --qemu-boot option cannot be used in RHEL

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

2. Check virt-v2v manual page:
# man virt-v2v |tee virt-v2v-manual-page |grep -a2A2 qemu-boot

No output.
The contents about "--qemu-boot" option have been removed.

3. Check virt-v2v --help info
# virt-v2v --help |grep qemu-boot 
  --qemu-boot                                 Boot in qemu (-o qemu only)

Seen option "--qemu-boot" still in help info, move this bug from ON_QA to ASSIGNED.

Comment 11 Richard W.M. Jones 2014-10-08 09:29:01 UTC
(In reply to zhoujunqin from comment #10)
> 3. Check virt-v2v --help info
> # virt-v2v --help |grep qemu-boot 
>   --qemu-boot                                 Boot in qemu (-o qemu only)
> 
> Seen option "--qemu-boot" still in help info, move this bug from ON_QA to
> ASSIGNED.

I've changed this to:

   --qemu-boot       This option cannot be used in RHEL

in virt-v2v >= 1.27.59.

There's no way to remove the option from --help output, since this is
automatically generated from the list of options that are parsed by
the argument parser.

Comment 13 tingting zheng 2014-10-09 07:39:28 UTC
Tested with:
virt-v2v-1.27.60-1.1.el7.x86_64
libguestfs-1.27.60-1.1.el7.x86_64

1.Check virt-v2v manual,no qemu-boot related part.

2.Check virt-v2v help:
# virt-v2v --help |grep qemu-boot 
  --qemu-boot                                 This option cannot be used in RHEL

3.Test qemu-boot option:
# virt-v2v -i disk rhel6.6-pv-x64-test.img -o qemu -os /var/tmp/ --qemu-boot
virt-v2v: error: -o qemu: the --qemu-boot option cannot be used in RHEL

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

Refer to the above comments,the bug is fixed,so move the bug to VERIFIED.

Comment 15 errata-xmlrpc 2015-03-05 13:45:45 UTC
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-0303.html


Note You need to log in before you can comment on or make changes to this bug.