I expected QEmu’s -nodefaults to prevent the creation of default devices, but either I don’t use it correctly or it does not work as I expected.
I get this message, using the stripped down command line below, with QEmu 3.0.
The message:
qemu-system-i386: warning: multiple floppy disk controllers
with iobase=0x3f0 have been found
the one being picked for CMOS setup might not reflect your intent
Additional message in the VM’s terminal:
could not read the boot disk
The command line:
qemu-system-i386 \
-machine type=isapc,usb=no \
-nodefaults \
-device isa-vga \
-blockdev driver=file,node-name=fda-img,filename=fda.img \
-blockdev driver=raw,node-name=fda,file=fda-img \
-device isa-fdc,driveA=fda,fdtypeA=144,fdtypeB=none,bootindexA=0
I tried removing -machine type=isapc, but it changed nothing.
This is so, although the documentation says this:
-nodefaults
Don’t create default devices. Normally, QEMU sets the default devices like serial port, parallel port, virtual console, monitor device, VGA adapter, floppy and CD-ROM drive and others. The -nodefaults option will disable all those default devices.
I tried to add a --verbose option to the command line, with the hope it will request a dump of the full configuration QEmu creates, but such an option unfortunately does not exist.
My naive feeling is that it’s broken, but I must also consider I may be missing something … (hence this naive question).
— Update for more details —
Although there is no way to dump the created machine from the commande line, I found there is a info qtree in the monitor, which dumps the devices tree. Below, what it says:
[…]
dev: isa-fdc, id ""
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
driveA = ""
driveB = ""
check_media_rate = true
fdtypeA = "144"
fdtypeB = "none"
fallback = "288"
isa irq 6
bus: floppy-bus.1
type floppy-bus
dev: floppy, id ""
unit = 0 (0x0)
drive = "fda"
logical_block_size = 512 (0x200)
physical_block_size = 512 (0x200)
min_io_size = 0 (0x0)
opt_io_size = 0 (0x0)
discard_granularity = 4294967295 (0xffffffff)
write-cache = "auto"
share-rw = false
drive-type = "144"
[…]
dev: isa-fdc, id ""
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
driveA = ""
driveB = ""
check_media_rate = true
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
isa irq 6
bus: floppy-bus.0
type floppy-bus
[…]
It creates two floppy controllers, ignoring -nodefaults. Am I still missing something?
Also, surprisingly, for the first controller, which is the one I create, driveA and driveB are empty strings while driveA is assigned in the command line.