image: allow image_to_vm.sh to use --disk_layout arg
See comment here https://crbug.com/1083491#c19
BUG=chromium:1083491
TEST=unit tests
Change-Id: Id9086d5ea5f1e9a5e87c1fdc73f16780ff9bd7b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2229439
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Sean Abraham <seanabraham@chromium.org>
Tested-by: Sean Abraham <seanabraham@chromium.org>
diff --git a/api/controller/image.py b/api/controller/image.py
index 66fc9a6..42de0b8 100644
--- a/api/controller/image.py
+++ b/api/controller/image.py
@@ -107,7 +107,8 @@
if vm_type in [_BASE_GUEST_VM_ID, _TEST_GUEST_VM_ID]:
vm_path = image.CreateGuestVm(board, is_test=is_test)
else:
- vm_path = image.CreateVm(board, is_test=is_test)
+ vm_path = image.CreateVm(
+ board, disk_layout=build_config.disk_layout, is_test=is_test)
except image.ImageToVmError as e:
cros_build_lib.Die(e)