]> git.proxmox.com Git - qemu-server.git/commitdiff
Also test is cdrom is on shared storage
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 12 Sep 2011 09:39:48 +0000 (11:39 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 12 Sep 2011 09:39:48 +0000 (11:39 +0200)
Else we can't migrate.

qmigrate

index 58bbe05c65135dfca90fcbed0f262aa5141edda8..d072c88d464e60a236dfe4cfbaf7f8565cfff85d 100755 (executable)
--- a/qmigrate
+++ b/qmigrate
@@ -305,13 +305,16 @@ sub sync_disks {
        PVE::QemuServer::foreach_drive($conf, sub {
            my ($ds, $drive) = @_;
 
-           return if PVE::QemuServer::drive_is_cdrom($drive);
-
            my $volid = $drive->{file};
-
            return if !$volid;
+
            die "cant migrate local file/device '$volid'\n" if $volid =~ m|^/|;
 
+           if (PVE::QemuServer::drive_is_cdrom($drive)) {
+               die "cant migrate local cdrom drive\n" if $volid eq 'cdrom';
+               return if $volid eq 'none';
+           }
+
            my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
            
            my $scfg =  PVE::Storage::storage_config($storecfg, $sid);