Bug 2082603

Summary: virt-v2v -o qemu prints cosmetic warning: "warning: short-form boolean option 'readonly' deprecated"
Product: Red Hat Enterprise Linux 9 Reporter: mxie <mxie>
Component: virt-v2vAssignee: Laszlo Ersek <lersek>
Status: CLOSED ERRATA QA Contact: Vera <vwu>
Severity: low Docs Contact:
Priority: unspecified    
Version: 9.1CC: chhu, hongzliu, juzhou, lersek, rjones, tyan, tzheng, vwu, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-2.0.7-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 09:56:05 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mxie@redhat.com 2022-05-06 14:19:04 UTC
Description of problem:
There is qemu-kvm warning when creating guest from qemu shell file which is converted by v2v

Version-Release number of selected component (if applicable):
virt-v2v-2.0.4-1.el9.x86_64
libguestfs-1.48.1-1.el9.x86_64
guestfs-tools-1.48.0-1.el9.x86_64
libvirt-libs-8.2.0-1.el9.x86_64
qemu-img-7.0.0-1.el9.x86_64
nbdkit-server-1.30.4-1.el9.x86_64
libnbd-1.12.2-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a windows uefi guest on VMware env, then convert the guest from VMware to local qemu by v2v
virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA  esx6.7-win10-x86_64-efi -ip /home/passwd -o qemu -os /home

2. Check files which is created by v2v
# ls /home/esx6.7-win10-x86_64-efi
esx6.7-win10-x86_64-efi-sda  esx6.7-win10-x86_64-efi.sh  

3. Check the shell file of guest
# cat /home/esx6.7-win10-x86_64-efi.sh 
#!/bin/sh -

# Make a copy of the UEFI variables template
uefi_vars="$(mktemp)"
cp '/usr/share/OVMF/OVMF_VARS.fd' "$uefi_vars"

/usr/libexec/qemu-kvm \
    -no-user-config \
    -nodefaults \
    -name esx6.7-win10-x86_64-efi \
    -device vmgenid,guid=afcb8d61-c6e0-f21f-c735-a9d307a48270,id=vmgenid0 \
    -machine q35,smm=on,accel=kvm:tcg \
    -global driver=cfi.pflash01,property=secure,value=on \
    -drive if=pflash,format=raw,file=/usr/share/OVMF/OVMF_CODE.secboot.fd,readonly \
    -drive if=pflash,format=raw,file="$uefi_vars" \
    -m 2048 \
    -smp cpus=2,sockets=1,cores=2,threads=1 \
    -drive file=/home/esx6.7-win10-x86_64-efi-sda,format=raw,if=none,id=drive-vblk-0,media=disk \
    -device virtio-blk-pci,drive=drive-vblk-0 \
    -netdev user,id=net0 \
    -device virtio-net-pci,netdev=net0,mac=00:50:56:ac:a0:b9 \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-balloon \
    -device pvpanic,ioport=0x505

4. Try to create guest from qemu shell file
# ./esx6.7-win10-x86_64-efi.sh
qemu-kvm: -drive if=pflash,format=raw,file=/usr/share/OVMF/OVMF_CODE.secboot.fd,readonly: warning: short-form boolean option 'readonly' deprecated
Please use readonly=on instead
VNC server running on ::1:5900


Actual results:
As above description

Expected results:
There is no qemu-kvm warning when create guest from qemu shell file which is converted by v2v

Additional info:

Comment 3 Laszlo Ersek 2022-05-09 08:28:18 UTC
Subject: [v2v PATCH] output_qemu: pass "=on" with "readonly" to "-drive"
Message-Id: <20220509082711.5794-1-lersek>
https://listman.redhat.com/archives/libguestfs/2022-May/028821.html

Comment 4 Laszlo Ersek 2022-05-10 11:02:29 UTC
(In reply to Laszlo Ersek from comment #3)
> Subject: [v2v PATCH] output_qemu: pass "=on" with "readonly" to "-drive"
> Message-Id: <20220509082711.5794-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2022-May/028821.html

Upstream commit 44dad537b567.

Comment 5 Vera 2022-05-24 13:14:14 UTC
Verified with the versions.

virt-v2v-2.0.5-1.el9.x86_64
libnbd-1.12.2-1.el9.x86_64
libvirt-libs-8.3.0-1.el9.x86_64
nbdkit-server-1.30.5-1.el9.x86_64
libguestfs-1.48.2-2.el9.x86_64
guestfs-tools-1.48.1-1.el9.x86_64
qemu-img-7.0.0-4.el9.x86_64

Steps:
1. Prepare a windows uefi guest on VMware env, then convert the guest from VMware to local qemu by v2v
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA  esx6.7-win10-x86_64-efi -ip /v2v-ops/esxpw -o qemu -os /home
[   0.0] Setting up the source: -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk esx6.7-win10-x86_64-efi
[   2.3] Opening the source
[   8.5] Inspecting the source
[  17.1] Checking for sufficient free disk space in the guest
[  17.1] Converting Windows 10 Enterprise to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  22.7] Mapping filesystem data to avoid copying unused and blank areas
[  24.3] Closing the overlay
[  24.6] Assigning disks to buses
[  24.6] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[  24.6] Setting up the destination: -o qemu -os /home
[  26.0] Copying disk 1/1
█ 100% [****************************************]
[ 496.0] Creating output metadata
[ 496.0] Finishing off


