[Top][All Lists]

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

[Qemu-discuss] Monitor hotplug

From: Timo Kaufmann
Subject: [Qemu-discuss] Monitor hotplug
Date: Wed, 08 Nov 2017 14:48:31 -0800
User-agent: Zoho Mail


I want to simulate a monitor hotplug to a running linux guest. I want to

do this in order to automatically test a program that repsponds to an udev

event and configures randr (autorandr).

What I found:

- plain qemu: https://github.com/qemu/qemu/blob/master/docs/multiseat.txt

  I couldn't get this solution to work. Supposedly it should "just work" after

  systemd >222 (which I am using), but it didn't for me.

  Since it doesn't seem to support hotplug anyways, I didn't investigate 

- using spice: https://people.freedesktop.org/~teuf/spice-doc/html/ch02s07.html

  This does support hotplug. I didn't get this to work either though:

  All the displays except the first one are greyed out in vinagre.

  Also I couldn't find any information on how to programmatically add another

  monitor without using a GUI.

For spice, I tried running qemu like this: (its intended as a nixos[1] test,

which is where the /nix/store paths come from):


qemu-kvm \

    -name vm \

    -m 1024 \

    -virtfs local,path=/nix/store,security_model=none,mount_tag=store \

    -virtfs local,path=$HOME/xchg,security_model=none,mount_tag=xchg \

    -virtfs local,path=$HOME/xchg,security_model=none,mount_tag=shared \

index=0,id=drive1,file=$HOME/vm.qcow2,if=virtio,cache=writeback,werror=report \



 regInfo=/nix/store/knflc775wvpznh59n02ibma35dyncp8k-reginfo" \

    -vga qxl -device qxl \

    -spice port=5935,disable-ticketing


And then connect to it with `virt-viewer localhost:5905`.

However, the gui doesn't allow me to add a second display.

Can anybody help me?

reply via email to

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