[pve-devel] [RFC storage 1/3] plugin: add method to get qemu blockdevice options for volume

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Fri May 23 10:30:41 CEST 2025


>>
>>    if ($path =~ m|^/|) {
>>	# The 'file' driver only works for regular files. The check
>>below is taken from
>>	# block/file-posix.c:hdev_probe_device() in QEMU. Do not
bother >>with detecting 'host_cdrom'
>>	# devices here, those are not managed by the storage layer.
>>	my $st = File::stat::stat($path);
>>+	my $driver = (S_ISCHR($st->mode) || S_ISBLK($st->mode)) ?
'host_device' : 'file';

This is breaking my qemu-server config unit tests because the file
don't exist.

Also, for lvm volume, they are not currently activate at vm command
line generation. (but anyway, I'll need it to retrieve backing chain,
so maybe it's not a problem)


Do you think it's enough safe to rely on /dev/.. path?




More information about the pve-devel mailing list