Wojtek Porczyk
c9accc258c
Merge remote-tracking branch 'woju/pull/15/head' into core3-devel
...
Conflicts:
qubes/storage/__init__.py
qubes/storage/file.py
qubes/vm/qubesvm.py
2016-06-28 15:15:00 +02:00
Bahtiar `kalkin-` Gadimov
b9ddc00741
Add qvm-block
2016-06-23 13:16:08 +02:00
Bahtiar `kalkin-` Gadimov
90c882610e
Storage attach volumes from other pools
...
- Already attached volumes are ignored
2016-06-23 13:16:07 +02:00
Bahtiar `kalkin-` Gadimov
0ac40ddd4f
Volume.__repr__ returns POOL_NAME:VOLUME_ID
2016-06-23 13:16:04 +02:00
Bahtiar `kalkin-` Gadimov
09727b1cbd
Add Volume.internal field
...
- Linux kernel volumes are always internal volumes
2016-06-23 13:16:03 +02:00
Bahtiar `kalkin-` Gadimov
07800a0e67
Add Volume.eq, neq and hash
2016-06-23 13:16:03 +02:00
Bahtiar `kalkin-` Gadimov
f08ce2cb79
A Pool should always have a volumes property
...
NOTE: FilesPool need some way to dynamically discover volumes
2016-06-23 13:15:54 +02:00
Bahtiar `kalkin-` Gadimov
88198fb7ac
Storage verification is part of the pool interface
...
- LinuxKernel pool add verify method
- FilePool implent verification
2016-06-23 13:11:59 +02:00
Bahtiar `kalkin-` Gadimov
e7732f8ad0
Storage.verify fires domain-verify-files event
2016-06-21 14:58:11 +02:00
Bahtiar `kalkin-` Gadimov
3b441ebaad
Add Storage.outdated_volumes and Pool.is_outdated
2016-06-21 14:58:10 +02:00
Bahtiar `kalkin-` Gadimov
a4577c0dce
Rename Storage.create_on_disk to Storage.create
2016-06-16 16:59:27 +02:00
Bahtiar `kalkin-` Gadimov
930fe417a8
Remove storage size and usage methods from QubesVM
2016-06-16 16:59:26 +02:00
Wojtek Porczyk
6ade5736d7
pylint fixes
2016-06-10 21:27:29 +02:00
Wojtek Porczyk
a615a45ecd
Merge remote-tracking branch 'woju/pull/13/head' into core3-devel
2016-06-02 13:24:15 +02:00
Marek Marczykowski-Górecki
bb2e1f2870
qubes/vm: handle VM toplevel directory in QubesVM object not Storage
...
This directory is not only for disk images (in fact disk images may be
elsewhere depending on choosen volume pool), so it would be cleaner to
handle (create/remove) it directly in QubesVM class.
2016-06-02 13:22:07 +02:00
Bahtiar `kalkin-` Gadimov
e30f894df9
Add Volume.removable field
2016-05-22 21:42:27 +02:00
Bahtiar `kalkin-` Gadimov
116ba64e51
Storage.remove() catch IO/OSError and log it
2016-05-21 01:35:32 +02:00
Bahtiar `kalkin-` Gadimov
8959e5a77e
Implement qvm-remove
...
- Remove old qvm-remove
- Remove a log line from Storage, because it prints confusing lines, like:
Removing volume kernel: /var/lib/qubes/vm-kernels/4.1.13-6/modules.img
2016-05-21 01:35:30 +02:00
Bahtiar `kalkin-` Gadimov
b2c1017488
Fix missing parameter in Pool.__init__()
2016-04-30 20:42:00 +02:00
Bahtiar `kalkin-` Gadimov
8f060a8746
Fix Pool and Volume __init__
2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
591134833b
Replace Volume.__str__ with enhanced __repr__
2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
d7ff4b9057
Move volume xml config from QubesVM to Volume
2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
2e28849c90
Move pool xml config from Qubes to Pool
2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
49b4951389
Storage move rename() logic to XenPool
...
- Fix config renaming
2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
97d04791b7
After add/remove_pool execute Pool.setup/destroy
2016-04-25 07:17:18 +02:00
Bahtiar `kalkin-` Gadimov
5f7cb41a21
Move Storage.clone_disk_files logic to XenPool
...
- Add XenVolume to identify volumes which can be cloned even if they are not in
the same pool
2016-04-25 07:17:17 +02:00
Bahtiar `kalkin-` Gadimov
bdfb85ac19
Refactor Storage, Pool and XenPool
...
- Remove all *_dev_config methods
- Checks if a storage image exists moved to XenPool
- Storage.remove wraps Pool.remove()
- Stop volumes on domain sutdown/kill
- Warn when using deprecated methods
2016-04-25 07:17:17 +02:00
Bahtiar `kalkin-` Gadimov
32255a7916
Reverted Storage ←→ Pool dependency
...
- Storage() operates on a pool and in future on multiple pools
2016-04-25 07:17:16 +02:00
Bahtiar `kalkin-` Gadimov
24193c4308
Add Volume class
2016-04-25 07:16:38 +02:00
Bahtiar `kalkin-` Gadimov
3c798bc825
Pool configuration include the pool name
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
22d73e8fa9
Fix Pool dir_path normalization
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
36470310a2
Replace pool config parsing logic
...
- Move add_pool/remove_pool to Qubes class
- Add Qubes.get_pool
- Remove storage.conf
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
47e89d84b6
XenStorage.format_disk_dev returns now BlockDevice
2016-04-25 07:16:36 +02:00
Bahtiar `kalkin-` Gadimov
b1978abce5
Use entry_points for pool driver discovery
...
- Add qubes.storage entry point to setup.py
- Removed the old pool driver class loading logic
- Reworked pool tests
2016-04-06 10:11:19 +02:00
Marek Marczykowski-Górecki
a73c694f54
storage: access *_img directly from vm.storage object
...
Not through vm.something_img proxy.
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
f52a0f2d41
storage: get rid of 'servicevms' subdir
...
Keep all the non-template VMs in 'appvms'. Having it split makes no
sense since any VM can be "converted" to NetVM by simply changing its
provides_network attribute and probably assigning some PCI device.
On the other hand, it may be useful to set this manually, for example by
management stack - based on VM function, not type. But don't care about
it for now.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
c1bab3d094
storage: reset_volatile_storage doesn't need source_template parameter
...
It shouldn't touch anything not already known to the VM object.
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
5f48b76b27
storage: fix vm.create_on_disk for non-template based VMs
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
3af71ab65d
storage: fix handling netvm and adminvm
...
@woju what was consensus on 'servicevms' dir? Since "being network
provider" is no longer separate type and can be changed during VM
lifetime, maybe we should abandon that idea? Or maybe just set it as VM
property (some storage pool config argument) - that way mgmt stack could
put all the sys-* VMs into separate directory, regardless of the type.
2016-03-03 01:18:06 +01:00
Marek Marczykowski-Górecki
d3f9c0b169
storage: fix loading default storage pool
...
qubes.config.defaults holds ['pool_drivers'] strings, not classes.
2016-03-03 01:14:54 +01:00
Wojtek Porczyk
c47e29ed50
Fix most errors from pylint
2016-03-03 01:14:54 +01:00
Wojtek Porczyk
9eafa57539
Merge remote-tracking branch 'marmarek/master' into core3-devel
...
The following list is bollocks. There were many, many more.
Conflicts:
core-modules/003QubesTemplateVm.py
core-modules/005QubesNetVm.py
core/qubes.py
core/storage/__init__.py
core/storage/xen.py
doc/qvm-tools/qvm-pci.rst
doc/qvm-tools/qvm-prefs.rst
qubes/tools/qmemmand.py
qvm-tools/qvm-create
qvm-tools/qvm-prefs
qvm-tools/qvm-start
tests/__init__.py
vm-config/xen-vm-template-hvm.xml
This commit took 2 days (26-27.01.2016) and put our friendship to test.
--Wojtek and Marek
2016-03-03 01:13:51 +01:00
Wojtek Porczyk
87f74a5ba8
qubes/storage: Fix template instantiation
...
rootcow image was somehow dropped
2015-12-24 00:14:28 +01:00
Wojtek Porczyk
96efb4568a
core3: add different exceptions
...
From now on there are different exceptions which can be raise on
different occasions.
fixes QubesOS/qubes-issues#1279
2015-10-17 00:17:12 +02:00
Wojtek Porczyk
ea44c0acf3
qubes: pylint fixes
...
Fix bunch of errors and warnings.
2015-10-05 23:49:39 +02:00
Wojtek Porczyk
c9cbf8ffe2
core3: fix mounting modules.img
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
5d9b92a039
qubes: pylint fixes (minor programming errors)
2015-06-29 17:39:28 +02:00
Wojtek Porczyk
6798790e1f
qubes: pylint fixes (fix signatures)
2015-06-29 17:39:27 +02:00
Wojtek Porczyk
4a85c823c3
qubes: pylint fixes (qualify imported variables)
2015-06-29 17:39:27 +02:00
Wojtek Porczyk
bf29d5e5b5
qubes: pylint fixes (disable unfounded messages)
2015-06-29 17:39:27 +02:00