Commit Graph

1173 Commits

Author SHA1 Message Date
Rafal Wojtczuk
6472e8c926 DVM: fix savefile to contain ip address
needed for routed networking
2010-09-07 17:36:28 +02:00
Rafal Wojtczuk
2dd9bab23a DVM: add --dvm option to qvm-start
Currently it only forces to use a fake IP address, which can be
replaced during restore time.
2010-09-07 16:15:24 +02:00
Rafal Wojtczuk
5be12f8459 qmemman: switch off memory balancing when doing xm save
Apparently, it interferes:
INFO (XendCheckpoint:417) ERROR Internal error: Could not get vcpu context
INFO (XendCheckpoint:417) ERROR Internal error: Failed to map/save the p2m frame list
2010-09-07 16:00:14 +02:00
Rafal Wojtczuk
11abef3439 qmemman: xc.domain_set_target_mem can throw exceptions, too 2010-09-07 13:10:48 +02:00
Rafal Wojtczuk
a013973806 Use vif-route-qubes. 2010-09-06 17:24:12 +02:00
Rafal Wojtczuk
31e7e96056 Switch to routed VM network (instead of bridging)
No headache from layer 2 attacks.
2010-09-06 17:07:42 +02:00
Rafal Wojtczuk
64e8013dc2 Unify dom0 and netvm sysconfig/iptables
Plus:
- dedicated chain for DNAT to nameservers
- prevent intervm networking. Can be conveniently overriden in necessary cases
by inserting ACCEPT clauses (per VM, probably) at the top of FORWARD
2010-09-06 15:10:01 +02:00
Rafal Wojtczuk
22df517425 qmemman: detect domain list change by watching /vm, not /local/domain
The latter triggers on every memory/meminfo key update, which needlessly
adds xenstore requests.
2010-09-06 10:46:36 +02:00
Rafal Wojtczuk
7dcb7cb196 qmemman: don't use xenapi, use hypercalls to do mem-set 2010-09-03 16:19:48 +02:00
Rafal Wojtczuk
10408d61db qmemman: when low on memory, do not make a VM go below prefmem
Now the balance() has two different cases: enough memory and low_on_memory.
In the former, distribute memory proportianally; in the former, dont do this, as this
makes a VM go below prefmem.
2010-09-01 12:40:02 +02:00
Rafal Wojtczuk
80771763cf qmemman: limit total memory transfer, not each one 2010-09-01 10:39:39 +02:00
Rafal Wojtczuk
c66e0848f3 qmemman: limit domain memory to 2G to workaround for xen xml-rpc limitation
File "/usr/lib64/python2.6/xmlrpclib.py", line 710, in dump_int
    raise OverflowError, "int exceeds XML-RPC limits"
OverflowError: int exceeds XML-RPC limits
How crappy.
2010-08-31 16:19:01 +02:00
Rafal Wojtczuk
de2619fbed qmemman: wrap xenapi.memset within try/except
It can fail e.g. when a domain is being shutdown with a pretty
message like
 File "/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py", line 1322, in setMemoryTarget
    (target * 1024))
