Commit Graph

259 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
39d9a619b4
Merge remote-tracking branch 'origin/pr/379'
* origin/pr/379:
  qubes-hcl-report: run lspci as root
2020-12-01 07:19:21 +01:00
Matt McCutchen
e015165cf4
qubes-hcl-report: run lspci as root
This allows the "Capabilities" field to be shown.
2020-11-29 16:21:03 -05:00
Demi Marie Obenour
ca9a496e42
Enhance qvm-console-dispvm and admin.vm.Console
- 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
2020-11-26 21:15:34 -05:00
M. Vefa Bicakci
7980d94807
qvm-sync-clock: Do not fail if clockvm is not set 2020-03-08 22:39:11 -04:00
Rusty Bird
d527e01136
Remove more core2 code 2020-02-15 17:48:32 +00:00
3hhh
698bcc27ab
Don't pass stdin to VMs unless necessary.
Fixes QubesOS/qubes-issues#5562
2020-01-15 15:18:43 +01:00
Marek Marczykowski-Górecki
ad8f1b06b4
Add missing source admin.vm.Console call in qvm-console-dispvm
Qrexec service called manually needs both source and destination

Fixes QubesOS/qubes-issues#5362
2019-10-09 04:41:48 +02:00
Frédéric Pierret (fepitre)
95ddf19dcc
admin.vm.Console: fix error message on management dispvm 2019-05-11 11:59:56 +02:00
Frédéric Pierret (fepitre)
1c09a2c77e
Rename and fix from Marek's comments 2019-05-07 15:03:34 +02:00
Frédéric Pierret (fepitre)
4b86606890
Add qvm-terminal-dispvm 2019-05-05 17:28:17 +02:00
Marek Marczykowski-Górecki
dde3c637a1
qubes-hcl-report: quote VM name
Reported by @v6ak
2019-03-01 03:12:52 +01:00
xaki23
ce794f33d8
add missing /sbin/ to hwclock call (so it will work as cronjob) 2018-09-10 17:24:35 +02:00
Rusty Bird
8b2b26134e
tools/qvm-sync-clock: don't start clockvm
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.

Fixes QubesOS/qubes-issues#3588
2018-08-27 23:31:16 +00:00
Max Zinkus
6dd8a5e212
Match error output string format 2018-04-09 21:58:10 -07:00
Max Zinkus
65435dce78
Prevent qvm-clock-sync permissions exception
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.
2018-04-09 21:56:33 -07:00
Marek Marczykowski-Górecki
0b0cd41dc6
qubes-hcl-report: detect AMD interrupt remapping
There is slightly different message in xl dmesg.

Fixes QubesOS/qubes-issues#3208
2017-12-05 17:39:33 +01:00
Marek Marczykowski-Górecki
2164a8d7b8
Change license to LGPL v2.1+
See this thread for reasoning and acceptance from contributors:
https://groups.google.com/d/topic/qubes-devel/G7KzrfU0lWY/discussion
"Changing qubes-core-admin license to LGPL v2.1+"
2017-10-12 00:11:50 +02:00
Marek Marczykowski-Górecki
dce0b28cf4
clock sync: drop untrusted_ prefix after validation, fix error msg 2017-07-12 20:57:52 +02:00
Marta Marczykowska-Górecka
ab88cd9644
minor amends to clock synchronization
renamed date_out variable to untrusted_date_out
2017-07-11 21:39:01 +02:00
Marta Marczykowska-Górecka
6da06d424e
clock synchronization rewrite
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)

fixes QubesOS/qubes-issues#1230
2017-07-06 23:37:26 +02:00
Marek Marczykowski-Górecki
eaf5c27b27
Merge branch 'core3-devel'
This concludes over two years of rewriting Qubes' core.
Thank God it's now merged to master. --@woju

QubesOS/qubes-issues#1825
2017-05-12 19:59:14 +02:00
Marek Marczykowski-Górecki
8992e71f85
Remove core2 code
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.
2017-05-12 18:36:29 +02:00
Marek Marczykowski-Górecki
25d596de3a
Merge remote-tracking branch 'qubesos/pr/96'
* qubesos/pr/96:
  Added dom0 check to qvm-prefs
