[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] floppy disk icon
From: |
golinux |
Subject: |
Re: [Qemu-discuss] floppy disk icon |
Date: |
Thu, 17 Nov 2016 12:31:48 -0600 |
Thanks for the quick response!
On 2016-11-17 11:14, Brian Candler wrote:
On 17/11/2016 15:41, golinux wrote:
Why does qemu insist on putting a floppy icon on the desktop and
entering a menu item for a non-existent floppy in Thunar?
I think you'll find qemu does not put any icons anywhere. It just
emulates the hardware of a PC. The window environment inside the
guest OS draws the icons. But qemu can emulate a floppy drive, and
this may be detected by the guest OS.
This file does not exist on the imaged system but pops up in qemu.
hwinfo --short --floppy
floppy:
/dev/fd0 Floppy Disk
How are you starting qemu? Is it from libvirt, or are you running qemu
directly from the command line, or some other way?
I am starting qemu with a bash script - yqemu - (not written by me). I
choose options 2 and 5. Will also post inline since the list may not
take attachments:
----------------------------------------
#!/usr/bin/env bash
#
# yqemu : yad front-end to qemu-system-*
set -x
mem_opt="-m $1"
if [ -z "$1" ] ; then
mem_opt="-m 512"
fi
image_file=$(yad --file-selection --file-filter="*.[iI][sSmM][oOgG]"
--file-filter="*" \
--width=780 --height=640 --center --title=$"Select image file"
--text="Select .iso or .img file." \
--filename="*" --button=OK:0 --button=Exit:1)
if [[ $? = 1 ]] ; then
exit 0
fi
if [[ $image_file =~ .*\.(img|IMG) ]] ; then
device_opt="-drive file=$image_file"
elif
[[ $image_file =~ .*\.(iso|ISO) ]] ; then
device_opt="-cdrom $image_file"
else
echo -e "\n I don't know what to do with ${image_file##*/} \n"
fi
options=$(yad --list --checklist --title="Select options" --text="Select
the options you want." \
--column "Choose" --column "Num" --column "Options" --button=OK:0
--button=Exit:1 \
--width=480 --height=220 --center \
TRUE 01 "Use 64-bit" \
TRUE 02 "Enable KVM" \
TRUE 03 "Enable uefi" \
TRUE 04 "Enable ssh" \
TRUE 05 "Display (vga std)")
if [[ $? = 1 ]] ; then
exit 0
fi
echo "$options"
if [[ $options =~ 01 ]] ;then
cpu_opt="x86_64"
else
cpu_opt="i386"
fi
if [[ $options =~ 02 ]] ;then
kvm_opt="-enable-kvm"
fi
if [[ $options =~ 03 ]] ;then
uefi_opt="-bios /usr/share/ovmf/OVMF.fd"
fi
if [[ $options =~ 04 ]] ;then
net_opt="-device e1000,netdev=user.0 -netdev
user,id=user.0,hostfwd=tcp::5555-:22"
fi
if [[ $options =~ 05 ]] ; then
display_opt="-vga std"
fi
if [[ -n "$net_opt" ]] ; then
echo "
Host to guest: ssh -p5555 address@hidden
Guest to host: ssh -i /path/to/keyfile address@hidden
" | yad --text-info --left --title="SSH Access" --geometry=400x100+0+0
--button=Close:0 &
fi
qemu-system-${cpu_opt} ${kvm_opt} ${uefi_opt} ${mem_opt} ${net_opt}
${user_opt1} ${user_opt2} ${device_opt} \
-soundhw hda -smp cores=2,threads=2 &
exit 0
:<<COMMENT
Need to use yad --form for user-defined options
Options:
64-bit cpu_opt="x86_64" (if null, cpu_opt="i386")
enable kvm kvm_opt="-enable-kvm"
enable uefi uefi_opt="-bios /usr/share/ovmf/OVMF.fd"
memory mem_opt="-m $number"
ssh access net_opt="-device e1000,netdev=user.0 -netdev
user,id=user.0,hostfwd=tcp::5555-:22"
user-defined (text entry) user_opt1=
user-defined
qemu-system-${cpu_opt} ${kvm_opt} ${uefi_opt} ${mem_opt} ${net_opt}
${user_opt1} ${user_opt2} "$device_opt"
COMMENT
----------------------------------------
Post here the command line options which qemu is running with. On the
*host* system (the real hardware), try typing:
ps auxwww | grep qemu-system-x86_64
Since I have an i386 system I ran:
$ ps auxwww | grep qemu-system-i386
<user> 2323 2.1 13.9 712076 560872 ? SLl 11:40 0:51
qemu-system-i386 -enable-kvm -m 512 -cdrom
/home/snapshot/devuan-20161116_2216.iso -soundhw hda -smp
cores=2,threads=2
<user> 6786 0.0 0.0 4560 2192 pts/0 S+ 12:20 0:00 grep
qemu-system-i386
Also, inside the *guest* OS, try typing:
dmesg | grep floppy
Nothing
dmesg | grep fd0
[ 0.9407921] Floppy drive(s): fd0 is 1.44M
Hope I got all that right. Looking forward to a followup.
Regards,
Brian.
yqemu
Description: Text document
- [Qemu-discuss] floppy disk icon, golinux, 2016/11/17
- Re: [Qemu-discuss] floppy disk icon, Brian Candler, 2016/11/17
- Re: [Qemu-discuss] floppy disk icon,
golinux <=
- Re: [Qemu-discuss] floppy disk icon, Bodo Eggert, 2016/11/17
- Re: [Qemu-discuss] floppy disk icon, golinux, 2016/11/17
- Re: [Qemu-discuss] floppy disk icon, Brian Candler, 2016/11/17
- Re: [Qemu-discuss] floppy disk icon, golinux, 2016/11/18
- Re: [Qemu-discuss] floppy disk icon [solved], golinux, 2016/11/18