]> git.proxmox.com Git - qemu-server.git/commitdiff
fix check for non-shared disks
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 25 Sep 2012 05:26:34 +0000 (07:26 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 25 Sep 2012 05:26:34 +0000 (07:26 +0200)
PVE/QemuMigrate.pm

index c6302b05b10b2cd9ecfd05cb652c0f169948abc9..764e5b19d0abf2c2bafb8194b9fdc1bfa87e5ac7 100644 (file)
@@ -178,6 +178,8 @@ sub sync_disks {
        my $volhash = {};
        my $cdromhash = {};
 
+       my $sharedvm = 1;
+
        my @sids = PVE::Storage::storage_ids($self->{storecfg});
         foreach my $storeid (@sids) {
            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});
 
                 $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)
 
-       my $sharedvm = 1;
        PVE::QemuServer::foreach_drive($conf, sub {
            my ($ds, $drive) = @_;