Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • libvirt libvirt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 112
    • Issues 112
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libvirtlibvirt
  • libvirtlibvirt
  • Merge requests
  • !19

QEMU: support USB cdrom devices for the Windows 10 Arm64 installer

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Jan-Marek Glogowski requested to merge jmux/libvirt:qemu-usb-cdrom into master Aug 08, 2020
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 4

I'm trying to install Windows 10 Arm64 using libvirt. I have a manual QEMU call, which will correctly create USB cdrom devices using the (old) drive syntax:

-device nec-usb-xhci \
-device usb-storage,drive=install \
-drive if=none,id=install,format=raw,media=cdrom,readonly,file=/tmp/win10_arm64_wim_18363.959_en-us.iso \
-device usb-storage,drive=drivers \
-drive if=none,id=drivers,format=raw,media=cdrom,readonly,file=/tmp/virtio-win-0.1.187.iso \

This way the installer sees it's install media and the driver / virtio ISO.

libvirt instead creates the following following blockdev syntax:

-blockdev '{"driver":"file","filename":"/tmp/win10_arm64_wim_18363.959_en-us.iso","node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-3-format","read-only":true,"driver":"raw","file":"libvirt-3-storage"}' \
-device usb-storage,bus=usb.0,port=1,drive=libvirt-3-format,id=usb-disk0,bootindex=1,removable=on \

This loses the important information, that the USB device is a cdrom, so the installer won't find itself. Without the removable=on, it sees no devices at all. Turning the devices into "USB sticks" will just make the the installer see them, but it still can't access the filesystem.

From all I have read in the qemu code, the current -blockdev-based syntax can't support usb-storage cdroms. Other block device frontends have explicit -hd and -cd variants (ide, scsi). The most proper fix would probably be to add a media flag to the usb-storage device in QEMU, but OTOH ide-drive and scsi-disk were deprecated in QEMU. And it won't fix current QEMU versions, so the atached patch generates the old commandline options jut for USB cdroms.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: qemu-usb-cdrom