Score:1

qemu (KVM) how to set iscsi timeout on?

cn flag

I have opensuse 15.2 Leap on all systems

qemu 4.2.1

# /usr/bin/qemu-system-x86_64 --version
QEMU emulator version 4.2.1 (openSUSE Leap 15.2)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers

For guest system there are two disks, one image and one iscsi target

The problem is when network down or remote host, qemu doesn`t detach broken disk or generate error. It can wait dozens of time when target asnwers. Guest VM stops normaly work and wait too

This is my kvm configuration (qemu-kvm is symlink to /usr/bin/qemu-system-x86_64 ) :

   qemu-kvm -name cc-2 \
-m 8192  -machine accel=kvm -smp 8 \
-kernel /vtpool/containers/lib/vmlinuz-4.12.14-lp151.28.52-default \
-append "root=/dev/md0p1 md=0,/dev/vda,/dev/vdb  splash=silent ctype=cc-2 mitigations=auto quiet emode=ok hosted=t18" \
-initrd /vtpool/containers/lib/initrd-4.12.14-lp151.28.52-default \
-drive file=/ssd/cc-clients/containers/clients-vm-02.img,if=virtio \
 \
-device virtio-scsi-pci,id=scsi0 \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,drive=disk0 \
-drive id=disk0,file=iscsi://10.47.0.22/iqn.2021-05.t22.cc1:b1a0e42243f2f0c073ac/0,if=none,cache=none,format=raw,media=disk,discard=unmap \
 \
-boot c \
-device virtio-net-pci,mac=00:22:02:1a:10:02,netdev=cc2e.0 \
-netdev tap,ifname=cc2e.0,id=cc2e.0,script=/etc/kvm/virtual0-up,vhost=on \
-net nic,macaddr=00:22:02:1b:10:02 -net tap,ifname=cc2e.1,script=/etc/kvm/sanbr0-up \
-vnc 172.16.10.18:102 \
-pidfile /var/run/kvm/containers/cc-2.pid \
-daemonize

So, question is how to set some timeout for iscsi target, to generate error or detach disk on kvm side ? For example, if physical disk with image damage, KVM would catch it and guest have an errors. How to do same with iscsi ?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.