Commit Graph

354 Commits

Author SHA1 Message Date
Marek Marczykowski
3571a34010 dom0: preserve old root-cow - for qvm-revert-template-changes 2011-06-09 14:22:22 +02:00
Marek Marczykowski
f1f98d47df dom0: Use /var/run/xen-hotplug to store information needed for block devices cleanup.
Libxl removes xenstore entries before udev (+scripts) have chance to read it.
2011-06-09 14:06:24 +02:00
Marek Marczykowski
197ccb2e2c dom0: remove obsolete code from qubes_restore 2011-06-08 03:42:51 +02:00
Marek Marczykowski
ea69b51a97 dom0: use /bin/bash as interpreter of qubes_prepare_saved_domain.sh
Required for ex $(( )) construction. /bin/sh may not handle it (when linked to
some other shell than bash).
2011-06-08 03:41:22 +02:00
Marek Marczykowski
e5df78fe92 dom0: Migrate qubes_restore (and all DispVM logic) to libxl
Detailed changes:
 - use domain config in separate file (not embeded in savefile)
 - DispVM domain config generated from dvm.conf (introduced by previous patches) by qubes_restore
 - use call 'xl restore' to restore domain (instead of command to xend)
 - additional parameter to qubes_restore - config template
 - minor changes (xenstore perms, block-detach without /dev/ prefix, etc)
2011-06-08 03:36:02 +02:00
Marek Marczykowski
81ae4fafcf dom0: Use 10.138.x.y for DispVMs and fix gateway/DNS addresses 2011-06-08 03:33:45 +02:00
Marek Marczykowski
fcd4cd44eb dom0: create config template for DispVM
Introduction for later patches.
2011-06-08 03:30:42 +02:00
Marek Marczykowski
1647d03f74 dom0: use path given in argument to store VM configuration 2011-06-08 03:29:52 +02:00
Marek Marczykowski
f5e4cf58aa dom0: include vif in domain config (no need for network-attach) 2011-06-08 03:28:08 +02:00
Marek Marczykowski
c444ebc5f8 dom0/qmemman: different approach of mem-set and maxmem (libxl way)
Libxl stores maxmem in xenstore (/local/domain/X/memory/static-max) and sets
maxmem and target_mem to actual memory. So qmemman should use xenstore entry as
memory_maximum (when exists) and also adjust maxmem when changing domain memory.
2011-06-07 16:19:52 +02:00
Marek Marczykowski
50a910362d dom0/qmemman: Fix distribution memory left because of memory_maximum 2011-06-07 15:58:55 +02:00
Marek Marczykowski
9ed6b94d63 dom0/qmemman: Check for memory_maximum also for dom0 2011-06-07 15:58:55 +02:00
Marek Marczykowski
bd447308fe dom0/qmemman: distribute memory freed by deleted domain
Also wait a moment after domain list change for domain cleanup. Even if this
time is not sufficient, memory will be balanced when some domain need it.
2011-06-07 15:58:55 +02:00
Marek Marczykowski
429c685f1d dom0: write firewall rules only for running proxyvms 2011-06-07 15:58:55 +02:00
Marek Marczykowski
ae6d2ac70c dom0: include xl.conf in qubes-core-dom0 package
Disable autoballoon (qmemman will handle it) and specify lock file location
writable by user.
2011-06-07 15:58:55 +02:00
Marek Marczykowski
645132f043 dom0: Explicitly set maxmem=mem for NetVM 2011-06-07 15:58:54 +02:00
Marek Marczykowski
6dd0870ca6 dom0: Generate Xen VM config file from common template, on each VM start
Do not use many different config templates for different types of VMs. Also
regenerate config on each VM start to keep in synchronized with qubes.xml
2011-06-07 15:58:54 +02:00
Marek Marczykowski
62111845ea dom0: set memlock limit to unlimited for qubes users
Needed to 'xl create' work
2011-06-07 15:58:54 +02:00
Marek Marczykowski
5ebd163fd3 dom0: check RLIMIT_MEMLOCK before starting VM (and fix if possible) 2011-06-07 15:58:54 +02:00
Marek Marczykowski
d3e6e3dec0 dom0: use xen.lowlevel.xs instead of call xenstore-* 2011-06-05 23:35:53 +02:00
Marek Marczykowski
9ce2f440c3 dom0: remove import of old xend libraries 2011-06-05 22:58:20 +02:00
Marek Marczykowski
7b2ac4b279 dom0: catch error when no VM found by libxc (assume not running) 2011-06-04 02:46:12 +02:00
Marek Marczykowski
f5751bfea7 dom0: prevent division by zero on calculating cpu usage
When VM is starting online_vcpus=0 for short time.
2011-06-04 02:44:27 +02:00
Marek Marczykowski
cc4df5089d dom0: XC/XL infos for dom0 2011-06-02 01:20:23 +02:00
Marek Marczykowski
fac1f7f107 dom0: Set xid=0 for QubesDom0NetVm 2011-06-02 01:20:01 +02:00
Marek Marczykowski
cb1fbfc145 dom0: store xid in QubesVm on get_xid() 2011-06-02 00:07:22 +02:00
Marek Marczykowski
c789121f84 dom0: migrate from xend to libxl stack - qvm-core
This is core part of migration. Things not migrated yet:
 - DispVM (qubes_restore needs to be almost rewritten)
 - VM xen config files should be fixed (use "script:" prefix in block device description, perhaps generate this files on VM start)

