Check-in [9c13f0d95f]
Not logged in
Overview
Comment:make vm template script self-sufficient and eliminate vm conf because it conflicts with design goal - VWS VM moved to other host machine shouldn't require VWS, and should happily run with bare QEMU
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9c13f0d95f49d746cf2b8bbeede2182e6dd8d9cc
User & Date: vitus on 2015-07-18 19:42:36
Other Links: manifest | tags
Context
2015-07-20
13:45
implemented command-line parsing check-in: e7fb60a50e user: vitus tags: trunk
2015-07-18
19:42
make vm template script self-sufficient and eliminate vm conf because it conflicts with design goal - VWS VM moved to other host machine shouldn't require VWS, and should happily run with bare QEMU check-in: 9c13f0d95f user: vitus tags: trunk
2015-07-17
16:44
Initial files check-in: fa53a2f55d user: vitus tags: trunk
Changes

Modified start.template from [ba0af5792d] to [9a410b149a].

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




>



>
>
>
>
>
>
>

|






|
>
>
|
<
>
>
>
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
#!/bin/sh
# Get machine name from current directory name
NAME=$(basename $(pwd))
# if remote access is enabled, then there should be
# SPICE_PASSWORD=password
QEMU_AUDIO_DRV=spice
export QEMU_AUDIO_DRV
if [ -n "$SPICE_PASSWORD" ]; then
   SPICE_AUTH="password=$SPICE_PASSWORD"
else
   SPICE_AUTH="disable-ticketing,addr=127.0.0.1"
fi
SPICE_PORT=$(find_free_port 5900)

{qemubinary} -name $NAME {accel} \
{drive} \
{cdrom} \
{net} \
{usb} \
{sound} \
-chardev socket,server,nowait,path=/home/vitus/asta.monitor,id=monitor \
-mon chardev=monitor,mode=readline \
-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 \
-daemonize -pidfile pid

Deleted 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"

<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Modified vwsgui from [7b9772c1b2] to [e19838553c].

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











|
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 spiceuri $1 >/dev/null && /usr/lib/vms/ask_shutdown $1