2. Check files which is created by v2v
# ls /home |grep esx6.7
esx6.7-win10-x86_64-efi-sda
esx6.7-win10-x86_64-efi.sh

3. Check the shell file of guest
# cat /home/esx6.7-win10-x86_64-efi.sh 
#!/bin/sh -

# Make a copy of the UEFI variables template
uefi_vars="$(mktemp)"
cp '/usr/share/OVMF/OVMF_VARS.fd' "$uefi_vars"

/usr/libexec/qemu-kvm \
    -no-user-config \
    -nodefaults \
    -name esx6.7-win10-x86_64-efi \
    -device vmgenid,guid=afcb8d61-c6e0-f21f-c735-a9d307a48270,id=vmgenid0 \
    -machine q35,smm=on,accel=kvm:tcg \
    -global driver=cfi.pflash01,property=secure,value=on \
    -drive if=pflash,format=raw,file=/usr/share/OVMF/OVMF_CODE.secboot.fd,readonly=on \
    -drive if=pflash,format=raw,file="$uefi_vars" \
    -m 2048 \
    -smp cpus=2,sockets=1,cores=2,threads=1 \
    -drive file=/home/esx6.7-win10-x86_64-efi-sda,format=raw,if=none,id=drive-vblk-0,media=disk \
    -device virtio-blk-pci,drive=drive-vblk-0 \
    -netdev user,id=net0 \
    -device virtio-net-pci,netdev=net0,mac=00:50:56:ac:a0:b9 \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-balloon \
    -device pvpanic,ioport=0x505

4. Try to create guest from qemu shell file
# ./esx6.7-win10-x86_64-efi.sh 
VNC server running on ::1:5900


No warning info.

Moving to Verified:Tested.

Comment 10 Vera 2022-05-31 07:24:16 UTC
Verified with the versions:

virt-v2v-2.0.6-1.el9.x86_64
libnbd-1.12.2-1.el9.x86_64
libvirt-libs-8.3.0-1.el9.x86_64
nbdkit-server-1.30.5-1.el9.x86_64
libguestfs-1.48.3-1.el9.x86_64
guestfs-tools-1.48.2-1.el9.x86_64
qemu-img-7.0.0-5.el9.x86_64

Steps:
1. Prepare a windows uefi guest on VMware env, then convert the guest from VMware to local qemu by v2v
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA  esx6.7-win10-x86_64-efi -ip /v2v-ops/esxpw -o qemu -os /home
[   0.1] Setting up the source: -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk esx6.7-win10-x86_64-efi
[   2.1] Opening the source
[  11.3] Inspecting the source
[  22.7] Checking for sufficient free disk space in the guest
[  22.7] Converting Windows 10 Enterprise to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  29.3] Mapping filesystem data to avoid copying unused and blank areas
[  30.8] Closing the overlay
[  31.0] Assigning disks to buses
[  31.0] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[  31.0] Setting up the destination: -o qemu -os /home
[  32.8] Copying disk 1/1
█ 100% [****************************************]
[ 519.8] Creating output metadata
[ 519.8] Finishing off


2. Check files which is created by v2v
# ls /home |grep esx6.7
esx6.7-win10-x86_64-efi-sda
esx6.7-win10-x86_64-efi.sh

3. Check the shell file of guest
# cat /home/esx6.7-win10-x86_64-efi.sh 
#!/bin/sh -

# Make a copy of the UEFI variables template
uefi_vars="$(mktemp)"
cp '/usr/share/OVMF/OVMF_VARS.fd' "$uefi_vars"

/usr/libexec/qemu-kvm \
    -no-user-config \
    -nodefaults \
    -name esx6.7-win10-x86_64-efi \
    -device vmgenid,guid=afcb8d61-c6e0-f21f-c735-a9d307a48270,id=vmgenid0 \
    -machine q35,smm=on,accel=kvm:tcg \
    -global driver=cfi.pflash01,property=secure,value=on \
    -drive if=pflash,format=raw,file=/usr/share/OVMF/OVMF_CODE.secboot.fd,readonly=on \
    -drive if=pflash,format=raw,file="$uefi_vars" \
    -m 2048 \
    -smp cpus=2,sockets=1,cores=2,threads=1 \
    -drive file=/home/esx6.7-win10-x86_64-efi-sda,format=raw,if=none,id=drive-vblk-0,media=disk \
    -device virtio-blk-pci,drive=drive-vblk-0 \
    -netdev user,id=net0 \
    -device virtio-net-pci,netdev=net0,mac=00:50:56:ac:a0:b9 \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-balloon \
    -device pvpanic,ioport=0x505

4. Try to create guest from qemu shell file
# ./esx6.7-win10-x86_64-efi.sh 
VNC server running on ::1:5900


No warning info.

Moving to Verified.

Comment 12 errata-xmlrpc 2022-11-15 09:56:05 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 (Low: virt-v2v security, bug fix, and enhancement update), 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://access.redhat.com/errata/RHSA-2022:7968