Huge, slow xend not needed any more, now it conflicts with libxl
2011-06-01 23:59:53 +02:00
Marek Marczykowski
086c41cb9f dom0 qmemman: watch /local/domain xenstore tree for new/deleted domains
This is the place where _running_ domains are placed.
2011-06-01 23:31:56 +02:00
Marek Marczykowski
4f33e17e69 Set appmenus_templates_dir also for StandaloneVM (#45)
StandaloneVM also have appmenus templates - retrieved from VM. User can choose
some of them to real menu.
2011-05-24 00:14:03 +02:00
Marek Marczykowski
df0240c218 Remove desktop files after uninstalling it (#45) 2011-05-24 00:10:17 +02:00
Marek Marczykowski
dee7c69156 Create appmenus only for whitelisted apps (if set) (#45) 2011-05-24 00:09:44 +02:00
Marek Marczykowski
e1cea1f50b dom0: tool for sync desktop file templates (#45) 2011-05-20 16:38:00 +02:00
Marek Marczykowski
773f0f7b7a dom0: Fix qvm-prefs for standalone VM 2011-05-17 23:05:55 +02:00
Marek Marczykowski
ee87fff0d7 dom0: implement QubesVm.get_start_time() (#231)
Needed to check if VM was just started again
2011-05-12 18:15:09 +02:00
Marek Marczykowski
dccc528144 dom0: qmemman: distribute memory only if there are VMs which can accept it
This prevent potential inifinite loop in qmemman when free memory cannot be
assigned to any VM (because of static max). Practically this will never happen,
because dom0 can always accept memory.
2011-05-12 17:36:47 +02:00
Marek Marczykowski
b57b41aafa dom0: qmemman: Support for maxmem != physical memory (#235) 2011-05-12 15:20:26 +02:00
Marek Marczykowski
3d92e50792 Merge branch 'sane-and-pretty' of ssh://git.qubes-os.org/var/lib/qubes/git/rafal/core 2011-05-09 12:25:14 +02:00
Rafal Wojtczuk
6067be29df qmemman: add comments, make some identifiers more verbose 2011-05-04 17:58:28 +02:00
Rafal Wojtczuk
18e207cbc5 qmemman: prefix variables read from xenstore with "untrusted_"
Additionally move all already existing checks to an already
existing is_meminfo_suspicious procedure.
2011-05-04 17:10:01 +02:00
Marek Marczykowski
4a76bf2981 Call xm to set maxmem, instead of direct call to xend.
Previous one hangs sometimes with 100% occupied by xend.
This will also be simpler to port to xl/libxl interface.
2011-05-01 12:02:27 +02:00
Marek Marczykowski
f49c3a4224 Reduce dom0 priority bonus
To not kill AppVMs performance with ex kcryptd
2011-05-01 00:32:04 +02:00
Marek Marczykowski
aa7df98b7e Use half of host memory as maxmem by default. Allow to configure it per VM. 2011-04-29 01:43:41 +02:00
Marek Marczykowski
ac84bbe621 Remove correct lockfile on qubes_setupdvm stop 2011-04-27 23:07:38 +02:00
Marek Marczykowski
98f4028142 Connect vif's to already running VMs on NetVM/ProxyVM startup (#190)
Also cleanup stale vifs using "xm network-detach ... -f"
Fix iptables rules to support not only first vif of VM
2011-04-23 03:05:27 +02:00
Marek Marczykowski
0b66804a7b Merge branch 'master' of ssh://git.qubes-os.org/var/lib/qubes/git/smoku/core 2011-04-21 23:56:41 +02:00
Marek Marczykowski
50af1d15b3 Catch more exceptions during VM restore (#212) 2011-04-20 20:05:58 +02:00
Tomasz Sterna
5001b7c9d7 Save VM updatable state in qubes_vm_updateable 2011-04-20 01:01:38 +02:00
Marek Marczykowski
8a9bbbfc98 Fix usage info (and args check) for remove_appvm_appmenus.sh (#225) 2011-04-19 18:06:01 +02:00
Marek Marczykowski
e7190d0239 Clean appmenus on template remove (#225) 2011-04-19 17:55:06 +02:00
Marek Marczykowski
ccecb27b5b Use any directory template when creating appmenus (#225) 2011-04-19 16:52:31 +02:00