mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-04 00:24:08 +00:00
fix bug #134: allow to pass file names to qmrestore and 'qm set'
This commit is contained in:
parent
47152e2ee3
commit
d7810bc123
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ RELEASE=2.0
|
|||||||
|
|
||||||
VERSION=2.0
|
VERSION=2.0
|
||||||
PACKAGE=qemu-server
|
PACKAGE=qemu-server
|
||||||
PKGREL=34
|
PKGREL=35
|
||||||
|
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
@ -86,7 +86,8 @@ my $create_disks = sub {
|
|||||||
$res->{$ds} = PVE::QemuServer::print_drive($vmid, $disk);
|
$res->{$ds} = PVE::QemuServer::print_drive($vmid, $disk);
|
||||||
} else {
|
} else {
|
||||||
my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid);
|
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));
|
die "image '$path' does not exists\n" if (!(-f $path || -b $path));
|
||||||
$res->{$ds} = $settings->{$ds};
|
$res->{$ds} = $settings->{$ds};
|
||||||
}
|
}
|
||||||
@ -298,10 +299,13 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
if ($archive eq '-') {
|
if ($archive eq '-') {
|
||||||
die "pipe requires cli environment\n"
|
die "pipe requires cli environment\n"
|
||||||
&& $rpcenv->{type} ne 'cli';
|
if $rpcenv->{type} ne 'cli';
|
||||||
} else {
|
} else {
|
||||||
my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $archive);
|
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);
|
die "can't find archive file '$archive'\n" if !($path && -f $path);
|
||||||
$archive = $path;
|
$archive = $path;
|
||||||
}
|
}
|
||||||
|
@ -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
|
qemu-server (2.0-34) unstable; urgency=low
|
||||||
|
|
||||||
* fix bug #12: check storage availability early (migrate)
|
* fix bug #12: check storage availability early (migrate)
|
||||||
|
Loading…
Reference in New Issue
Block a user