New Version can be found here:
https://lists.proxmox.com/pipermail/pve-devel/2023-November/060429.html
On 11/17/23 12:53, Hannes Duerr wrote:
adds vendor and product information for SCSI devices to the json schema and
checks in the VM create/update API call if it is possible to add these to QEMU
as a device option
Signed-off-by: Hannes Duerr <h.du...@proxmox.com>
---
PVE/API2/Qemu.pm | 39 +++++++++++++++++++++++++++++++++++++++
PVE/QemuServer.pm | 13 ++++++++++++-
PVE/QemuServer/Drive.pm | 24 ++++++++++++++++++++++++
3 files changed, 75 insertions(+), 1 deletion(-)
__PACKAGE__->register_method({
name => 'vmlist',
path => '',
@@ -1011,6 +1038,13 @@ __PACKAGE__->register_method({
my $conf = $param;
my $arch = PVE::QemuServer::get_vm_arch($conf);
+ for my $opt (sort keys $param->%*) {
+ if ($opt =~ m/^scsi(\d)+$/) {
+ assert_scsi_feature_compatibility(
+ $opt, $conf, $storecfg, $param->{$opt});
+ }
+ }
+
$conf->{meta} = PVE::QemuServer::new_meta_info_string();
my $vollist = [];
@@ -1826,6 +1860,11 @@ my $update_vm_api = sub {
PVE::QemuServer::vmconfig_register_unused_drive($storecfg, $vmid,
$conf, PVE::QemuServer::parse_drive($opt, $conf->{pending}->{$opt}))
if defined($conf->{pending}->{$opt});
+ if ($opt =~ m/^scsi(\d)+$/) {
+ PVE::QemuServer::assert_scsi_feature_compatibility(
+ $opt, $conf, $storecfg, $param->{$opt});
^ copy paste error
+ }
+
my (undef, $created_opts) = $create_disks->(
$rpcenv,
$authuser,
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel