Commit Graph

161 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
4d3a992ac6
Fix setting kernel property
Fixes QubesOS/qubes-issues#3145
2017-10-07 00:23:37 +02:00
Marek Marczykowski-Górecki
07162ba089
use 'klass' property instead of actual VM object class
The later is going to be generic QubesVM class, to save admin.vm.List
calls.
2017-10-07 00:22:41 +02:00
Marek Marczykowski-Górecki
c2aad3ce20
Remove code referencing removed "extra drive" box 2017-09-14 02:34:10 +02:00
Marta Marczykowska-Górecka
2ac9b1d182
Added gui for booting VM from CDROM/block device.
Available via command line (qubes-vm-boot-from-device) and
from a button in VM Settings/Advanced.
2017-09-13 23:30:45 +02:00
Marta Marczykowska-Górecka
0e5feeac0d
Remove obsolete sections from VM Settings:
- drive image
- paths
2017-09-08 22:39:54 +02:00
Marek Marczykowski-Górecki
da23873b47
settings: fix volume resize
- use MiB instead of MB
- do not allow root volume resize for template-based VMs
- do not resize if nothing was changed (use int, not float)
2017-07-30 18:56:35 +02:00
Marta Marczykowska-Górecka
693e1340ed
'rename VM' button in VM Settings
rename VM button in VM settings: it asks for a new name, and then clones
VM under the new name and deletes old one. Renaming VM closes VM settings
window without saving any other changes.
Changed max size of VM name field to 32 characters.
2017-07-29 13:28:53 +02:00
Marta Marczykowska-Górecka
2dda433fd3
'refresh available apps' button in VM Setting
added a button in VM Settings, Applications tab to refresh the list of
available apps
2017-07-29 13:28:53 +02:00
Marek Marczykowski-Górecki
402f1db80d
firewall: check for 'qubes-firewall' feature instead of being ProxyVM
This enable better detection whether firewall settings will really be
respected.

Fixes QubesOS/qubes-issues#2003
2017-07-16 10:50:07 +02:00
Wojtek Porczyk
96fc9c192c fixes from @marmarek's review 2017-07-14 02:19:24 +02:00
Wojtek Porczyk
1861ff386d settings: devices 2017-07-12 15:12:44 +02:00
Wojtek Porczyk
c32391a030 settings: services 2017-07-12 15:12:44 +02:00
Wojtek Porczyk
e78ede26f1 adminapi storage 2017-07-12 15:12:43 +02:00
Wojtek Porczyk
092d38e09a settings: misc removed 2017-07-12 15:12:43 +02:00
Wojtek Porczyk
cd2d3d7c0e settings: firewall and network 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
ac06eee39b settings: dir_path, config_path 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
cae10193e7 qubesmanager/settings: imports 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
eefa6c31c2 appmenus fix 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
6462ae88b7 qubesmanager/utils 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
ea28980717 settings: debug mode 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
f6a5c02adb qubesmanager/settings: make it work on qubesadmin, part 0 2017-07-12 15:04:55 +02:00
Wojtek Porczyk
2c3df7bd67 spring cleaning part 5: more python3 fixes 2017-07-12 14:54:14 +02:00
M. Vefa Bicakci
2ba6df43fc
Remove left-over debugging print-outs 2017-05-26 02:02:25 -04:00
M. Vefa Bicakci
a2d0b128b7
Make sure that new value of uses_default_kernel persists
Prior to this commit, whenever the user selected the default kernel in
a VM's "Advanced Settings" dialog in Qubes Manager, the
"uses_default_kernel" flag would not be saved as expected. Instead of
the intent to use the default kernel version for the VM in the future,
the VM would be stuck with the specific kernel version and not any new
future default kernel versions.

This issue occurs because the "kernel" property setter for the QubesVm
class resets the "uses_default_kernel" member variable to False, and
Qubes Manager sets the "uses_default_kernel" property before setting the
"kernel" property.

Resolve this issue by making sure that the "uses_default_kernel"
member variable of the VM in question is set after the "kernel" member
variable.
2017-05-26 02:02:25 -04:00
Marek Marczykowski-Górecki
23fc7df23c
settings: save qubes.xml after saving firewall rules
Saving (and also applying) firewall rules may modify VM's "services",
which are stored in qubes.xml. This is the case for "Allow connection to
Updates Proxy" - which also enables/disables 'yum-proxy-setup' service.
Without this commit, such change was ignored.

