Allow creating chroots on a loopback device.

If the new --useimage flag is passed, instead of creating the chroot
inside a directory, create a loopback device containing an LVM thin LV
and mount it onto the chroot.  This will enable a subsequent CL to set
up snapshots of the chroot state.

TEST=Created/deleted/replaced a bunch of chroots with cros_sdk and a
local cbuildbot.

Change-Id: Ia79a944d2848c3e1ed00346b389b9f66fd5be4b7
Commit-Ready: Benjamin Gordon <>
Tested-by: Benjamin Gordon <>
Reviewed-by: Benjamin Gordon <>
3 files changed