plugin: add machine version to qemu_blockdev_options() interface
Plugins can guard based on the machine version to be able to switch drivers or options in a safe way without the risk of breaking older versions. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
2d874037f3
commit
6c07619abd
@ -721,7 +721,7 @@ sub abs_filesystem_path {
|
||||
|
||||
# see the documentation for the plugin method
|
||||
sub qemu_blockdev_options {
|
||||
my ($cfg, $volid, $options) = @_;
|
||||
my ($cfg, $volid, $machine_version, $options) = @_;
|
||||
|
||||
my ($storeid, $volname) = parse_volume_id($volid);
|
||||
|
||||
@ -733,7 +733,7 @@ sub qemu_blockdev_options {
|
||||
die "cannot use volume of type '$vtype' as a QEMU blockdevice\n"
|
||||
if $vtype ne 'images' && $vtype ne 'iso' && $vtype ne 'import';
|
||||
|
||||
return $plugin->qemu_blockdev_options($scfg, $storeid, $volname, $options);
|
||||
return $plugin->qemu_blockdev_options($scfg, $storeid, $volname, $machine_version, $options);
|
||||
}
|
||||
|
||||
# used as last resort to adapt volnames when migrating
|
||||
|
||||
Reference in New Issue
Block a user