qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QUESTION] qemu: how to control the switch of floppy drive


From: Philippe Mathieu-Daudé
Subject: Re: [QUESTION] qemu: how to control the switch of floppy drive
Date: Fri, 9 Apr 2021 09:10:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Hi,

On 4/9/21 8:48 AM, Xu, Yanfei wrote:
> How can I disable the floppy controller drive when I boot a VM by qemu-
> system-x86_64? I did not specify any arguments about floppy, but after
> the qemu boots up, linux always can detect floppy drive and then
> modprobe the matched floppy.ko.
> 
> qemu version: v5.2
> 
> command line:
> 
> qemu-system-x86_64 -device virtio-net-
> pci,netdev=net0,mac=52:54:00:12:34:02 -netdev
> tap,id=net0,ifname=tap0,script=no,downscript=no -object rng-
> random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0
> -drive file=/path/to/images/qemux86-64
> /qemux86-64.ext4,if=virtio,format=raw -usb -device usb-tablet   -cpu
> core2duo -enable-kvm -m 512  -pidfile /path/to/pidfile_4167420 -m 512
> -snapshot -serial mon:vc -serial null  -kernel /path/to/qemux86-64
> /bzImage.bin -append 'root=/dev/vda rw  mem=512M
> ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1
> printk.time=1'
> 
> As I konw BIOS can control the switch of floppy controller on a real
> hardware, But how can I do it on qemu? And does the qemu enable that by
> default?

See
https://gitlab.com/qemu-project/qemu/-/blob/master/docs/qdev-device-use.txt#L105

* if=floppy

  -device floppy,unit=UNIT,drive=DRIVE-ID

  Without any -device floppy,... you get an empty unit 0 and no unit
  1.  You can use -nodefaults to suppress the default unit 0, see
  "Default Devices".

Regards,

Phil.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]