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 1670286 - Cannot use virt-install to create win10 guest with iso file on both rhel7 and rhel8
Summary: Cannot use virt-install to create win10 guest with iso file on both rhel7 and...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cdrkit
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Jakub Martisko
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 1670288
TreeView+ depends on / blocked
 
Reported: 2019-01-29 07:32 UTC by zonglin jiang
Modified: 2019-05-22 04:40 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1670288 (view as bug list)
Environment:
Last Closed: 2019-03-11 09:17:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zonglin jiang 2019-01-29 07:32:38 UTC
Description
Cannot use virt-install to create win10 guest with iso file on both rhel7 and rhel8 while can it can be installed successfully via virt-manager

Version-Release number of selected component (if applicable):
For rhel 7
kernel-3.10.0-957.el7.x86_64
qemu-kvm-rhev-2.12.0-19.el7_6.2.x86_64
libvirt-python-4.5.0-1.el7.x86_64
libvirt-4.5.0-10.el7_6.4.x86_64
virt-install-1.5.0-1.el7.noarch
genisoimage-1.1.11-25.el7.x86_64

For rhel8
kernel-4.18.0-60.el8.x86_64
python3-libvirt-4.5.0-1.module+el8+2529+a9686a4d.x86_64
virt-install-2.0.0-2.el8.noarch
libvirt-4.5.0-18.module+el8+2691+dc742e5d.x86_64
qemu-kvm-2.12.0-57.module+el8+2683+02b3b955.x86_64
genisoimage-1.1.11-39.el8.x86_64

How reproducible
100%

Steps to Reproduce
virt-install --name test1 --memory 1024 --disk none -l Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso --graphics vnc --debug

Actual results:
Starting install...
isoinfo: Unable to find Joliet SVD
isoinfo: Unable to find Joliet SVD
isoinfo: Unable to find Joliet SVD
ERROR    Command '['isoinfo', '-J', '-i', '/home/redhat/Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso', '-f']' returned non-zero exit status 255

Expected results:
VM can be installed successfully

Addition info:
Bug log for rhel7

[redhat@local ~]$ virt-install --name test1 --memory 1024 --disk none -l Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso --graphics vnc

Starting install...
isoinfo: Unable to find Joliet SVD
isoinfo: Unable to find Joliet SVD
isoinfo: Unable to find Joliet SVD
ERROR    Command '['isoinfo', '-J', '-i', '/home/redhat/Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso', '-f']' returned non-zero exit status 255
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///session start test1
otherwise, please restart your installation.
[redhat@local ~]$ ^C
[redhat@local ~]$ clear
[redhat@local ~]$ virt-install --name test1 --memory 1024 --disk none -l Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso --graphics vnc --debug
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (cli:265) Launched with command line: /usr/share/virt-manager/virt-install --name test1 --memory 1024 --disk none -l Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso --graphics vnc --debug
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (cli:279) Requesting libvirt URI default
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (cli:282) Received libvirt URI qemu:///session
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (virt-install:358) Requesting virt method 'default', hv type 'default'.
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (virt-install:583) Received virt method 'kvm'
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (virt-install:584) Hypervisor name is 'hvm'
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (virt-install:270) Distilled --network options: ['default']
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (virt-install:183) Distilled --disk options: ['none']
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (distroinstaller:283) installer.detect_distro returned=win10
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (guest:251) Setting Guest.os_variant to 'win10'
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (virt-install:697) Guest.has_install_phase: True

