Marek Marczykowski-Górecki
35cb82cd2b
storage: use root-cow.img for HVM template, to support reverting changes
...
We still can't support running HVM template and its VMs simultaneously
(easily), but still, have root-cow.img handled for HVM template, to
allow qvm-revert-template-changes.
Fixes QubesOS/qubes-issues#1573
2016-01-07 05:48:32 +01:00
Marek Marczykowski-Górecki
fa196f1350
storage: actually use storage.root_img and such properties
...
Actual VM root disk used hardcoded image names, instead of properties
set for that purpose...
2016-01-07 05:48:32 +01:00
Bahtiar `kalkin-` Gadimov
c8d26c253e
Storage refactor device config generation
...
- QubesVmStorage provides now a default get_config_params() method which should
be enough for all possible Storage implementations.
- When writing a custom Storage implementation, one has just to reimplement the
following methods:
* root_dev_config()
* private_dev_config()
* volatile_dev_config()
- QubesVmStorage provides a default implementation of other_dev_config(),
because it can be shared by all storage implementations
2015-12-22 11:24:28 +01:00
Bahtiar `kalkin-` Gadimov
85421e3f48
Move device names from XenStorage to QubesVmStorage
2015-11-25 12:49:56 +01:00
Bahtiar `kalkin-` Gadimov
9b23576ff6
Provide method format_disk_dev() to all storages
...
The method XenStorage._format_disk_dev() generates the xml config for a device.
It is not specific to the Xen file storage implementation. It can and must be
reused by other storage implementations
2015-11-25 12:48:47 +01:00
Bahtiar `kalkin-` Gadimov
feaaaa75fa
Move the vmdir logic from XenPool to Pool
...
Any storage implementation needs this logic for saving the vm config and
`*.desktop` files.
2015-11-25 12:47:25 +01:00
Bahtiar `kalkin-` Gadimov
885dc5cd81
Rename storage dir to dir_path, type to driver
...
Bad idea to use attributes which are named after built in functions.
2015-11-21 14:46:23 +01:00
Bahtiar `kalkin-` Gadimov
9eee00c6d7
QubesNetVm and subclasses use servicevm/ as vmdir
2015-11-17 21:21:02 +01:00
Bahtiar `kalkin-` Gadimov
1934f06869
XenStorage add DisposableVm handling
2015-11-17 21:15:13 +01:00
Bahtiar `kalkin-` Gadimov
76224dac86
Path to the Vm images is set by the storage
...
- This moves the logic for setting the path to the storage specific class like
XenStore
2015-11-17 19:37:20 +01:00
Bahtiar `kalkin-` Gadimov
0bc0bc9045
XenStorage make sure subdirs exist in pool dir
2015-11-17 19:37:20 +01:00
Bahtiar `kalkin-` Gadimov
58f23ca392
Add configurable pool_dir to XenPool
2015-11-17 19:37:20 +01:00
Bahtiar `kalkin-` Gadimov
26711e7e9a
Use default pool_config if pool name is 'default'
2015-11-17 19:37:19 +01:00
Bahtiar `kalkin-` Gadimov
78891dd70f
QubesVm save the name of the storage pool used
2015-11-17 19:37:19 +01:00
Bahtiar `kalkin-` Gadimov
8e0207a199
Rename QubesXenVmStorage to XenStorage
2015-11-17 19:37:19 +01:00
Bahtiar `kalkin-` Gadimov
15d5e6edbb
Add Pool & XenPool
2015-11-17 19:37:18 +01:00
Marek Marczykowski-Górecki
26cf723841
core/hvm: fix external disks handling
2015-08-09 21:21:27 +02:00
Marek Marczykowski-Górecki
8f862cdf69
core/hvm: check if VM serving cdrom content is running
2015-07-25 04:17:59 +02:00
Marek Marczykowski-Górecki
522bfc427a
core: fix template-based HVM disk handling
...
We use only one device-mapper layer for HVMs, and this isn't the same as
for PV - it is that one, which PV does in initramfs.
Device-mapper layers summary for template-based VMs:
PV: root.img+root-cow.img (dom0) -> xvda, xvda+volatile.img (VM)
HVM: root.img+volatile.img (dom0)
2015-07-01 04:35:09 +02:00
Marek Marczykowski-Górecki
dbb43f6035
core/storage: fix disk handling for HVM template
...
Currently HVM template do not have root-cow.img (also do not use 2-layer
device-mapper as PV VMs), so vm.is_template() check isn't enough.
2015-04-06 00:21:38 +02:00
Marek Marczykowski-Górecki
4dfb629dd8
Update libvirt config syntax for new version of driver domain patches
...
Finally accepted patches uses different syntax: <backenddomain name=.../> tag
instead of <source domain=.../>.
2015-03-21 21:12:48 +01:00
Marek Marczykowski-Górecki
adfc4e0ac9
core: disks handling cleanup, fix them for TemplateHVM
...
Move rootcow_img to storage class, remove clean_volatile_img. And most
importantly - set source_template in QubesHVm.create_on_disk.
2015-02-09 06:02:20 +01:00
Marek Marczykowski-Górecki
1da8ab5823
core: Add missing import
2015-01-08 03:55:02 +01:00
Wojciech Zygmunt Porczyk
6b0a5f9738
storage/xen.py: always initialise args['otherdevs']
2014-11-19 12:50:32 +01:00
Marek Marczykowski-Górecki
ea68c6a766
xen: fix template vm storage code
2014-11-19 12:50:28 +01:00
Marek Marczykowski-Górecki
ada5ebd784
Use "None" in *_img attr for "not applicable"
...
Some VM types do not have particular disk image. Instead of enumerating
cases in storage class, signal unused image from VM class by setting
appropriate attr to None.
2014-11-19 12:50:27 +01:00
Marek Marczykowski-Górecki
a17f6ef779
Update QubesHVM to use QubesVmStorage classes
...
Also add external drive support to QubesXenVmStorage (move from
QubesHVM).
2014-11-19 12:50:27 +01:00
Marek Marczykowski-Górecki
0a1f3d0a44
core: split VM images handling to separate class
...
This will ease handling different types of VMM (which can require
different image types, location etc).
2014-11-19 12:50:25 +01:00