]> git.proxmox.com Git - qemu-server.git/commitdiff
bug fix: allow to set devices directly (-ide1 /dev/XYZ)
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 27 Jul 2012 09:59:42 +0000 (11:59 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 27 Jul 2012 09:59:42 +0000 (11:59 +0200)
Makefile
PVE/API2/Qemu.pm
changelog.Debian

index c1f52cf706411a3ed5d55568733c4ef79ebd9009..69dcb763e31e9449919639ccbe2ddab445f069d6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ RELEASE=2.1
 
 VERSION=2.0
 PACKAGE=qemu-server
-PKGREL=45
+PKGREL=46
 
 DESTDIR=
 PREFIX=/usr
index dccfbcc00ece08e77bc12bf5223af181d7f18a70..a1d4ed25365c1d55927ffe77ceb6319a3c260e38 100644 (file)
@@ -85,21 +85,25 @@ my $create_disks = sub {
            delete $disk->{format}; # no longer needed
            $res->{$ds} = PVE::QemuServer::print_drive($vmid, $disk);
        } else {
+
            my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid);
-           PVE::Storage::activate_volumes($storecfg, [ $volid ])
-               if PVE::Storage::parse_volume_id ($volid, 1);
+           
+           my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
 
-           my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid);
-           my $dl = PVE::Storage::vdisk_list($storecfg, $storeid, undef);
            my $foundvolid = undef;
 
-           PVE::Storage::foreach_volid($dl, sub {
-               my ($volumeid) = @_;
-               if($volumeid eq $volid) {
-                   $foundvolid = 1;
-                   return;
-               }
-           });
+           if ($storeid) {
+               PVE::Storage::activate_volumes($storecfg, [ $volid ]);
+               my $dl = PVE::Storage::vdisk_list($storecfg, $storeid, undef);
+
+               PVE::Storage::foreach_volid($dl, sub {
+                   my ($volumeid) = @_;
+                   if($volumeid eq $volid) {
+                       $foundvolid = 1;
+                       return;
+                   }
+               });
+           }
        
            die "image '$path' does not exists\n" if (!(-f $path || -b $path || $foundvolid));
            $res->{$ds} = $settings->{$ds};
index 1e9895a765de20ece6806027cf4bfd29261dd5e6..ce6130e9d1a449541c0bbec6eef0050861ce1b24 100644 (file)
@@ -1,3 +1,9 @@
+qemu-server (2.0-46) unstable; urgency=low
+
+  * bug fix: allow to set devices directly (-ide1 /dev/XYZ)
+
+ -- Proxmox Support Team <support@proxmox.com>  Fri, 27 Jul 2012 11:59:14 +0200
+
 qemu-server (2.0-45) unstable; urgency=low
 
   * migrate: only scan available storages