summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-08-16 18:57:58 +0300
committerLars Wirzenius <liw@liw.fi>2018-08-16 18:57:58 +0300
commitc77c87e3feb1f3ad7d903a2bf5950aa3c4a2eb03 (patch)
tree7ffd6d7bc1f84d5e295188d9f735af490d6978d8
parente2cfc18fbe00328f3a242400b6e0590d3b322a02 (diff)
downloadvmdb2-c77c87e3feb1f3ad7d903a2bf5950aa3c4a2eb03.tar.gz
Change: allow setting the image dev in the .vmdb file
In case the heuristic fails, as it does, is using a real block device as --output.
-rw-r--r--vmdb/plugins/grub_plugin.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/vmdb/plugins/grub_plugin.py b/vmdb/plugins/grub_plugin.py
index b0b3d4d..1189e4e 100644
--- a/vmdb/plugins/grub_plugin.py
+++ b/vmdb/plugins/grub_plugin.py
@@ -125,7 +125,9 @@ class GrubStepRunner(vmdb.StepRunnerInterface):
root_part = step['root-part']
root_dev = state.parts[root_part]
- image_dev = self.get_image_loop_device(root_dev)
+ image_dev = step.get('image-dev')
+ if image_dev is None:
+ image_dev = self.get_image_loop_device(root_dev)
if 'efi-part' in step:
efi_part = step['efi-part']