]> git.proxmox.com Git - qemu-server.git/commitdiff
get_replicatable_volumes: fix CDROM and local file/device handling
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 14 Jun 2017 05:01:36 +0000 (07:01 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 14 Jun 2017 05:01:36 +0000 (07:01 +0200)
PVE/QemuConfig.pm

index 2c82b2b5ab7c92457703ff37a74a7524d64a460b..d2828876387444f9a57dce2560f31a8b9f98ab51 100644 (file)
@@ -71,6 +71,13 @@ sub get_replicatable_volumes {
     my $test_volid = sub {
        my ($volid, $attr) = @_;
 
+       if ($volid =~ m|^/|) {
+           return if !$attr->{replicate};
+           die "unable to replicate local file/device '$volid'\n";
+       }
+
+       return if $attr->{cdrom};
+
        my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, $noerr);
        return if !$storeid;
 
@@ -80,8 +87,6 @@ sub get_replicatable_volumes {
        my ($path, $owner, $vtype) = PVE::Storage::path($storecfg, $volid);
        return if !$owner || ($owner != $vmid);
 
-       return if $attr->{cdrom};
-
        die "unable to replicate volume '$volid', type '$vtype'\n" if $vtype ne 'images';
 
        return if !$cleanup && !$attr->{replicate};