fix bug #134: allow to pass file names to qmrestore and 'qm set'

This commit is contained in:
Dietmar Maurer 2012-04-02 10:52:05 +02:00
parent 47152e2ee3
commit d7810bc123
3 changed files with 14 additions and 4 deletions

View File

@ -2,7 +2,7 @@ RELEASE=2.0
VERSION=2.0
PACKAGE=qemu-server
PKGREL=34
PKGREL=35
DESTDIR=
PREFIX=/usr

View File

@ -86,7 +86,8 @@ my $create_disks = sub {
$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 ]);
PVE::Storage::activate_volumes($storecfg, [ $volid ])
if PVE::Storage::parse_volume_id ($volid, 1);
die "image '$path' does not exists\n" if (!(-f $path || -b $path));
$res->{$ds} = $settings->{$ds};
}
@ -298,10 +299,13 @@ __PACKAGE__->register_method({
if ($archive eq '-') {
die "pipe requires cli environment\n"
&& $rpcenv->{type} ne 'cli';
if $rpcenv->{type} ne 'cli';
} else {
my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $archive);
PVE::Storage::activate_volumes($storecfg, [ $archive ]);
PVE::Storage::activate_volumes($storecfg, [ $archive ])
if PVE::Storage::parse_volume_id ($archive, 1);
die "can't find archive file '$archive'\n" if !($path && -f $path);
$archive = $path;
}

View File

@ -1,3 +1,9 @@
qemu-server (2.0-35) unstable; urgency=low
* fix bug #134: allow to pass file names to qmrestore and 'qm set'
-- Proxmox Support Team <support@proxmox.com> Mon, 02 Apr 2012 10:51:41 +0200
qemu-server (2.0-34) unstable; urgency=low
* fix bug #12: check storage availability early (migrate)