diff mbox series

[OSSTEST,24/36] ts-nested-setup, setup l1 lvm volume groupe in guest

Message ID 20240318165545.3898-25-anthony.perard@citrix.com (mailing list archive)
State New
Headers show
Series Switch to Debian Bookworm | expand

Commit Message

Anthony PERARD March 18, 2024, 4:55 p.m. UTC
LVM in l0 doesn't let us run pvcreate on the host LV, `pvcreate
$outer_lvdev` fails with:
    Cannot use /dev/$l0-vg/l1_gueststorage_outer_lv: device is an LV

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 ts-nested-setup | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/ts-nested-setup b/ts-nested-setup
index be3d3733..7fc8beef 100755
--- a/ts-nested-setup
+++ b/ts-nested-setup
@@ -80,14 +80,14 @@  sub guest_storage () {
     target_cmd_root($l0, "vgremove -f $inner_vg ||:");
     my $outer_lvdev = lv_create($l0, $outer_vg, $outer_lv, $size);
 
-    target_cmd_root($l0, <<END);
-        pvcreate $outer_lvdev
-	vgcreate $inner_vg $outer_lvdev
-END
-
     toolstack($l0)->block_attach($l1, "$outer_lvdev,raw,sdb,rw");
     # NB this does not update the l1 guest config so if the l1 is shut
     # down and recreated in the l0, this will vanish.
+
+    target_cmd_root($l1, <<END);
+	pvcreate /dev/xvdb
+	vgcreate $inner_vg /dev/xvdb
+END
 }
 
 packages();