2017-04-23 15:42:42 +02:00
Marek Marczykowski-Górecki
2ec65e5956
qubes-hcl-report: drop 'TEST VERSION' tag 2017-04-03 04:10:06 +02:00
Nicklaus McClendon
7896dc5404
Added dom0 check to qvm-prefs
Added a check to qvm-prefs to see if the specified VM is dom0 and,
if so, error out with a message that dom0 cannot be managed by
qvm-prefs
2017-03-21 20:52:27 -05:00
M. Vefa Bicakci
6bcc97b859
qvm-shutdown: Do not mutate list while iterating through it
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>
2017-03-16 12:11:55 +01:00
M. Vefa Bicakci
e499e6e88c
qvm-shutdown: Allow multiple VMs to be shut down with one invocation
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>
2017-03-16 12:10:58 +01:00
M. Vefa Bicakci
1d9d59a335
qvm-shutdown: Add missing documentation for multi-VM support 2017-03-16 12:10:37 +01:00
Marek Marczykowski-Górecki
9d1fea4c7f
Fix qvm-trim-template block attach handling
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"
2017-03-15 11:42:53 +01:00
unman
78ac2e4a28
Add tests for interrupt remapping and USB controllers 2017-01-12 00:18:04 +00:00
Loren Rogers
c1f8c7daf1 Rewrite root error message
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.
2016-11-30 22:32:16 -05:00
Wojtek Porczyk
68ad60c1b3 Merge remote-tracking branch 'origin/master' into core3-devel
Conflicts:
	core/qubes.py
	doc/Makefile
	doc/manpages/qvm-prefs.rst
	doc/qvm-tools/qvm-add-appvm.rst
	doc/qvm-tools/qvm-backup-restore.rst
	doc/qvm-tools/qvm-backup.rst
	doc/qvm-tools/qvm-block.rst
	doc/qvm-tools/qvm-clone.rst
	doc/qvm-tools/qvm-firewall.rst
	doc/qvm-tools/qvm-ls.rst
	doc/qvm-tools/qvm-pci.rst
	doc/qvm-tools/qvm-run.rst
	doc/qvm-tools/qvm-shutdown.rst
	doc/qvm-tools/qvm-start.rst
	doc/qvm-tools/qvm-template-commit.rst
	qvm-tools/qvm-ls
	qvm-tools/qvm-prefs
	qvm-tools/qvm-remove
	tests/__init__.py
	vm-config/xen-vm-template.xml
2016-11-30 03:07:39 +01:00
Cyril LEVIS
1b12df379c add --help and -h on qvm-create-default-qvm 2016-11-28 13:53:36 +01:00
Marek Marczykowski-Górecki
534c3a13f7
Merge remote-tracking branch 'qubesos/pr/78'
* qubesos/pr/78:
  Add name-raw field for qvm-ls
2016-11-28 12:59:27 +01:00
Marek Marczykowski-Górecki
71243d949e
Merge remote-tracking branch 'qubesos/pr/80'
* qubesos/pr/80:
  qvm-check: s/stdout/stderr/
2016-11-28 12:58:28 +01:00
Marek Marczykowski-Górecki
076ef884f3
Merge remote-tracking branch 'qubesos/pr/79'
* qubesos/pr/79:
  Implement qvm-ls --list-fields
2016-11-28 12:57:18 +01:00
Jean-Philippe Ouellet
80450dab92
Add name-raw field for qvm-ls
Useful to avoid needing to `... | tr -d '<>{}[]='` just to get clean
VM names in scripts.

Fixes https://github.com/QubesOS/qubes-issues/issues/2444
2016-11-28 02:58:18 -05:00
Jean-Philippe Ouellet
7033f6a796
qvm-check: s/stdout/stderr/ 2016-11-28 02:54:04 -05:00
Jean-Philippe Ouellet
6ddf141376
Implement qvm-ls --list-fields 2016-11-27 01:12:53 -05:00
unman
5ea129c1e0
Fix handling attributes in qvm-prefs 2016-11-25 02:19:09 +00:00
unman
4f2318fcc3
Fixed regexp for MAC address in qvm-prefs 2016-11-25 01:02:32 +00:00
Marek Marczykowski-Górecki
ba4dec5383
qvm-block: fix checking attached status of disk image files
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.

Fixes QubesOS/qubes-issues#2453
2016-11-23 03:25:03 +01:00
HW42
12644f218b qubes-hcl-report: check for incomplete 'xl dmesg' 2016-09-20 05:29:38 +02:00
HW42
3e668a62e2 qubes-hcl-report: SLAT detection: improve log parsing 2016-09-20 05:29:38 +02:00
Marek Marczykowski-Górecki
84528b30c1
qvm-remove: don't fail on removing template which was never started
When a template never was started, it isn't defined in libvirt, so
attempt to undefine it will fail.

Fixes QubesOS/qubes-issues#2290
2016-09-09 12:47:11 +02:00
HW42
32b4f9d4a4
qubes-hcl-report: add check for HAP/SLAT
bassed on
https://wiki.xenproject.org/wiki/Xen_Common_Problems#How_can_I_check_if_my_CPU_supports_HAP_.28Hardware_Assisted_Paging.29_.3F
2016-09-01 03:45:31 +02:00
Marek Marczykowski-Górecki
4c1c57bcb7
qvm-backup-restore: add missing backslash
Reported by Ivan <ivan@c3i.bg>
2016-08-17 13:48:12 +02:00
Marek Marczykowski-Górecki
4e022382a5
Merge remote-tracking branch 'origin/master' into core3-devel 2016-08-08 00:11:46 +02:00
Marek Marczykowski-Górecki
86a14b53fb
qvm-run: color untrusted stderr even when stdout is redirected
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.

Fixes QubesOS/qubes-issues#2190
2016-07-29 13:07:37 +02:00
Marek Marczykowski-Górecki
9d1b7504da
qvm-sync-clock: allow colon in timezone spec
`date` in debian 9 puts colon there. Since the timezone is not used here
in any way (it operates on UTC time anyway), simply allow this format
too.
2016-07-19 00:46:48 +02:00