Starting install...
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (urlfetcher:56) Using scratchdir=/home/redhat/.cache/virt-manager/boot
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (urlfetcher:503) Finding distro store for location=/home/redhat/Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (urlfetcher:345) Running isoinfo: ['isoinfo', '-J', '-i', '/home/redhat/Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso', '-x', '/.treeinfo']
isoinfo: Unable to find Joliet SVD
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (urlfetcher:345) Running isoinfo: ['isoinfo', '-J', '-i', '/home/redhat/Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso', '-x', '/content']
isoinfo: Unable to find Joliet SVD
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (urlfetcher:522) variant=win10 has distro=win, looking for matching distro store to prioritize
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (urlfetcher:533) No matching store found, not prioritizing anything
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (urlfetcher:1144) No treearch found in uri, defaulting to arch=i386
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (urlfetcher:357) Running isoinfo: ['isoinfo', '-J', '-i', '/home/redhat/Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso', '-f']
isoinfo: Unable to find Joliet SVD
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (cli:317)   File "/usr/share/virt-manager/virt-install", line 1008, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 1002, in main
    start_install(guest, options)
  File "/usr/share/virt-manager/virt-install", line 728, in start_install
    fail(e, do_exit=False)
  File "/usr/share/virt-manager/virtinst/cli.py", line 317, in fail
    logging.debug("".join(traceback.format_stack()))

[Tue, 29 Jan 2019 10:16:04 virt-install 27111] ERROR (cli:318) Command '['isoinfo', '-J', '-i', '/home/redhat/Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso', '-f']' returned non-zero exit status 255
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (cli:320) 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-install", line 707, in start_install
    transient=options.transient)
  File "/usr/share/virt-manager/virtinst/guest.py", line 480, in start_install
    self._prepare_install(meter, dry)
  File "/usr/share/virt-manager/virtinst/guest.py", line 313, in _prepare_install
    self.installer.prepare(self, meter)
  File "/usr/share/virt-manager/virtinst/installer.py", line 200, in prepare
    self._prepare(guest, meter)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 220, in _prepare
    self._prepare_kernel_url(guest, fetcher)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 127, in _prepare_kernel_url
    store = self._get_store(guest, fetcher)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 114, in _get_store
    self._cached_store = urlfetcher.getDistroStore(guest, fetcher)
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 541, in getDistroStore
    if store.isValidStore():
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 1248, in isValidStore
    self._is_install_cd,
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 1245, in <genexpr>
    return any(check() for check in [
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 1198, in _is_regular_tree
    if not self._check_manifest("current/images/MANIFEST"):
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 1170, in _check_manifest
    if not self.fetcher.hasFile(filename):
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 143, in hasFile
    ret = self._hasFile(url)
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 358, in _hasFile
    output = subprocess.check_output(cmd)
  File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['isoinfo', '-J', '-i', '/home/redhat/Downloads/en_windows_10_enterprise_x64_dvd_6851151.iso', '-f']' returned non-zero exit status 255
[Tue, 29 Jan 2019 10:16:04 virt-install 27111] DEBUG (cli:331) Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///session start test1
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///session start test1
otherwise, please restart your installation.


Bug log for rhel8

[root@dhcp-66-71-64 ~]#  virt-install --name test1 --memory 1024 --disk none -l Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso --graphics vnc --debug
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (cli:200) Launched with command line: /usr/share/virt-manager/virt-install --name test1 --memory 1024 --disk none -l Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso --graphics vnc --debug
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (virt-install:243) Distilled --network options: ['default']
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (virt-install:159) Distilled --disk options: ['none']
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (cli:214) Requesting libvirt URI default
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (cli:217) Received libvirt URI qemu:///system
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (installer:276) installer.detect_distro returned=win10
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (guest:266) Setting Guest osinfo <_OsVariant name=win10>
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (virt-install:587) Guest.has_install_phase: True

Starting install...
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urlfetcher:37) Using scratchdir=/var/lib/libvirt/boot
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urldetect:242) Finding distro store for location=Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urldetect:255) variant=win10 has distro=win, looking for matching distro store to prioritize
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urldetect:266) No matching store found, not prioritizing anything
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urlfetcher:316) Running isoinfo: ['isoinfo', '-J', '-i', 'Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso', '-f']
isoinfo: Unable to find Joliet SVD
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urldetect:40) Failed to acquire file=.treeinfo
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urlfetcher:316) Running isoinfo: ['isoinfo', '-J', '-i', 'Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso', '-f']
isoinfo: Unable to find Joliet SVD
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urldetect:40) Failed to acquire file=content
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urlfetcher:316) Running isoinfo: ['isoinfo', '-J', '-i', 'Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso', '-f']
isoinfo: Unable to find Joliet SVD
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urldetect:40) Failed to acquire file=current/images/MANIFEST
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urlfetcher:316) Running isoinfo: ['isoinfo', '-J', '-i', 'Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso', '-f']
isoinfo: Unable to find Joliet SVD
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urldetect:40) Failed to acquire file=daily/MANIFEST
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urlfetcher:316) Running isoinfo: ['isoinfo', '-J', '-i', 'Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso', '-f']
isoinfo: Unable to find Joliet SVD
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urldetect:40) Failed to acquire file=.disk/info
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urlfetcher:316) Running isoinfo: ['isoinfo', '-J', '-i', 'Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso', '-f']
isoinfo: Unable to find Joliet SVD
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (urldetect:40) Failed to acquire file=VERSION
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (cli:253)   File "/usr/share/virt-manager/virt-install", line 955, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 949, in main
    start_install(guest, installer, options)
  File "/usr/share/virt-manager/virt-install", line 625, in start_install
    fail(e, do_exit=False)
  File "/usr/share/virt-manager/virtinst/cli.py", line 253, in fail
    logging.debug("".join(traceback.format_stack()))

