Bug 1261242
| Summary: | virt-v2v should prevent using '-of' option appears twice on the command line | ||
|---|---|---|---|
| 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.2 | CC: | mxie, mzhan, ptoscano, tzheng, xiaodwan |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | V2V | ||
| Fixed In Version: | libguestfs-1.28.1-1.53.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-03 17:54:57 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: | |||
Upstream fix is: https://github.com/libguestfs/libguestfs/commit/e27199274645dad962670bb75f87cc7472d36c4d Try to verify this bug with new build: libvirt-1.2.17-8.el7.x86_64 qemu-kvm-rhev-2.3.0-22.el7.x86_64 libguestfs-1.28.1-1.55.el7.x86_64 virt-v2v-1.28.1-1.55.el7.x86_64 Steps: 1. Convert a esx guest to local kvm with several '-of' option: # virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of taesratat -of aaa -of raw -o null virt-v2v: error: -of option used more than once on the command line If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Result: virt-v2v will report a good error, not letting user use more than twice '-of' option. 2. Test other options: 2.1 '-ic' # virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of raw virt-v2v: error: -ic option used more than once on the command line If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] 2.2 '-on' # virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of raw -on test1 -on test2 virt-v2v: error: -on option used more than once on the command line If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] 2.3 '--password-file' # virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of raw -on test1 --password-file /tmp/passwd2 --password-file /tmp/passwd2 virt-v2v: error: --password-file option used more than once on the command line If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Also tested other options: -if, -oc, -os,--vdsm-vm-uuid, --vdsm-ovf-output, --vmtype options, they are also forbidding user used more than once on the command line. Test this bug with new build: libvirt-1.3.1-1.el7.x86_64 qemu-kvm-rhev-2.3.0-31.el7.x86_64 libguestfs-1.32.2-6.el7.x86_64 virt-v2v-1.32.2-6.el7.x86_64 Steps: 1. Convert a esx guest to local kvm with several '-of' option: # virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of taesratat -of aaa -of raw -o null virt-v2v: error: -of option used more than once on the command line If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Result: virt-v2v will report a good error, not letting user use more than twice '-of' option. 2. Test other options: 2.1 '-ic' # virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of raw virt-v2v: error: -ic option used more than once on the command line If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] 2.2 '-on' # virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of raw -on test1 -on test2 virt-v2v: error: -on option used more than once on the command line If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] 2.3 '--password-file' # virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of raw -on test1 --password-file /tmp/passwd2 --password-file /tmp/passwd2 virt-v2v: error: --password-file option used more than once on the command line If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Also tested other options: -if, -oc, -os,--vdsm-vm-uuid, --vdsm-ovf-output, --vmtype options, they are also forbidding user used more than once on the command line. 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/RHSA-2016-2576.html |
Description of problem: virt-v2v should prevent using '-of' option appears twice on the command line Version-Release number of selected component (if applicable): libvirt-1.2.17-8.el7.x86_64 libguestfs-1.28.1-1.52.el7.x86_64 virt-v2v-1.28.1-1.52.el7.x86_64 qemu-kvm-rhev-2.3.0-22.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Convert a esx guest to local kvm with wrong '-of' option: # export LIBGUESTFS_BACKEND=direct;virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of taesratat -o null [ 0.0] Opening the source -i libvirt -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 Enter root's password for 10.66.4.103: Enter host password for user 'root': [ 13.0] Creating an overlay to protect the source from being modified [ 14.0] Opening the overlay [ 24.0] Initializing the target -o null virt-v2v: error: output format should be 'raw' or 'qcow2'. Use the '-of <format>' option to select a different output format for the converted guest. Other output formats are not supported at the moment, although might be considered in future. If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] 2. Convert a esx guest to local kvm with several wrong '-of' options and last one is right '-of' options: # virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 -of taesratat -of aaa -of raw -o null [ 0.0] Opening the source -i libvirt -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-rhel5.11-i386 Enter root's password for 10.66.4.103: Enter host password for user 'root': [ 13.0] Creating an overlay to protect the source from being modified [ 13.0] Opening the overlay [ 24.0] Initializing the target -o null [ 24.0] Inspecting the overlay [ 61.0] Checking for sufficient free disk space in the guest [ 61.0] Estimating space required on target for each disk [ 61.0] Converting Red Hat Enterprise Linux Server release 5.11 (Tikanga) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 166.0] Mapping filesystem data to avoid copying unused and blank areas [ 172.0] Closing the overlay [ 172.0] Checking if the guest needs BIOS or UEFI to boot [ 172.0] Copying disk 1/1 to /var/tmp/null.Zh3TQS/sda (raw) (100.00/100%) [ 411.0] Creating output metadata [ 411.0] Finishing off Actual results: Step 1: virt-v2v command failed for detecting '-of taesratat' is a invalid option. Step2: virt-v2v command finished with no error for just detecting the last '-of raw' option is a valid one the same time ignore several wrong '-of' options in front of it. Expected results: virt-v2v should prevent using '-of' option appears twice on the command line Additional info: