diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-08-16 18:57:58 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-08-16 18:57:58 +0300 |
commit | c77c87e3feb1f3ad7d903a2bf5950aa3c4a2eb03 (patch) | |
tree | 7ffd6d7bc1f84d5e295188d9f735af490d6978d8 | |
parent | e2cfc18fbe00328f3a242400b6e0590d3b322a02 (diff) | |
download | vmdb2-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.py | 4 |
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'] |