mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-14 15:56:50 +00:00
fix check for non-shared disks
This commit is contained in:
parent
d18723f982
commit
a06c7f7ec4
@ -178,6 +178,8 @@ sub sync_disks {
|
|||||||
my $volhash = {};
|
my $volhash = {};
|
||||||
my $cdromhash = {};
|
my $cdromhash = {};
|
||||||
|
|
||||||
|
my $sharedvm = 1;
|
||||||
|
|
||||||
my @sids = PVE::Storage::storage_ids($self->{storecfg});
|
my @sids = PVE::Storage::storage_ids($self->{storecfg});
|
||||||
foreach my $storeid (@sids) {
|
foreach my $storeid (@sids) {
|
||||||
my $scfg = PVE::Storage::storage_config($self->{storecfg}, $storeid);
|
my $scfg = PVE::Storage::storage_config($self->{storecfg}, $storeid);
|
||||||
@ -193,12 +195,12 @@ sub sync_disks {
|
|||||||
PVE::Storage::storage_check_node($self->{storecfg}, $sid, $self->{node});
|
PVE::Storage::storage_check_node($self->{storecfg}, $sid, $self->{node});
|
||||||
|
|
||||||
$volhash->{$volid} = 1;
|
$volhash->{$volid} = 1;
|
||||||
|
$sharedvm = 0; # there is a non-shared disk
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
# and add used,owned/non-shared disks (just to be sure we have all)
|
# and add used,owned/non-shared disks (just to be sure we have all)
|
||||||
|
|
||||||
my $sharedvm = 1;
|
|
||||||
PVE::QemuServer::foreach_drive($conf, sub {
|
PVE::QemuServer::foreach_drive($conf, sub {
|
||||||
my ($ds, $drive) = @_;
|
my ($ds, $drive) = @_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user