[Tue, 29 Jan 2019 10:11:42 virt-install 13898] ERROR (cli:254) Could not find an installable distribution at 'Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso'

The location must be the root directory of an install tree.
See virt-install man page for various distro examples.
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (cli:256) 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-install", line 598, in start_install
    transient=options.transient)
  File "/usr/share/virt-manager/virtinst/installer.py", line 405, in start_install
    self._prepare(guest, meter)
  File "/usr/share/virt-manager/virtinst/installer.py", line 160, in _prepare
    k, i, a = self._treemedia.prepare(guest, meter)
  File "/usr/share/virt-manager/virtinst/installertreemedia.py", line 149, in prepare
    return self._prepare_kernel_url(guest, fetcher)
  File "/usr/share/virt-manager/virtinst/installertreemedia.py", line 116, in _prepare_kernel_url
    store = self._get_store(guest, fetcher)
  File "/usr/share/virt-manager/virtinst/installertreemedia.py", line 112, in _get_store
    self._cached_store = urldetect.getDistroStore(guest, fetcher)
  File "/usr/share/virt-manager/virtinst/urldetect.py", line 290, in getDistroStore
    (fetcher.location, extramsg)))
ValueError: Could not find an installable distribution at 'Downloads/en_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10189290.iso'

The location must be the root directory of an install tree.
See virt-install man page for various distro examples.
[Tue, 29 Jan 2019 10:11:42 virt-install 13898] DEBUG (cli:267) Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start test1
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start test1
otherwise, please restart your installation.

Comment 1 Cole Robinson 2019-03-03 21:33:13 UTC
Thanks for the report. So you are using -l/--location with windows media which won't ever work. --location needs an install tree with a kernel/initrd path for us to pull out and boot directly, but that's really only for unixlike operating systems, which windows doesn't cover. you need to use --cdrom with windows media

Though that's kind of confused here because isoinfo -J is failing with windows media. It looks like windows media doesn't provide joliet file info and all content is stored as UDF which throws off our usage of isoinfo. Though even if we taught virt-install to read UDF it wouldn't make any difference for windows media because there's nothing for us to kernel boot in this case.

Long story short you should use --cdrom, not --location, with windows ISO media. But I think we should improve the error message here

Comment 2 zonglin jiang 2019-03-08 02:47:28 UTC
Tried to use "-c" and "--cdrom" and both works.
Thanks a lot.


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