]> xenbits.xensource.com Git - osstest.git/commitdiff
ts-nested-setup, setup l1 lvm volume groupe in guest
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 26 Oct 2023 16:42:09 +0000 (17:42 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 28 Mar 2024 16:51:52 +0000 (16:51 +0000)
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>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
ts-nested-setup

index be3d373313a3ff83d611256170a8669754eef3e8..7fc8beef19245206c51f377df12c7485132b4506 100755 (executable)
@@ -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();