Fixes QubesOS/qubes-issues#2770
2017-04-24 01:59:00 +02:00
Marek Marczykowski-Górecki
d073b3582d
i18n: wrap self.tf in unicode() where 'format' function is used
Qstring (returned by self.tr) does not have 'format' method.

Fixes QubesOS/qubes-issues#2599
2017-02-06 04:20:13 +01:00
Marek Marczykowski-Górecki
7c602bf7d2
i18n: wrap strings with self.tr
Allow translations to handle strings defined in code.

Fixes QubesOS/qubes-issues#2599
2017-01-22 13:22:26 +01:00
Marek Marczykowski-Górecki
00caebda95
wrap long lines 2016-06-21 02:03:32 +02:00
Marek Marczykowski-Górecki
d2a4dd810b
Remove unused imports 2015-07-23 07:34:30 +02:00
Michal Rostecki
43bc59bfa6 Checking whether the "default NetVM" exists
The "default NetVM" is usually the first created ProxyVM which is
set by qubes-core during its creation. [1] If there is no ProxyVM,
there is no "default NetVM". Therefore, creating an AppVM and
launching its settings dialog raised AttributeError, because
get_default_netvm method returned None.

This can be reproduced by installing QubesOS without creating VMs
by installer.

[1] https://github.com/QubesOS/qubes-core-admin/blob/master/core/qubes.py#L355

Fixes qubesos/qubes-issues#1008
2015-05-24 11:23:57 +02:00
Marek Marczykowski-Górecki
dd93b1237f settings: add "dispvm_netvm" property in advanced tab 2015-04-06 00:59:15 +02:00
Marek Marczykowski-Górecki
4e5f63be24 settings: mark template as read-only when the VM is running 2015-04-05 21:53:09 +02:00
Marek Marczykowski-Górecki
97620f76a7 settings: hide "add all" widget from devices tab
It is very dangerous - adding all the devices to some VM will make the
system unusable once such VM is started.
2014-11-01 19:57:17 +01:00
Marek Marczykowski-Górecki
c8a8a56c73 settings: prevent changing VM name and label while the VM is running
Those changes will take effect after VM restart (at least for VM windows
borders), so to not confuse the user with partly updated colors, simply
block the change while the VM is running. The same applies to VM name.
2014-10-28 04:55:14 +01:00
Victor Lopez
473b822e0c Linux VM specific: force minimum init mem to allow scaling up memory
Check init_mem and max_mem_size in a single function (merging the
previous two) taking into account the minimum init memory that allows
the requested maximum memory.

Explanation:
Linux kernel needs space for memory-related structures created at boot.
If init_mem is just 400MB, then max_mem can't balloon above 4.3GB (at
which poing it yields "add_memory() failed: -17" messages and apps
crash), regardless of the max_mem_size value.

Base of Marek's findings and my tests on a 16GB PC, using several
processes like:
   stress -m 1 --vm-bytes 1g --vm-hang 100

result in the following points:
init_mem  ==> actual max memory
400             4300
700             7554
800             8635
1024            11051
1200            12954
1300            14038
1500            14045 <== probably capped on my 16GB system

The actual ratio of max_mem_size/init_mem is surprisingly constant at
10.79

If less init memory is set than that ratio allows, then the set
max_mem_size is unreachable and the VM becomes unstable (app crashes)

