diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 1d91422ce4474ee32b0c81674693815be7a640d9..41d69b321f7b44eb5cf28aef800f0341efaab037 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -462,6 +462,14 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl) if (fs->type != VIR_DOMAIN_FS_TYPE_FILE) continue; + if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT) { + if (fs->format == VIR_STORAGE_FILE_RAW || + fs->format == VIR_STORAGE_FILE_NONE) + fs->fsdriver = VIR_DOMAIN_FS_DRIVER_TYPE_LOOP; + else + fs->fsdriver = VIR_DOMAIN_FS_DRIVER_TYPE_NBD; + } + if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_LOOP) { if (fs->format != VIR_STORAGE_FILE_RAW && fs->format != VIR_STORAGE_FILE_NONE) {