.
D 2015-11-10T14:57:57.558
L vws
N text/x-markdown
P 2e9516cc6ed9178721a2b3f392391358c303df14
U vitus
W 3194
**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
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 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 not running and saved state exists, load saved state.
Semantic: "make this machine running*
vws stop vmname
Sends system_shutdown command to machine.
vmws save vmname
Saves machine state and terminates emulation.
vws reset vmname
Sends system_reset command to machine
Removable devices management
----------------------------
vws cdrom machine [id] [iso-file|--eject]
Connects given iso file (CDROM special device) to the machine or disconnects
one. If there is more than one cdrom drive in the virtual machine, id should be specified.
vws usb insert machine [pattern|--address=bus:device]
Connects USB device which matches pattern or have specifed address
vws usb list
List host devices available to connect to the machine
vws usb machine remove [pattern|id]
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
Creates a snapshot of machine.
vws revert machine
Reverts machine to previous snapshot, deleting current
vws commit machine
Commits snapshot into its backing file.
vws snapshots machine
List existing snapshots.
Screenshots and recording
-------------------------
vws screenshot machine filename.png
Makes a screenshot
vws record machine filename.wav
Start recording of machine sound output
vws stoprecord machine
Stop recording
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.
Operation on multiple machines
--------------------------------
vws list [--state] [--address] [-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
vws autostart
Starts all machines in the authostart directory
vws autostop
Tries to shutdown correctly all running machines.
Z 2fa671a63da93b2cf73fd9a5c9fa630e