diff --git a/src/runtime/virtcontainers/fc.go b/src/runtime/virtcontainers/fc.go index 7dac0e78a0..4c90b46097 100644 --- a/src/runtime/virtcontainers/fc.go +++ b/src/runtime/virtcontainers/fc.go @@ -1057,7 +1057,12 @@ func (fc *firecracker) hotplugBlockDevice(ctx context.Context, drive config.Bloc fc.umountResource(driveID) // use previous raw file created at createDiskPool, that way // the resource is released by firecracker and it can be destroyed in the host - path = filepath.Join(fc.jailerRoot, driveID) + if fc.jailed { + // use path relative to the jail + path = filepath.Join("/", driveID) + } else { + path = filepath.Join(fc.jailerRoot, driveID) + } } return nil, fc.fcUpdateBlockDrive(ctx, path, driveID)