Based on qubes-devel discussion titled "Qubes Dom0 init memory against
Xen best practices?" at:
https://groups.google.com/d/msg/qubes-devel/VRqkFj1IOtA/UgMgnwfxVSIJ
2014-10-06 04:00:20 +02:00
Marek Marczykowski-Górecki
1cadc1e943 Merge remote-tracking branch 'woju/master' 2014-09-09 22:01:54 +02:00
Marek Marczykowski-Górecki
c992fc0f48 settings: fix drive path setting (#897) 2014-09-09 21:59:54 +02:00
Wojciech Zygmunt Porczyk
24759d2762 settings.py: do not attempt to remove service when none selected
Thanks to Andrew B (kyboren at gmail dot com) for bug report.
2014-09-04 21:59:05 +02:00
Marek Marczykowski-Górecki
61ef08eb47 settings: cast all QString to str
QString does not have "startswith" method.
2014-07-05 14:57:47 +02:00
Marek Marczykowski-Górecki
aca43a46da Filter out 'dom0' from selectable netvm list
This is workaround until #757 will be done.
2014-06-07 04:07:26 +02:00
Wojciech Zygmunt Porczyk
e834b33d42 Merge remote-tracking branch 'marmarek/master' 2014-05-19 13:54:02 +02:00
Hansi
44fe1cc845 small update to add "autostart" checkbox to the basic settings dialog 2014-05-17 21:43:29 +02:00
Wojciech Zygmunt Porczyk
f882042994 settings.py: launch lspci by full path (/usr/sbin/lspci) 2014-05-16 19:16:16 +02:00
Marek Marczykowski-Górecki
a09f558b4b settings: add seamless_gui_mode settings (#810) 2014-04-01 01:13:34 +02:00
Marek Marczykowski-Górecki
41bf7b448e firewall: add an option to temporary allow full network access (#760)
Add rule "*" with expire time set.
2014-03-28 06:41:35 +01:00
Marek Marczykowski-Górecki
3b3846eeb5 firewall: simplify rules handling code
Use directly rule provided by qubes core, not intermediate class
QubesFirewallRuleItem. This also will improve compatibility - if no
firewall changes made (but still "OK" clicked instead of "Cancel")
really the same settings are saved, even if rules contains some not
supported by Qubes Manager attributes.
2014-03-28 05:15:52 +01:00
Marek Marczykowski-Górecki
4f77108c5f settings: add an option to resize root.img (#699) 2014-03-21 18:40:23 +01:00
Marek Marczykowski-Górecki
3ea49b5192 Remove trailing semicolons 2014-02-23 00:44:08 +01:00
Marek Marczykowski-Górecki
17107a7012 settings: add 'drive' setting to advanced tab (#712) 2014-02-20 01:05:38 +01:00
Marek Marczykowski-Górecki
8e0a441dfe settings: do not assume that kernel is the last setting 2014-02-20 01:05:38 +01:00
Marek Marczykowski-Górecki
95e9680e96 Whitespace fixes 2014-02-20 01:05:37 +01:00
Marek Marczykowski-Górecki
9c1e2f496c List only compatible templates 2013-11-21 04:17:59 +01:00
Marek Marczykowski-Górecki
8d38a948e5 settings: indentation fix 2013-10-29 13:41:46 +01:00
Marek Marczykowski-Górecki
56d7807fec settings: gray out maxmem when qmemman is disabled
'Max memory' setting only makes sense for dynamic memory management.
2013-10-29 13:40:49 +01:00
Marek Marczykowski
bc485d2928 Update imports to match new qubes global settings layout 2013-03-16 21:07:53 +01:00
Marek Marczykowski
4d9e30784e settings apply: fix error message 2013-02-23 06:46:56 +01:00
Marek Marczykowski
34ea444a42 settings apply: catch exceptions and show them to the user
Settings are applied in separate thread, so when any exception occured there,
the user had no way to know it (besides hanging "applying settings" window).
2013-02-23 06:44:06 +01:00
Marek Marczykowski
69a2ac62fb use any python2, not explicit python2.6
Especially allow python2.7.
2013-01-23 15:55:14 +01:00
Marek Marczykowski
3b223aacd0 settings: disable dynamic memory management setting for HVM (#690) 2012-12-12 16:33:10 +01:00
Marek Marczykowski
8e333a7653 Display correct gateway IP (#685) 2012-12-10 16:13:14 +01:00
Marek Marczykowski
1026d19340 settings: allow application list modifications for NetVM/ProxyVM 2012-10-03 22:08:42 +02:00
Marek Marczykowski
d2a753c289 indent fix 2012-10-03 22:08:37 +02:00
Marek Marczykowski
d0eb5a2fd5 validate VM name also at GUI level (#656) 2012-08-23 03:57:19 +02:00
Marek Marczykowski
2a8afab83e include VM name in settings window title (#642) 2012-07-22 01:47:36 +02:00
Marek Marczykowski
24432ea1bc fix indenting 2012-06-19 00:15:46 +02:00
Marek Marczykowski
da09aa79fc Add "Allow connections to Updates Proxy" firewall setting (#582) 2012-06-05 20:29:57 +02:00
Agnieszka Kostrzewa
42828835cc Bind init_mem and maxmem setting (#572) 2012-05-19 09:33:29 +02:00
Agnieszka Kostrzewa
b140d0e2cf No Dom0 label in settings 2012-04-27 11:54:53 +02:00
Agnieszka Kostrzewa
e890a61a49 Fix to tab option to settings run as a standalone app 2012-04-25 15:08:21 +02:00
Agnieszka Kostrzewa
51a6edd5cd Tab option to settings run as a standalone app 2012-04-25 14:25:26 +02:00
Agnieszka Kostrzewa
26b958e1d9 Merge branch 'master' of git.qubes-os.org:/var/lib/qubes/git/marmarek/qubes-manager 2012-04-25 13:15:29 +02:00
Marek Marczykowski
1e8f4b1569 settings: print root_img path for StandaloneVMs 2012-04-24 19:14:12 +02:00
Marek Marczykowski
e97c2f89bd settings: check if volatile_img has value before showing it 2012-04-24 19:05:15 +02:00
Agnieszka Kostrzewa
2f81711fc2 Adjusting to #488 (kernel settings available for appVMs) 2012-04-24 15:02:19 +02:00
Agnieszka Kostrzewa
6b22eb5a0f Introducing 'Run in debug mode' option. (#537) 2012-04-24 14:27:28 +02:00
Agnieszka Kostrzewa
a5a6e90e41 fix to checking whether vm has kernel attributes 2012-04-24 12:52:47 +02:00
Agnieszka Kostrzewa
4184e49853 Settings checking whether VM has 'kernel' attribute. 2012-04-18 19:33:53 +02:00
Agnieszka Kostrzewa
5b09bf0bb1 Not allowing to modify devices of a running VM (ticket #523) 2012-04-17 13:15:18 +02:00
Agnieszka Kostrzewa
2ab9570045 'Include in memory balancing' heckbox issue fixed (#498). 2012-03-30 21:46:23 +02:00
Agnieszka Kostrzewa
de8028b268 Dynamic mem balancing - pci devs warnings. 2012-03-19 21:07:27 +01:00
Agnieszka Kostrzewa
68560f9151 Include in memory balancing enabled where it applies (ticket #498) 2012-03-19 16:02:05 +01:00
Agnieszka Kostrzewa
1d06bd12fa Fix to kernel setting. 2012-03-15 00:19:47 +01:00
Agnieszka Kostrzewa
7e0995ca25 Added stacktrace to critical exception message box. 2012-03-14 14:00:49 +01:00
Agnieszka Kostrzewa
9964ff133c Fixed private storage and initial memory resizing. 2012-03-14 12:51:11 +01:00
Agnieszka Kostrzewa
b3dbbe5fa3 Services tab 2012-03-14 11:54:50 +01:00
Agnieszka Kostrzewa
2987320b2f Advanced tab (mem/cpu) 2012-03-13 22:05:50 +01:00
Agnieszka Kostrzewa
b9e361d468 Devices tab. 2012-03-13 20:06:41 +01:00
Agnieszka Kostrzewa
f155ef5780 Simplified vm name setting. 2012-03-12 22:12:00 +01:00
Agnieszka Kostrzewa
b77cc2ca89 Fixed 'uses_default_netvm' for netvm settings 2012-03-12 22:06:43 +01:00
Agnieszka Kostrzewa
6857c0e6f4 settings advanced tab (kernel, paths) 2012-03-12 21:08:32 +01:00
Agnieszka Kostrzewa
27226171aa Apply settings only if something was changed. 2012-03-12 15:54:16 +01:00
Agnieszka Kostrzewa
7fe79ba9f2 Fix to follow API change: template_vm -> template 2012-03-12 13:52:42 +01:00
Agnieszka Kostrzewa
e63813d519 Follow API change: template_vm -> template 2012-03-12 12:53:07 +01:00
Agnieszka Kostrzewa
7d4c74b85e Changed private image setting step to 256 MB 2012-03-11 23:30:57 +01:00
Agnieszka Kostrzewa
12b2dde943 Networking info displayed in settings basic tab (ticket #463). 2012-03-09 08:43:42 +01:00
Agnieszka Kostrzewa
7881fc28c9 Disabled firewall and apps tabs for netvms, enabled netvm selection for proxyvms (ticket #471), added none netvm. 2012-03-08 15:40:02 +01:00
Agnieszka Kostrzewa
98a801e00b Vm private storage size editable in settings. 2012-03-07 21:21:14 +01:00
Agnieszka Kostrzewa
4168cc11fc Include in backups working and editable. Type and installed_by_rpm displayed. 2012-03-07 20:42:18 +01:00
Agnieszka Kostrzewa
77f5c801be Vm netvm edition. 2012-03-07 18:15:59 +01:00
Agnieszka Kostrzewa
5dee876393 Vm template edition. 2012-03-07 17:03:19 +01:00