+++ This bug was initially created as a clone of Bug #2023277 +++ Description of problem: RFE: Adapt all date&time formats in firstboot script Version-Release number of selected component (if applicable): virt-v2v-1.45.3-3.el9.x86_64.rpm How reproducible: 100% Steps to Reproduce: 1. Change the locale to "China" and the time format to 'yy.M.d'. 2. Run the powershell command by hand in a powershell console of a windows guest. The command can be found in this commit: https://github.com/libguestfs/virt-v2v/commit/b65711c9293415f671d35d0e2f9b55a74343da45 You could also follow the comments in bz1895323. https://bugzilla.redhat.com/show_bug.cgi?id=1895323#c44 Actual results: ERROR: Invalid Start Date (Date should be in "yyyy/mm/dd" format Expected results: The powershell commands should be success. Additional info: N/A
See: https://bugzilla.redhat.com/show_bug.cgi?id=2023277#c3
Verified with the version: virt-v2v-1.42.0-18.module+el8.6.0+13447+4b5d0856.x86_64 Steps to verify: 1. convert the VM with china locale; # virt-v2v -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -o rhv-upload -of raw -os nfs_data -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /v2v-ops/rhvpasswd -oo rhv-cafile=/v2v-ops/ca22.pem -oo rhv-cluster=Default -oo rhv-direct --mac 00:50:56:ac:62:28:bridge:ovirtmgmt esx7.0-win2019-x86_64-schtasks-error -it vddk -io vddk-libdir=/root/vddk_libdir/latest -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 --ip /v2v-ops/esxpw [ 0.5] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64-schtasks-error -it vddk -io vddk-libdir=/root/vddk_libdir/latest -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 [ 2.2] Creating an overlay to protect the source from being modified [ 3.0] Opening the overlay [ 7.5] Inspecting the overlay [ 11.9] Checking for sufficient free disk space in the guest [ 11.9] Estimating space required on target for each disk [ 11.9] Converting Windows Server 2019 Standard to run on KVM virt-v2v: This guest has virtio drivers installed. [ 23.9] Mapping filesystem data to avoid copying unused and blank areas [ 25.1] Closing the overlay [ 25.4] Assigning disks to buses [ 25.4] Checking if the guest needs BIOS or UEFI to boot [ 25.4] Initializing the target -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /v2v-ops/rhvpasswd -os nfs_data [ 26.7] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/tmp/v2vnbdkit.rBz1aV/nbdkit4.sock", "file.export": "/" } (raw) (100.00/100%) [ 483.9] Creating output metadata [ 485.9] Finishing off 2. Check powershell command in 0002-install-qemu-ga-x86_64-msi, the command has been changed as: powershell.exe -command \"$d = (get-date).AddSeconds(120); $FormatHack = (($([System.Globalization.DateTimeFormatInfo]::CurrentInfo.ShortDatePattern) -replace 'y+', 'yyyy') -replace 'M+', 'MM') -replace 'd+', 'dd'; schtasks.exe /Create /SC ONCE /ST $d.ToString('HH:mm') /SD $d.ToString($FormatHack) /RU SYSTEM /TN Firstboot-qemu-ga /TR \"C:\qemu-ga-x86_64.msi /forcerestart /qn /l+*vx C:\qemu-ga-x86_64.msi.log\"" Move the status 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 (Moderate: virt:rhel and virt-devel:rhel 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:1759