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
|
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
|
-
+
-
+
+
+
+
+
-
+
-
+
-
+
|
**vws** script is main workhorse of the first stage of project.
It allows to send commands to the vm
Starting and stopping
---------------------
vws start [--no-gui] [--cdrom isofile] vmname
vws start [--no-gui] [--cdrom isofile] [--snapshot] [ --args "more args" ] vmname
Starts machine. By default, immediately after machine starts, launches [vmgui] to connect it. If no DISPLAY environment variable is set or if **--no-gui** is specified, doesn't launch GUI. If **--cdrom** is specified, connects specified ISO to machine CDROM and boots it from it
Starts machine. By default, immediately after machine starts, launches [vmgui] to connect it. If no DISPLAY environment variable is set or if **--no-gui** is specified, doesn't launch GUI. If **--cdrom** is specified, connects specified ISO to machine CDROM and boots it from it.
If **--snapshot** is specified, starts qemu in snapshot mode. In this mode all disk images are read only and all changes in the fs are written into temporary file which is removed upon shutting machine down.
If **--args*** is specified, its argument is added to the QEMU command line.
If machine is running in the background, just launches vmgui, unless not asked to. If machine is running and gui is not needed, just exits immedieately with zero exit code.
If machine is running in the background, just launches vmgui, unless not asked to. If machine is running and gui is not needed, just exits immedieately with zero exit code. In this case **--args** and **--snapshot** would be ignored with warning and **--cdrom** is interpreted as if **vws cdrom** command was issued.
If machine is not running and saved state exists, load saved state.
Semantic: "make this machine running*
vws stop vmname
vws stop vmname [--hard]
Sends system_shutdown command to machine.
Sends system_shutdown command to machine. With **--hard** powers virtual machine off unconditionally and immediatelty. Without it, sends ACPI shutdown request.
vmws save vmname
Saves machine state and terminates emulation.
vws reset vmname
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
-
+
-
+
-
+
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
+
+
-
+
-
+
+
+
|
Removes device which matches pattern. Pattern is reqular expression which is matches against lsusb output, so vendorid:productid is perfectly valid pattern.
If there is more than one device which matches pattern, complains vws usb complans and exits with non-zero code.
Snapshots
---------
vws snapshot machine
vws snapshot machine snapshot_id
Creates a snapshot of machine.
Creates a snapshot of machine. Works only if machine is powered off
vws revert machine
Reverts machine to previous snapshot, deleting current
Reverts machine to previous snapshot, deleting current and creating new.
Works only if machine is powered off.
vws commit machine
Commits snapshot into its backing file.
Commits snapshot into its backing file. If machine is running in snapshot mode, commits temporary changes. If machine is not running, commits and removes alast snapshot.
vws snapshots machine
List existing snapshots.
Screenshots and recording
-------------------------
vws screenshot machine filename.png
vws screenshot machine filename.ppm
Makes a screenshot
Makes a screenshot.
vws record machine filename.wav
Start recording of machine sound output
vws stoprecord machine
Stop recording
Creating a virtual machine
--------------------------
vws create [ --no-usb] [--size size] [--arch cputype] [--no-sound]
[--sound cardtype] [--vga cardtype] [--net NET] [--mem size]
[--diskif interface-type] [--shared] [--image filename]
[--install filename.iso]
machine
Creates new virtual machine. By default - private one, if **--shared** specified - shared one.
**--net** can be either **user** (default) or name of existing bridge interface.
To use bridge you must have **qemu-bridge-helper**(8) setuid root.
**--size** sets virtual size of first drive image. Not needed if **--image** is used. Acceptable syntax nnM or nnG
**--mem** size of memory - same syntax as **--size**
**--vga** allows to specify type of emulated graphic card instead of default **qxl**. May be needed for some older OS.
**--diskif** allows to specify disk interface (ide or scsi) insteado of default virtio (required for non-linux guests).
**--image** specifies preexisting image in the format, understandable by **qemu-img**(1) to use as disk of newly created VM. Image would be copied into VM directory and converted to **qcow2** format.
**--install** specifies, that ISO image with OS distribution should be connected and newly created VM started, booting from it.
Miscellaneous
-------------
vws monitor machine
Connects to monitor socket and send there commands, read from stdin
and writes results to stdout. Provides way to interact with QEMU respecting [locking](wiki?name=monitor+locking)
vws spiceurl machine
Outputs to stdout spice url needed to connect machine, if machine is running
and exits with non-zero exit code if machine is not running.
vws version
Reports a version
Operation on multiple machines
--------------------------------
vws list [--state] [--address] [-l]
vws list [--state] [--address] [--usb] [-l]
List all machines set up via these tools. Option **--state** shows whether machine is running or not, **--address** - shows mac address **-l** is equevalent of both --state and --address
List all machines set up via these tools. Option --state shows whether machine is running or not, --address - shows mac address -l is equevalent of both
--state and --address
vws autostart
Starts all machines in the authostart directory
Starts all machines in the authostart directory. *(not implemented in version 0.2)*
vws autostop
Tries to shutdown correctly all running machines.
Tries to shutdown correctly all running machines. *(not implemented in version 0.2)*
|