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 2023277 - Correct regexps used to fix schtasks command when the ShortDatePattern uses dots instead of / (eg. yy.M.d)
Summary: Correct regexps used to fix schtasks command when the ShortDatePattern uses d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: virt-v2v
Version: 9.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: mxie@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 2023279
TreeView+ depends on / blocked
 
Reported: 2021-11-15 11:23 UTC by Xiaodai Wang
Modified: 2022-05-17 13:45 UTC (History)
8 users (show)

Fixed In Version: virt-v2v-1.45.97-3.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2023279 (view as bug list)
Environment:
Last Closed: 2022-05-17 13:41:55 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-102748 0 None None None 2021-11-15 11:29:52 UTC
Red Hat Product Errata RHEA-2022:2566 0 None None None 2022-05-17 13:42:32 UTC

Description Xiaodai Wang 2021-11-15 11:23:23 UTC
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

Comment 2 Klaus Heinrich Kiwi 2021-11-17 14:27:17 UTC
I think this should be low priority, given bz1895323 was addresses/worked-around.

I also wonder if we should make this an upstream feature request, and not a downstream one.

Comment 3 Richard W.M. Jones 2021-11-22 10:30:43 UTC
This is related to this patch:
https://listman.redhat.com/archives/libguestfs/2021-November/msg00139.html

The issue is that the powershell command we use to fix the date to schtasks
seems wrong.  However it still appears to work OK when run in virt-v2v
(not when the same command is run by hand however).

The patch does look like it is correct, and we should likely use it anyway,
but the fact that virt-v2v is not broken is a little bit worrying.

Comment 4 Richard W.M. Jones 2022-02-01 09:05:02 UTC
The patch which fixes this (if it's a bug) is upstream in
commit d9dc6c42ae64ba92993dbd9477f003ba73fcfa2f and included
in RHEL 9.0.

Comment 7 mxie@redhat.com 2022-02-08 15:07:22 UTC
Verify the bug with below builds:
virt-v2v-1.45.97-3.el9.x86_64
libguestfs-1.46.1-2.el9.x86_64
guestfs-tools-1.46.1-6.el9.x86_64
libvirt-libs-8.0.0-3.el9.x86_64
qemu-img-6.2.0-7.el9.x86_64
nbdkit-1.28.5-1.el9.x86_64
libnbd-1.10.4-1.el9.x86_64


Steps:
1.Prepare a guest which Change region format to "Chinese" and the short date format to 'yy.M.d' on VMware
1.1  Open poweshell in guest and execute schtasks.exe command with old $FormatHack = ($([System.Globalization.DateTimeFormatInfo]::CurrentInfo.ShortDatePattern) -replace 'M+/', 'MM/') -replace 'd+/', 'dd/', can reproduce the error of comment0, details please check the screenshot 'formathack-comment7'
1.2  Open poweshell in guest and execute schtasks.exe command with new $FormatHack = (($([System.Globalization.DateTimeFormatInfo]::CurrentInfo.ShortDatePattern) -replace 'y+', 'yyyy') -replace 'M+', 'MM') -replace 'd+', 'dd', the task can be created successfully, details please check the screenshot 'formathack-comment7'

2.Power off the guest, then convert the guest from VMware to rhv 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.2 -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA  -o rhv-upload -of qcow2 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -ip /home/passwd -op /home/rhvpasswd  -os nfs_data -n ovirtmgmt esx6.7-win2022-x86_64-uefi -oo rhv-direct=true
[   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-win2022-x86_64-uefi
[   2.2] Opening the source
[  10.2] Inspecting the source
[  15.6] Checking for sufficient free disk space in the guest
[  15.6] Converting Windows Server 2022 Standard to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  25.3] Mapping filesystem data to avoid copying unused and blank areas
[  26.6] Closing the overlay
[  26.8] Assigning disks to buses
[  26.8] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[  26.8] Setting up the destination: -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data
[  48.2] Copying disk 1/1
█ 100% [****************************************]
[1512.7] Creating output metadata
[1575.8] Finishing off

3.Check guest after conversion, checkpoints of guest are passed


Result:
   The bug has been fixed, move the bug from ON_QA to VERIFIED

Comment 10 errata-xmlrpc 2022-05-17 13:41:55 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 (new packages: virt-v2v), 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/RHEA-2022:2566


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