Skip to contentSkip to conversation

Unable to use USB as hda in Windows

Qemu-devel David 2 participants 2 messages Sep 10, 2013 – Aug 8, 2017

lore
Share & tools
lore

David

author
#0 lore raw

Public bug reported:

I built qemu 1.6.0 from source in MinGW (and all dependents not available with mingw-get)
The command line:
qemu-system-i386.exe -m 1024 -hda \\.\PhysicalDrive1 -L pc-bios
or
qemu-system-x86_64.exe -m 1024 -hda \\.\PhysicalDrive1 -L pc-bios
(or the *w.exe equivalents)
reports in stderr.txt:
qemu-system-i386.exe: -hda \\.\PhysicalDrive1: Block protocol 'host_device' doesn't support the option 'filename' qemu-system-i386.exe: -hda \\.\PhysicalDrive1: could not open disk image \\.\PhysicalDrive1: Invalid argument

I have also found this bug in 1.5 but not in 1.4

Some Help:
The code in Qemu is a bit beyond me at 1am, but I was able to determine the root cause seems to be that block.c is becoming confused about referring to a file but not having a file name. I have been able to work around this by changing line 860 of block.c from: "if (qdict_size(options) != 0) {" to "if (qdict_size(options) != 0 && !is_windows_drive(filename)) {"

But I don't think this is a good solution (it is assuming that nothing else could be wrong), and I can't be sure that I'm not masking some real issue.

FWIW; Build is on XP, but execution is on Win7.

Thanks.

** Affects: qemu
Importance: Undecided
Status: New

Signature · 36 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1223467

Title:
  Unable to use USB as hda in Windows

Status in QEMU:
  New

Bug description:
  I built qemu 1.6.0 from source in MinGW (and all dependents not available with mingw-get) 
  The command line:
  qemu-system-i386.exe -m 1024 -hda \\.\PhysicalDrive1 -L pc-bios
  or
  qemu-system-x86_64.exe -m 1024 -hda \\.\PhysicalDrive1 -L pc-bios
  (or the *w.exe equivalents)
  reports in stderr.txt:
  qemu-system-i386.exe: -hda \\.\PhysicalDrive1: Block protocol 'host_device' doesn't support the option 'filename'
  qemu-system-i386.exe: -hda \\.\PhysicalDrive1: could not open disk image \\.\PhysicalDrive1: Invalid argument

  I have also found this bug in 1.5 but not in 1.4

  Some Help:
  The code in Qemu is a bit beyond me at 1am, but I was able to determine the root cause seems to be that block.c is becoming confused about referring to a file but not having a file name. I have been able to work around this by changing line 860 of block.c from:  "if (qdict_size(options) != 0) {" to "if (qdict_size(options) != 0 && !is_windows_drive(filename)) {"

  But I don't think this is a good solution (it is assuming that nothing
  else could be wrong), and I can't be sure that I'm not masking some
  real issue.

  FWIW; Build is on XP, but execution is on Win7.

  Thanks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1223467/+subscriptions
#1 lore raw

** Changed in: qemu
Status: New => Fix Released

Signature · 36 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1223467

Title:
  Unable to use USB as hda in Windows

Status in QEMU:
  Fix Released

Bug description:
  I built qemu 1.6.0 from source in MinGW (and all dependents not available with mingw-get) 
  The command line:
  qemu-system-i386.exe -m 1024 -hda \\.\PhysicalDrive1 -L pc-bios
  or
  qemu-system-x86_64.exe -m 1024 -hda \\.\PhysicalDrive1 -L pc-bios
  (or the *w.exe equivalents)
  reports in stderr.txt:
  qemu-system-i386.exe: -hda \\.\PhysicalDrive1: Block protocol 'host_device' doesn't support the option 'filename'
  qemu-system-i386.exe: -hda \\.\PhysicalDrive1: could not open disk image \\.\PhysicalDrive1: Invalid argument

  I have also found this bug in 1.5 but not in 1.4

  Some Help:
  The code in Qemu is a bit beyond me at 1am, but I was able to determine the root cause seems to be that block.c is becoming confused about referring to a file but not having a file name. I have been able to work around this by changing line 860 of block.c from:  "if (qdict_size(options) != 0) {" to "if (qdict_size(options) != 0 && !is_windows_drive(filename)) {"

  But I don't think this is a good solution (it is assuming that nothing
  else could be wrong), and I can't be sure that I'm not masking some
  real issue.

  FWIW; Build is on XP, but execution is on Win7.

  Thanks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1223467/+subscriptions