- use `/run` instead of deprecated symlink `/var/run`
- add `--autostart` option to automatically start the qube
- check for invalid qube name before querying qubesd
- use `--fail` option of qubesd-query instead of parsing its output file
- add `--` and double quotes in various places
- allow `--` to be passed to `qvm-console-dispvm` to mark end of options
Since bda9264, a qubes.GetDate call from a VM will not cause clockvm
startup. Also avoid causing it with /etc/cron.d/qubes-sync-clock.cron.
FixesQubesOS/qubes-issues#3588
qvm-clock-sync fails with a python subprocess error on line 43 when the `date ... -s ...` fails due to insufficient privileges to set the date. This commit checks to see if the program has effective UID root before attempting to set the date.
clock synchronization mechanism rewritten to use systemd-timesync instead of NtpDate; at the moment, requires:
- modifying /etc/qubes-rpc/policy/qubes.GetDate to redirect GetDate to designated clockvm
- enabling clocksync service in clockvm ( qvm-features clockvm-name service/clocksync true )
Works as specified in issue listed below, except for:
- each VM synces with clockvm after boot and every 6h
- clockvm synces time with the Internet using systemd-timesync
- dom0 synces itself with clockvm every 1h (using cron)
fixesQubesOS/qubes-issues#1230
This all either have been migrated to core3, or is not needed anymore.
There is still qvm-tools directory with a few tools that needs to be
migrated, or installed as is.
This commit makes sure that the Python list vms_list is not mutated
while the code is iterating through it. To the best of my knowledge,
this is a problematic operation.
To rectify this issue, a new temporary list is instantiated, and
the VM objects that have shut down are appended to the temporary list,
which is afterwards used to remove the shut-down VM objects from the
vms_list.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Prior to this commit, qvm-shutdown had a limitation where only one
VM name could be passed in via the command line for shutting down.
This commit removes the aforementioned limitation by adapting the
code for multiple command line arguments.
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
qvm-trim-template manually assemble device dict, fix it to include
also 'desc' field, as it is now checked.
Fixes ba4dec5 "qvm-block: fix checking attached status of disk image files"
The language for this was very strange, so I rewrote it in a more standard format. Instead of printing things across three functions, I consolidated into one. I also opted for the more standard "WARNING:" instead of "***", which I've not seen before.
Libvirt do not show actual block device (loop*) choosen for the device -
only original (file) path. But file path is available in device
description. Please note that VM can provide any description (withing
allowed limits), effectively breaking this check again (hidding the
attachment status). But even without this bug it could do that - by
hidding the whole device from QubesDB.
FixesQubesOS/qubes-issues#2453
When stdout is redirected to some file or command two things will
happen:
- qvm-run will not automatically color the output as stdout is not a
TTY
- even when coloring is forced, it will not work, as the control
sequence (on stdout) will be redirected anyway
Fix this by handling stdout and stderr independently and output color
switching sequence to each of them.
FixesQubesOS/qubes-issues#2190