Commit Graph

707 Commits

Author SHA1 Message Date
Marek Marczykowski
21222cc859 dom0: start xenstored service in %post
This is required by qvm-init-storage and in general to qvm-* works properly.
2011-06-23 20:04:27 +02:00
Marek Marczykowski
151b15bb8c dom0: Edit xl.conf in %post instead of overriding file (rpm file conflict) 2011-06-23 14:39:17 +02:00
Marek Marczykowski
d9d7a69c27 dom0+vm: Tools for downloading dom0 update by VM (#198)
Mainly 4 parts:
 - scripts for providing rpmdb and yum repos to VM (choosen by qvm-set-updatevm)
 - VM script for downloading updates (qubes_download_dom0_updates.sh)
 - qfile-dom0-unpacker which receive updates, check signatures and place its in dom0 local yum repo
 - qvm-dom0-upgrade which calls all of above and after all yum gpk-update-viewer

Besides qvm-dom0-upgrade, updates are checked every 6h and user is prompted if
want to download it. At dom0 side gpk-update-icon (disabled yet) should notice
new updates in "local" repo.
2011-06-22 00:44:48 +02:00
Marek Marczykowski
b2a0a09168 version 1.6.1 2011-06-12 02:27:30 +02:00
Marek Marczykowski
6d9fdf4729 dom0: Add shortcut qubes-appmenu-select ("Add more shortcuts...") for each VM (#45) 2011-06-12 01:47:15 +02:00
Marek Marczykowski
b75f89038b dom0: qvm-sync-appmenus output error messages to stderr 2011-06-12 01:47:15 +02:00
Marek Marczykowski
83d211836a dom0+vm: Trigger appmenus sync after yum transaction (#45), NEW QREXEC COMMAND
After yum transaction (install/upgrade/remove),
yum-plugin-post-transaction-actions will execute script which trigger
qvm-sync-appmenus in dom0 (through qrexec).
THIS INTRODUCE NEW PREDEFINED COMMAND IN QREXEC
2011-06-12 01:46:24 +02:00
Marek Marczykowski
4634a6897c dom0: qvm-sync-appmenus: support for calling by qrexec_client 2011-06-12 00:56:47 +02:00
Marek Marczykowski
a4d1a21b46 dom0: qvm-sync-appmenus - copy *directory.template when needed 2011-06-11 23:09:55 +02:00
Marek Marczykowski
9375b8d6ff dom0: qvm-sync-appmenus: add missing object name to vars 2011-06-11 22:58:00 +02:00
Marek Marczykowski
5714410724 dom0: qvm-sync-appmenus: create appmenus dir if needed 2011-06-11 22:55:53 +02:00
Marek Marczykowski
454b678284 dom0: cpu load calculation when VM rebooted fix 2011-06-11 20:44:26 +02:00
Marek Marczykowski
7ced90832b dom0: Support for pcidevs in qvm-prefs
Can be used to e.g. have two NetVMs, eatch with one network interface assigned.
2011-06-10 19:08:47 +02:00
Marek Marczykowski
4cb5838f5b dom0: qvm-revert-template-changes message fix 2011-06-10 18:44:53 +02:00
Marek Marczykowski
5cce87c7d2 dom0: Introduce qvm-revert-template-changes tool 2011-06-10 18:36:20 +02:00
Marek Marczykowski
4ab4783ee2 dom0: block-snapshot: add prepare and cleanup actions
"prepare" and "cleanup" actions can be used to setup device manually - not from
udev. This is used by qvm-revert-template-changes.
2011-06-10 18:34:17 +02:00
Marek Marczykowski
f3b245a45a dom0: block-snapshot: retrieve domain name from frontend-id only when no "domain" entry in xenstore
This enables compatibility with libxl AND xend.
2011-06-10 18:33:31 +02:00
Marek Marczykowski
ae52e1829a dom0: block-snapshot: enable nullglob to not fail on snapshot/origin remove
Normally should not happen because all domains needs at least one snapshot
device, but in some rare situation can be helpful to cleanup stale devices.
2011-06-10 18:29:56 +02:00
Marek Marczykowski
63dda4de34 dom0: qvm-create: remove obsolete add_to_xen_storage call 2011-06-10 18:27:16 +02:00
Marek Marczykowski
925647c7d7 dom0: run xl create through sudo
This finally solve problem with RLIMIT_MEMLOCK (less important) and is required
to attach PCI devices (eg netvm restart) - more important.
2011-06-10 18:19:19 +02:00
Marek Marczykowski
891653a413 dom0: create lockfile for libxl and set dom0 name in xenstore
Create lockfile to set it proper permissions. Without it the first use
(qvm-start netvm) will create it with root:root and 600.
Without xend, no one sets dom0 name...
2011-06-10 12:02:32 +02:00
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
0ffb186681 vm: add -qubes suffix to xenstore-watch to not conflict with xen standard tool 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
48d520f847 proxyvm: directly display error msg beside of writing it to xenstore 2011-06-04 02:54:17 +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