> I wonder if I could move the losetup code into PVE::Storage::activate_volumes > ? > (with an extra flag to enable/disable it) > > Seem to be the right place ? Sorry, I am a bit lost - what is the purpose? It would help If you tell the final goal. Or what is the problem with current code? It is not always obvious ...