From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id BB13B1FF09F for ; Thu, 17 Sep 2026 18:24:52 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 5B8D2215AB; Thu, 17 Sep 2026 18:24:12 +0200 (CEST) From: =?UTF-8?q?Michael=20K=C3=B6ppl?= To: pve-devel@lists.proxmox.com Subject: [PATCH e2e-tests 3/6] storage-plugin: use random_vmid function for getting VMIDs Date: Thu, 17 Sep 2026 18:23:21 +0200 Message-ID: <20260917162324.1926056-4-m.koeppl@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260917162324.1926056-1-m.koeppl@proxmox.com> References: <20260917162324.1926056-1-m.koeppl@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1789662222575 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.595 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 4V2MHKFJHHM66ZYHJ3DCLA5PEOP2IQGW X-Message-ID-Hash: 4V2MHKFJHHM66ZYHJ3DCLA5PEOP2IQGW X-MailFrom: m.koeppl@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Michael Köppl --- Proxmox/Test/StorageGuest.pm | 4 ++-- storage-plugin-tests/tests/backup_ct.pl | 4 ++-- storage-plugin-tests/tests/backup_restore.pl | 4 ++-- storage-plugin-tests/tests/backup_running.pl | 4 ++-- storage-plugin-tests/tests/backup_vm.pl | 4 ++-- storage-plugin-tests/tests/cluster_migration.pl | 4 ++-- storage-plugin-tests/tests/ct_create.pl | 4 ++-- storage-plugin-tests/tests/disk_clone.pl | 6 +++--- storage-plugin-tests/tests/disk_migration.pl | 4 ++-- storage-plugin-tests/tests/disk_purge.pl | 4 ++-- storage-plugin-tests/tests/disk_resize.pl | 4 ++-- storage-plugin-tests/tests/disk_snapshot.pl | 6 +++--- storage-plugin-tests/tests/disk_thin_discard.pl | 4 ++-- storage-plugin-tests/tests/io_integrity.pl | 4 ++-- storage-plugin-tests/tests/snapshot_volume_chain.pl | 4 ++-- storage-plugin-tests/tests/template_linked_clone.pl | 6 +++--- storage-plugin-tests/tests/vm_additional_disk_vtpm.pl | 4 ++-- storage-plugin-tests/tests/vm_create_default.pl | 4 ++-- storage-plugin-tests/tests/vm_destroy_with_snapshots.pl | 4 ++-- storage-plugin-tests/tests/vm_disk_buses.pl | 4 ++-- 20 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Proxmox/Test/StorageGuest.pm b/Proxmox/Test/StorageGuest.pm index 055fd8b..d04bf67 100644 --- a/Proxmox/Test/StorageGuest.pm +++ b/Proxmox/Test/StorageGuest.pm @@ -4,7 +4,7 @@ use warnings FATAL => 'all'; use Test::More (); -use Proxmox::Test::Util qw(skip_prerequisite); +use Proxmox::Test::Util qw(random_vmid skip_prerequisite); use parent 'Exporter'; our @EXPORT_OK = qw( @@ -106,7 +106,7 @@ sub boot_storage_guest { my $client = $pve->client(); my $image = prepared_guest_image(); - my $vmid = $client->get('/cluster/nextid'); + my $vmid = random_vmid($client); my $config = { vmid => $vmid, name => $opts{name} // 'storage-plugin-guest', diff --git a/storage-plugin-tests/tests/backup_ct.pl b/storage-plugin-tests/tests/backup_ct.pl index adc3ec5..b8b4316 100755 --- a/storage-plugin-tests/tests/backup_ct.pl +++ b/storage-plugin-tests/tests/backup_ct.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_prerequisite guest_name backup_target); +use Proxmox::Test::Util qw(random_vmid skip_prerequisite guest_name backup_target); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -76,7 +76,7 @@ if (!$template) { skip_prerequisite("No CT template available; cannot test CT backup on '$storage_id'"); } -my $vmid = $pve->client()->get("/cluster/nextid"); +my $vmid = random_vmid($pve->client()); my $upid = eval { $pve->client()->post( "/nodes/$node/lxc", diff --git a/storage-plugin-tests/tests/backup_restore.pl b/storage-plugin-tests/tests/backup_restore.pl index 4a7110e..1d135c3 100755 --- a/storage-plugin-tests/tests/backup_restore.pl +++ b/storage-plugin-tests/tests/backup_restore.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_prerequisite guest_name backup_target); +use Proxmox::Test::Util qw(random_vmid skip_prerequisite guest_name backup_target); use Proxmox::Test::StorageGuest qw(boot_storage_guest guest_write_marker guest_read_marker); # Verifies a backup restores with data intact: a guest writes a marker, is backed up live, @@ -55,7 +55,7 @@ eval { # Destroy the original first, so the restored marker can only come from the archive. ok($pve->destroy_guest(qemu => $vmid), 'original guest destroyed'); - $restored = $client->get('/cluster/nextid'); + $restored = random_vmid($client); my $restore = $client->post( "/nodes/$node/qemu", { vmid => $restored, archive => $archive, storage => $storage_id }, diff --git a/storage-plugin-tests/tests/backup_running.pl b/storage-plugin-tests/tests/backup_running.pl index d5a3cab..e8bdce9 100755 --- a/storage-plugin-tests/tests/backup_running.pl +++ b/storage-plugin-tests/tests/backup_running.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_prerequisite guest_name backup_target); +use Proxmox::Test::Util qw(random_vmid skip_prerequisite guest_name backup_target); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -29,7 +29,7 @@ if (!$content{images}) { my $backup_target = backup_target($pve, $storage_id, \%content); diag("Backup target: '$backup_target' (source disk on '$storage_id')"); -my $vmid = $pve->client()->get("/cluster/nextid"); +my $vmid = random_vmid($pve->client()); my $upid = eval { $pve->client()->post( "/nodes/$node/qemu", diff --git a/storage-plugin-tests/tests/backup_vm.pl b/storage-plugin-tests/tests/backup_vm.pl index 808ad12..8b67178 100755 --- a/storage-plugin-tests/tests/backup_vm.pl +++ b/storage-plugin-tests/tests/backup_vm.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_prerequisite guest_name backup_target); +use Proxmox::Test::Util qw(random_vmid skip_prerequisite guest_name backup_target); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -30,7 +30,7 @@ my $backup_target = backup_target($pve, $storage_id, \%content); diag("Backup target: '$backup_target' (source disk on '$storage_id')"); # Create VM on the plugin storage to back up -my $vmid = $pve->client()->get("/cluster/nextid"); +my $vmid = random_vmid($pve->client()); my $upid = eval { $pve->client()->post( "/nodes/$node/qemu", diff --git a/storage-plugin-tests/tests/cluster_migration.pl b/storage-plugin-tests/tests/cluster_migration.pl index b62e396..9c4d80d 100755 --- a/storage-plugin-tests/tests/cluster_migration.pl +++ b/storage-plugin-tests/tests/cluster_migration.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); use Proxmox::Test::StorageValidation::Util qw(resolve_migration_target_node); # Verifies that a VM whose disk is on the storage under test can be migrated to another cluster node @@ -31,7 +31,7 @@ my $shared = $scfg->{shared} ? 1 : 0; my ($target, $auto_selected) = resolve_migration_target_node($pve); -my $vmid = $client->get('/cluster/nextid'); +my $vmid = random_vmid($client); my $upid = $client->post( "/nodes/$node/qemu", { diff --git a/storage-plugin-tests/tests/ct_create.pl b/storage-plugin-tests/tests/ct_create.pl index ba10f28..7177787 100755 --- a/storage-plugin-tests/tests/ct_create.pl +++ b/storage-plugin-tests/tests/ct_create.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -70,7 +70,7 @@ if (!$template) { skip_prerequisite("No CT template available; cannot test CT on '$storage_id'"); } -my $vmid = $pve->client()->get("/cluster/nextid"); +my $vmid = random_vmid($pve->client()); my $upid = eval { $pve->client()->post( diff --git a/storage-plugin-tests/tests/disk_clone.pl b/storage-plugin-tests/tests/disk_clone.pl index 7b0772e..2dd76f4 100755 --- a/storage-plugin-tests/tests/disk_clone.pl +++ b/storage-plugin-tests/tests/disk_clone.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -25,7 +25,7 @@ if (!$content{images}) { skip_prerequisite("Storage '$storage_id' does not support content type 'images'"); } -my $vmid = $pve->client()->get("/cluster/nextid"); +my $vmid = random_vmid($pve->client()); my $upid = eval { $pve->client()->post( @@ -49,7 +49,7 @@ ok(defined($upid), "source VM creation task started") or do { $pve->task_ok($upid, "source VM created"); # Try a full clone onto the same storage. -my $clone_vmid = $pve->client()->get("/cluster/nextid"); +my $clone_vmid = random_vmid($pve->client()); my $clone_upid = eval { $pve->client()->post( "/nodes/$node/qemu/$vmid/clone", diff --git a/storage-plugin-tests/tests/disk_migration.pl b/storage-plugin-tests/tests/disk_migration.pl index 8e5a869..7f251a4 100755 --- a/storage-plugin-tests/tests/disk_migration.pl +++ b/storage-plugin-tests/tests/disk_migration.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); # Verifies that a VM disk can be moved off the storage and back onto it, both offline and while the # VM is running. This exercises the volume export/import path the plugin must implement for storage @@ -39,7 +39,7 @@ skip_prerequisite("no second images storage available as a migration target;" . " pass --migration-target-storage") if !$target; -my $vmid = $client->get('/cluster/nextid'); +my $vmid = random_vmid($client); my $upid = $client->post( "/nodes/$node/qemu", { diff --git a/storage-plugin-tests/tests/disk_purge.pl b/storage-plugin-tests/tests/disk_purge.pl index a6148e6..b10c329 100755 --- a/storage-plugin-tests/tests/disk_purge.pl +++ b/storage-plugin-tests/tests/disk_purge.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -25,7 +25,7 @@ if (!$content{images}) { skip_prerequisite("Storage '$storage_id' does not support content type 'images'"); } -my $vmid = $pve->client()->get("/cluster/nextid"); +my $vmid = random_vmid($pve->client()); my $upid = eval { $pve->client()->post( diff --git a/storage-plugin-tests/tests/disk_resize.pl b/storage-plugin-tests/tests/disk_resize.pl index 0238942..95ac9a3 100755 --- a/storage-plugin-tests/tests/disk_resize.pl +++ b/storage-plugin-tests/tests/disk_resize.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); # Verifies that a disk on the storage can be grown, both while the VM is stopped and while it is # running. A storage that cannot resize raises on the resize call; that is reported as unsupported. @@ -25,7 +25,7 @@ my %content = map { $_ => 1 } split /,/, ($scfg->{content} // ''); skip_prerequisite("storage '$storage_id' does not support content type 'images'") if !$content{images}; -my $vmid = $client->get('/cluster/nextid'); +my $vmid = random_vmid($client); my $upid = $client->post( "/nodes/$node/qemu", { diff --git a/storage-plugin-tests/tests/disk_snapshot.pl b/storage-plugin-tests/tests/disk_snapshot.pl index 8191069..14c027a 100755 --- a/storage-plugin-tests/tests/disk_snapshot.pl +++ b/storage-plugin-tests/tests/disk_snapshot.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -25,7 +25,7 @@ if (!$content{images}) { skip_prerequisite("Storage '$storage_id' does not support content type 'images'"); } -my $vmid = $pve->client()->get("/cluster/nextid"); +my $vmid = random_vmid($pve->client()); my $upid = eval { $pve->client()->post( @@ -193,7 +193,7 @@ ok($names{snap1} && $names{snap2}, "snap1 and snap2 still present after rollback # Clone from snapshot. Try linked clone first. Some plugins only support full clones from # snapshots, in that case retry with full => 1. -my $clone_vmid = $pve->client()->get("/cluster/nextid"); +my $clone_vmid = random_vmid($pve->client()); my $clone = sub { my (%extra) = @_; return $pve->client()->post( diff --git a/storage-plugin-tests/tests/disk_thin_discard.pl b/storage-plugin-tests/tests/disk_thin_discard.pl index ce9f7e6..6aa9bf2 100755 --- a/storage-plugin-tests/tests/disk_thin_discard.pl +++ b/storage-plugin-tests/tests/disk_thin_discard.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -28,7 +28,7 @@ if (!$content{images}) { # Allocate a 4 GiB volume and check the storage's 'used' barely grows: a thin/sparse plugin must # not commit the full size up front. A plugin that preallocates is reported as unsupported. my $client = $pve->client(); -my $vmid = $client->get("/cluster/nextid"); +my $vmid = random_vmid($client); my $used_before = $client->get("/nodes/$node/storage/$storage_id/status", {})->{used} // 0; diff --git a/storage-plugin-tests/tests/io_integrity.pl b/storage-plugin-tests/tests/io_integrity.pl index 9eb5538..2548616 100755 --- a/storage-plugin-tests/tests/io_integrity.pl +++ b/storage-plugin-tests/tests/io_integrity.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite); # Verifies that data written to a volume is actually persisted and read back unchanged. Operates on # the volume's host path, so it only applies to path-backed storages; storages without a usable @@ -25,7 +25,7 @@ my %content = map { $_ => 1 } split /,/, ($scfg->{content} // ''); skip_prerequisite("storage '$storage_id' does not support content type 'images'") if !$content{images}; -my $vmid = $client->get('/cluster/nextid'); +my $vmid = random_vmid($client); my $volid = $client->post( "/nodes/$node/storage/$storage_id/content", { vmid => $vmid, filename => "vm-$vmid-disk-0.raw", size => '64M', format => 'raw' }, diff --git a/storage-plugin-tests/tests/snapshot_volume_chain.pl b/storage-plugin-tests/tests/snapshot_volume_chain.pl index 8074be7..8212d89 100755 --- a/storage-plugin-tests/tests/snapshot_volume_chain.pl +++ b/storage-plugin-tests/tests/snapshot_volume_chain.pl @@ -7,7 +7,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); # Verifies storage-vendor-agnostic snapshots via qcow2 backing chains, which a storage opts into # with the 'snapshot-as-volume-chain' option. Only meaningful when that option is enabled on the @@ -28,7 +28,7 @@ skip_prerequisite("storage '$storage_id' does not support content type 'images'" skip_prerequisite("storage '$storage_id' does not have 'snapshot-as-volume-chain' enabled") if !$scfg->{'snapshot-as-volume-chain'}; -my $vmid = $client->get('/cluster/nextid'); +my $vmid = random_vmid($client); my $upid = $client->post( "/nodes/$node/qemu", { diff --git a/storage-plugin-tests/tests/template_linked_clone.pl b/storage-plugin-tests/tests/template_linked_clone.pl index 5ca43ec..84ac2c1 100755 --- a/storage-plugin-tests/tests/template_linked_clone.pl +++ b/storage-plugin-tests/tests/template_linked_clone.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); # Verifies that a VM can be turned into a template (create_base) and then linked-cloned from it, so # the clone shares the base image rather than getting a full copy. A storage that cannot provide a @@ -25,7 +25,7 @@ my %content = map { $_ => 1 } split /,/, ($scfg->{content} // ''); skip_prerequisite("storage '$storage_id' does not support content type 'images'") if !$content{images}; -my $vmid = $client->get('/cluster/nextid'); +my $vmid = random_vmid($client); my $clone_vmid; my $upid = $client->post( "/nodes/$node/qemu", @@ -65,7 +65,7 @@ eval { # Linked clone (full => 0): must reference the base, not copy it. PVE rejects this on the call # itself when the storage lacks the clone feature, so a raise here is a capability gap too. - $clone_vmid = $client->get('/cluster/nextid'); + $clone_vmid = random_vmid($client); my $cloned = eval { $pve->wait_for_task( $client->post( diff --git a/storage-plugin-tests/tests/vm_additional_disk_vtpm.pl b/storage-plugin-tests/tests/vm_additional_disk_vtpm.pl index 2e00cd4..76dc163 100755 --- a/storage-plugin-tests/tests/vm_additional_disk_vtpm.pl +++ b/storage-plugin-tests/tests/vm_additional_disk_vtpm.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -25,7 +25,7 @@ if (!$content{images}) { skip_prerequisite("Storage '$storage_id' does not support content type 'images'"); } -my $vmid = $pve->client()->get("/cluster/nextid"); +my $vmid = random_vmid($pve->client()); my $upid = eval { $pve->client()->post( diff --git a/storage-plugin-tests/tests/vm_create_default.pl b/storage-plugin-tests/tests/vm_create_default.pl index 478dad7..7f033f0 100755 --- a/storage-plugin-tests/tests/vm_create_default.pl +++ b/storage-plugin-tests/tests/vm_create_default.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -25,7 +25,7 @@ if (!$content{images}) { skip_prerequisite("Storage '$storage_id' does not support content type 'images'"); } -my $vmid = $pve->client()->get("/cluster/nextid"); +my $vmid = random_vmid($pve->client()); my $upid = eval { $pve->client()->post( diff --git a/storage-plugin-tests/tests/vm_destroy_with_snapshots.pl b/storage-plugin-tests/tests/vm_destroy_with_snapshots.pl index 0e18bb7..87cb7a8 100755 --- a/storage-plugin-tests/tests/vm_destroy_with_snapshots.pl +++ b/storage-plugin-tests/tests/vm_destroy_with_snapshots.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name poll_until); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name poll_until); # Verifies that a VM can be destroyed while snapshots still exist, without deleting them one by one # first. @@ -30,7 +30,7 @@ if (!$content{images}) { skip_prerequisite("Storage '$storage_id' does not support content type 'images'"); } -my $vmid = $client->get('/cluster/nextid'); +my $vmid = random_vmid($client); my $upid = eval { $client->post( diff --git a/storage-plugin-tests/tests/vm_disk_buses.pl b/storage-plugin-tests/tests/vm_disk_buses.pl index a8816fc..e3c0953 100755 --- a/storage-plugin-tests/tests/vm_disk_buses.pl +++ b/storage-plugin-tests/tests/vm_disk_buses.pl @@ -6,7 +6,7 @@ use Test::More; use lib '..'; use Proxmox::Test::PVEInstance; -use Proxmox::Test::Util qw(skip_unsupported skip_prerequisite guest_name); +use Proxmox::Test::Util qw(random_vmid skip_unsupported skip_prerequisite guest_name); my $storage_id = $ENV{PLUGIN_STORAGE_ID}; if (!$storage_id) { @@ -35,7 +35,7 @@ my @buses = ( for my $bus (@buses) { subtest "disk bus: $bus->{label}" => sub { - my $vmid = $pve->client()->get("/cluster/nextid"); + my $vmid = random_vmid($pve->client()); my %params = ( vmid => $vmid, -- 2.47.3