Overview
Context
Changes
Added ask_shutdown version [47a3414444].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#!/usr/bin/wish
if {![llength $argv]} {
puts stderr "Usage $argv0 machinename"
exit 1
}
set name [lindex $argv 0]
label .top -text "Virtual machine [lindex $argv 0] is still running" -font {serif 20}
frame .buttons
button .buttons.shutdown -text "Shut down" -command "exec vws shutdown $name
destroy ."
button .buttons.suspend -text "Suspend" -command "exec vws save $name
destroy ."
button .buttons.bgd -text "Run in background" -command "destroy ." -default active
pack .buttons.shutdown .buttons.suspend .buttons.bgd -side left -expand n -padx 20 -pady 10
#.top configure -wraplength [winfo reqwidth .buttons]p
pack .top -side top -expand y -fill x -padx 10 -pady 20
pack .buttons -side top -expand n
|
| | | | | | | | | | | | | | | |
Added start.template version [ba0af5792d].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#!/bin/sh
NAME=$(basename $(pwd))
# if remote access is enabled, then there should be
# SPICE_PASSWORD=password
SPICE_PORT=$(find_free_port 5900)
. /etc/vws/vm.conf
{qemubinary} -name $NAME {accel} \
{drive} \
{cdrom} \
{net} \
{usb} \
{sound} \
$MONITOR_OPTIONS \
$SPICE_OPTIONS \
$PROCESS_OPTIONS
|
| | | | | | | | | | | | | |
Added vm.conf version [d4ea9bcfe3].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
QEMU_AUDIO_DRV=spice
export QEMU_AUDIO_DRV
if [ -n "$SPICE_PASSWORD" = yes ]; then
SPICE_AUTH="password=$SPICE_PASSWORD"
else
SPICE_AUTH="disable-ticketing,addr=127.0.0.1
fi
SPICE_OPTIONS="-vga qxl
-spice port=$SPICE_PORT,$SPICE_AUTH
-device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0"
MONITOR_OPTIONS="-monitor socket,path=monitor"
PROCESS_OPTIONS="-daemonize -pidfile pid"
|
| | | | | | | | | | | | |
Added vws version [84a32672d6].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#!/usr/bin/python
from ConfigParser import ConfigParser
import socket
config=ConfigParser({"SharedVMs":"/var/cache/vws/shared","AutostartVMs":"/var/cache/vws/auto"})
def find_vm(name):
search_path=[os.environ['HOME']+"/VWs",
config.get("directories","SharedVMs"),
config.get("directories","AutostartVMs")]
for dirname in search_path:
if name in os.listdir(dirname):
return dirname+"/"+name
raise ValueError("Machine "+name+" not found.")
def connect_vm(vm_dir):
sock=socket.socket(socket.AF_UNIX)
sock.connect(vm_dir+"/monitor")
def get_spice_url(sock):
f=sock.makefile("r")
sock.send("info spice\n")
line=""
url=None
while not line.startswith("(qemu)"):
line=f.getline().strip("\n\r")
if url is not None:
continue
n=line.find("address:")
if n != -1:
url=line[n+9:]
if url.startswith('*:'):
url="localhost"+url[1:]
f.close()
return "spice://"+url
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added vws.conf version [39dcfcb6d9].
|
1
2
3
4
|
+
+
+
+
|
[directories]
SharedVMs=/home/virtual/vws/shared
AutostartVMs=/home/virtual/vws/autostart
[misc]
|
| | |
Added vwsgui version [7b9772c1b2].
|
1
2
3
4
5
6
7
8
9
10
11
12
|
+
+
+
+
+
+
+
+
+
+
+
+
|
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 vm-name"
exit 1
fi
uri=`vms spiceuri $1`
if [ $? -gt 0 ]; then
exit 1
fi
spicy $uri </dev/null
vws running $1 && /usr/lib/vms/ask_shutdown $1
|
| | | | | | | | | | |