[libvirt] [PATCHv5 09/13] qemu, storage: improve type safety