Bug 1147313
| Summary: | virt-v2v cmd with option --qemu-boot doesn't work: "qemu-system-x86_64: command not found" | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | zhoujunqin <juzhou> | ||||||
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 7.1 | CC: | codong, dyuan, mbooth, mzhan, ptoscano, rjones, tzheng | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | V2V | ||||||||
| Fixed In Version: | libguestfs-1.27.60-1.1.el7 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2015-03-05 13:45:45 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
RHEL 7-only patch here: https://github.com/libguestfs/libguestfs/commit/67f3a117c873a92263cd79095c0dc58392a4a4d3 Will be in virt-v2v >= 1.27.56. Need QA ack before I can add this to the erratum. qa ack+ 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.
Created attachment 942646 [details]
detail log juzhou-307_debug.log
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. I have disabled the --qemu-boot option in RHEL 7, sadly: https://github.com/libguestfs/libguestfs/commit/e184e7818e6cff390fef1942aa0a4b006863852b 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. (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. 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. 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 |
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".