Error: (1, 'Operation not permitted')
2010-08-31 15:53:24 +02:00
Rafal Wojtczuk
eb6755e93c qmemman: fix locking
We want balance() to wait on a lock even after balloon() has finished,
until socket client has closed.
2010-08-30 14:50:48 +02:00
Rafal Wojtczuk
2eba4c1c15 I will test before commit. I will test before commit. I will... 2010-08-30 12:01:42 +02:00
Rafal Wojtczuk
f3561b7aad Fix restore completion detection in appvm/qubes_core 2010-08-30 11:43:30 +02:00
Rafal Wojtczuk
62487c0f1e Memory management across VMs, first release 2010-08-30 11:40:19 +02:00
Rafal Wojtczuk
8a022d7904 core.git/dom0/pendrive_swapper/README 2010-08-03 09:03:32 +02:00
Rafal Wojtczuk
cee9d6b4d6 Added comments to nonobvious code fragments 2010-08-03 07:12:59 +02:00
Joanna Rutkowska
4d26334709 dom0/init.d/qubes_core: set Dom0 mem to 1600M 2010-07-30 16:00:18 +02:00
Joanna Rutkowska
557984f4b9 minor ident fixes 2010-07-30 15:59:43 +02:00
Rafal Wojtczuk
4cf0a61858 Before restoring DVM, check for available xen memory
As we already do xm mem-set 0 800 in qubes_core, this is a
correct check. Now, there should be no errors from qubes_restore
in normal circumstances.
2010-07-27 16:08:09 +02:00
Joanna Rutkowska
3856f7cdbd qvm-create-default-dvm: use gray label for dvm-template (be consitent with VM template label) 2010-07-27 12:47:18 +02:00
Rafal Wojtczuk
b578aab5d5 qubes_prepare_saved_domain.sh: Check exit code of xm save 2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
aa894b5700 qvm-create-default-dvm script 2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
d46bf2a270 Pathnames cleanup
Move internal scripts to /usr/lib/qubes plus a couple of similar.
2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
11b8a0409f DVM: execute user script before save
qubes_prepare_saved_domain.sh now takes optional second argument, the
filename. The content of the file will be copied (via xenstore) to DVM
and executed just before save. This makes it possible to preload memory
with useful apps.
2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
0c0f34ba9b DVM: manage savefiles
Instead of hardcoded savefile name, use a symlink in
/var/run/qubes. Tools should set this symlink to a correct
savefile. Also, test whether the savefile is older than the
template root.img.
2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
6ee594f972 Update qubes.xml with DVM
Also, pass correct parameters to DVM's qubes_guid (taken from
qubes.xml).
2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
e1320483f9 qfilexchgd: handle 'killme' command 2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
0c122f670e qfilexchgd: pass correct transaction_seq for delayed transaction 2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
203b3fd70b dvm: reserve a bit more ram in dom0 2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
2e927cce68 dvm: correct PATH and permissions 2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
c71a1694d2 Make the message about DVM creation failure more verbose 2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
a343272481 Make br0 forward traffic delay short 2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
d93e6dd86b add syslog.h to qubes_restore.c 2010-07-21 12:57:02 +02:00
Rafal Wojtczuk
c05911a01e qfilexchgd fixes
kill dvm after is has sent an answer
set transaction_seq to 0 for normal transfers
qfilexchgd mode:=755
2010-07-21 12:56:43 +02:00
Rafal Wojtczuk
0dbef3f2ae dvm: appvm side code 2010-07-21 12:56:43 +02:00
Rafal Wojtczuk
08d3082cf3 qfilexchgd code for disposable VM 2010-07-21 12:56:43 +02:00
Rafal Wojtczuk
793b7b2596 Quick VM restore support 2010-07-21 12:56:21 +02:00
Joanna Rutkowska
8c4ac4326f pm-utils: 01qubes-sync-vms-clock: cosmetic fix for nicer output 2010-07-08 12:45:33 +02:00
Joanna Rutkowska
c8ef500588 Pause/Unpause all running VMs on system suspend/resume
This is to fix the VM lockup problem on HT processors that
occured after S3 resume (see ticket #52).

The qvm-run command now takes additional two switches:
--pause
--unpause
2010-07-08 12:41:29 +02:00
Joanna Rutkowska
c2826ec0c4 Make qubes-testing repos disabled by default 2010-07-06 16:35:10 +02:00
Joanna Rutkowska
115df6f1af Dom0: sync wallclocks in all vms upon resume from S3 sleep
This is really a workaround, until Xen implements proper suspend/resume
mechanism for notfying DomUs about system-wide S3 sleep.

See this thread for more details:

http://lists.xensource.com/archives/html/xen-devel/2010-07/msg00037.html
2010-07-06 16:32:50 +02:00
Joanna Rutkowska
6ac6fe397a qubes.py: Always reset/create swap COW on VM start 2010-06-29 17:04:24 +02:00
Joanna Rutkowska
e6c831cb79 Merge branch 'migration-tools' 2010-06-29 02:24:12 +02:00
Joanna Rutkowska
92d00bb19f qvm-backup-restore: cosmetic fixes 2010-06-29 02:20:27 +02:00
Joanna Rutkowska
b0ed1e12d2 qvm-backup-restore: fix template restore process 2010-06-29 02:19:40 +02:00
Joanna Rutkowska
74e820a4e5 In dry_run also use /var/lib/qubes/ for base dir 2010-06-26 15:02:58 +02:00
Joanna Rutkowska
16f3b20a31 qubes.py: Correct retcode checking logic on clone_template() 2010-06-26 15:02:18 +02:00
Joanna Rutkowska
1b1d0b9f93 Added qvm-backup and qvm-backup-restore tools 2010-06-26 15:00:19 +02:00
Joanna Rutkowska
0fa26d84ea Merge branch 'block_dhcp_from_vms' of git://qubes-os.org/rafal/core 2010-06-25 18:23:14 +02:00
Rafal Wojtczuk
42ce721063 In dom0, block dhcp replies from vms.
Relevant only if using dom0 as netvm. It is already done in "real" netvm.
2010-06-25 12:05:39 -04:00
Joanna Rutkowska
a760741ecc dom0: qubes_netvm: fix stop() function 2010-06-18 23:11:39 +02:00
Joanna Rutkowska
2b135f2aef dom0: unbind_all_network_devices: try also pciback module, before giving up 2010-06-18 20:09:49 +02:00
Joanna Rutkowska
6322447d1f patch_appvm_initramfs: move qubes_core_setup.sh to pre-udev 2010-06-18 01:46:43 +02:00
Joanna Rutkowska
775e01a8e4 Make dom0, appvm, netvm use different qubes.repo 2010-06-18 01:41:10 +02:00
Joanna Rutkowska
bcae9f9e36 added .gitignore for *.pyo files in qvm-core 2010-06-14 23:53:54 +02:00
Joanna Rutkowska
c95fd449b7 Do not start NetworkManager from dom0 qubes_netvm script
Mark it for auto-start instead by the system scripts
2010-06-11 18:34:59 +02:00
Joanna Rutkowska
8724c65b35 qvm-tools: pass -l <label_index> to qubes_guid 2010-06-03 23:04:47 +02:00
Joanna Rutkowska
297d1d65d0 qubes.py: use label indexes starting from 1, not from 0
This is to unify with the convention used by Window Manager, where index == 0 is reserved for Dom0
2010-06-03 23:04:06 +02:00
Rafal Wojtczuk
4e6e4115e2 dom0 as netvm fixes
Use /etc/sysconfig/iptables
Replace dnsmasq with DNAT
2010-05-31 15:23:51 +02:00
Rafal Wojtczuk
8da2dd6957 Get rid of dnsmasq in netvm.
qubes_setup_dnat_to_ns script sets up DNAT rules for DNS traffic; it is
triggered by dhclient or NetworkManager, and manually (in case there is
a static resolv.conf).

Put IP-dependent rules in qubes-core, after local ip is known. It could be
further improved by introducing custom chains, to enable iptables save.

Restrict FORWARD.
2010-05-30 15:45:35 +02:00
Joanna Rutkowska
7d4be47df0 qubes.py: fixed an ident bug causing an icon for appvm to be created only if verbose was True 2010-05-11 16:00:50 +02:00
Joanna Rutkowska
301fbec19c qubes.py: added qubes_guid_path global variable 2010-05-11 14:48:54 +02:00
Joanna Rutkowska
da41cd2a4a QubesVmLabels(): introduce 'index' field, useful for sorting 2010-05-10 15:03:50 +02:00
Joanna Rutkowska
cd20eeb8a4 Reload Xend session params when we got an XenAPI.Failure exception
Because we're caching e.g. uuid and metrics objects for the Xend session, we can get an exception
when the VM changed the power state between since we cached the object. We now catch this exception
and reload uuid and metrics object in the handler.
2010-05-10 15:03:50 +02:00
Joanna Rutkowska
67bf660255 unbind_all_network_devices: fix regexp to cover all pci devices
http://www.qubes-os.org/trac/ticket/19
2010-05-07 16:06:38 +02:00
Joanna Rutkowska
df82fa8282 Optimize Xend acesseses
Open Xend session only once, cache various intermediary Xen API
objects for faster access. This all is important for Qubes Manager, so that it
doesn'tintroduce too much load on Dom0's CPU when displaying the load chart.
2010-05-07 16:06:38 +02:00
Joanna Rutkowska
c8f220b1fc Added qubes.png icon 2010-05-07 16:06:38 +02:00
Joanna Rutkowska
d7011a6ddb Fix the purple frame's color :) 2010-05-07 16:06:16 +02:00
Rafal Wojtczuk
e9586a8128 qubes.py: correctly calculate Xen free memory 2010-04-10 13:56:43 +02:00
Joanna Rutkowska
a17989470a Initial public commit.
(c) 2010 Invisible Things Lab

Authors:
=========
Joanna Rutkowska <joanna@invisiblethingslab.com>
Rafal Wojtczuk  <rafal@invisiblethingslab.com>
2010-04-05 20:58:57 +02:00