Bug 1625216

Summary: Fix rhev-apt command that virt-v2v runs in Windows guests on first boot [rhel-7.6.z]
Product: Red Hat Enterprise Linux 7 Reporter: Oneata Mircea Teodor <toneata>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.6CC: jherrman, juzhou, lveyde, michal.skrivanek, mtessun, mxie, mzhan, ptoscano, rjones, sbonazzo, tzheng, virt-bugs, xiaodwan
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.38.2-12.el7_6.1 Doc Type: Bug Fix
Doc Text:
After converting a Windows virtual machine (VM) to RHV using the virt-v2v utility, the RHV Application Provisioning Tool (RHEV APT) service failed to start on that VM. This update fixes the invocation of the "RHEV APT" command, which enables RHV APT to start as expected in the converted VMs.
Story Points: ---
Clone Of: 1624902 Environment:
Last Closed: 2018-11-27 01:19:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1624902    
Bug Blocks:    
Attachments:
Description Flags
esxi6.0-win2012r2-new.log
none
esxi6.7-win2012r2-new.log none

Description Oneata Mircea Teodor 2018-09-04 12:13:40 UTC
This bug has been copied from bug #1624902 and has been proposed to be backported to 7.6 z-stream (EUS).

Comment 3 mxie@redhat.com 2018-10-17 06:44:03 UTC
Verify the bug with below builds:
virt-v2v-1.38.2-12.el7_6.1.x86_64
libguestfs-1.38.2-12.el7_6.1.x86_64
libvirt-4.5.0-10.el7_6.2.x86_64
qemu-kvm-rhev-2.12.0-18.el7_6.1.x86_64
nbdkit-1.2.6-1.el7_6.1.x86_64
virtio-win-1.9.6-1.el7.noarch
libguestfs-winsupport-7.2-2.el7.x86_64


Steps:
1.Convert below windows guests from VMware to rhv by virt-v2v
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -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 -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd --password-file /tmp/passwd -os nfs_data -b ovirtmgmt $esx6.7_windows_guest

2.Summarize status of rhev-apt installation in windows guests as below:
  
   Guest           rhev-apt serivce running
   Win7                 Yes
   Win2008              Yes
   Win2008r2            Yes
   Win2012              Yes
   Win2012r2            No
   Win8                 Yes
   Win8.1               Yes
   Win10                Yes
   Win2016              Yes


Additional info:

For win2012r2 guest:
1) Convert win2012r2 guest from ESXi6.7 to rhv by latest virt-v2v,rhev-apt can NOT start in guest after v2v conversion, details pls refer to log"esxi6.7-win2012r2-new.log"
2) Convert win2012r2 guest from ESXi6.0 to rhv by latest virt-v2v,rhev-apt can start in guest after v2v conversion, details pls refer to log"esxi6.0-win2012r2-new.log"


  
3.Check the firstboot script as below:

  @echo off

  echo installing rhev-apt
  "\rhev-apt.exe" /S /v/qn
  echo starting rhev-apt
  net start rhev-apt


Verify result:
   1.ESXi6.7 Win2012r2 guest have problem to start rhev-apt service in OS after v2v conversion
   2.Script of firstboot has corrected the command as "\rhev-apt.exe" /S /v/qn"

Hi rjones,

    Pls help to check result1, thanks!

Comment 4 mxie@redhat.com 2018-10-17 06:45:25 UTC
Created attachment 1494716 [details]
esxi6.0-win2012r2-new.log

Comment 5 mxie@redhat.com 2018-10-17 06:46:02 UTC
Created attachment 1494717 [details]
esxi6.7-win2012r2-new.log

Comment 6 Richard W.M. Jones 2018-10-17 09:36:44 UTC
The win2012r2 bug could be bug 1584678.

Comment 7 Richard W.M. Jones 2018-10-17 09:39:21 UTC
By the way, the log that would be useful from Win2012R2 is the file
c:\program files\guestfs/firstboot/log.txt
But probably better to discuss this over on bug 1584678 since
it seems like _this_ bug is now fixed.

Comment 8 mxie@redhat.com 2018-10-17 09:48:35 UTC
Thanks rjones, according to comment3 ~ comment7, move this bug from ON_QA to VERIFIED

Comment 10 errata-xmlrpc 2018-11-27 01:19:20 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, 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/RHBA-2018:3659