From 71954d42fc35046243a3c0eee4f05e0195a91a95 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 10 Feb 2011 22:11:16 -0500 Subject: control the guest if signals are sent to the parent shell --- README | 4 ++-- kvm-manager | 26 +++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/README b/README index 8a72bef..1ef51f6 100644 --- a/README +++ b/README @@ -18,13 +18,13 @@ Dependencies: runit : for system supervision uml-utilities : for tunctl for the tun/tap interface kvm : for the virtual machine emulator + socat : For communications with the monitor and console of guests screen : for the detached, logged serial console bridge-utils : for configuring a bridge device lvm2 : for creating the relevant block devices udev : for configuring the block devices with proper permissions fakeroot : for rebuilding the initramfs as a regular user in di-maker xorriso : for grub2 to make an iso in di-maker - socat : so users can talk to the kvm monitor of their VMs Recommendations: @@ -34,7 +34,7 @@ INSTALLATION * Install dependencies: - apt-get install runit uml-utilities kvm screen bridge-utils lvm2 udev + apt-get install runit uml-utilities kvm screen bridge-utils lvm2 udev socat If you want to be able to use di-maker, you'll also need: diff --git a/kvm-manager b/kvm-manager index b1f260c..be3db9f 100755 --- a/kvm-manager +++ b/kvm-manager @@ -58,8 +58,16 @@ up() { if [ -e "$LOGNAME" ] ; then chpst -u "$OWNER" mv "$LOGNAME" "$LOGNAME".$(date +%F_%T%z|tr : .) fi + + MONITORNAME="$OWNERHOME/vms/$VMNAME/monitor.socket" + + kvmsend() { + socat STDIO "UNIX:$MONITORNAME" <