mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-02-08 05:57:40 +03:00
fix bug #121: activate volumes correctly
This commit is contained in:
parent
036e0e2b4b
commit
8b192abf57
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ RELEASE=2.0
|
|||||||
|
|
||||||
VERSION=2.0
|
VERSION=2.0
|
||||||
PACKAGE=qemu-server
|
PACKAGE=qemu-server
|
||||||
PKGREL=32
|
PKGREL=33
|
||||||
|
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
@ -53,8 +53,7 @@ my $check_storage_access = sub {
|
|||||||
die "no storage ID specified (and no default storage)\n" if !$storeid;
|
die "no storage ID specified (and no default storage)\n" if !$storeid;
|
||||||
$rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']);
|
$rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']);
|
||||||
} else {
|
} else {
|
||||||
my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid);
|
$rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid);
|
||||||
die "image '$path' does not exists\n" if (!(-f $path || -b $path));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -87,6 +86,7 @@ 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 ]);
|
||||||
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};
|
||||||
}
|
}
|
||||||
@ -301,6 +301,7 @@ __PACKAGE__->register_method({
|
|||||||
&& $rpcenv->{type} ne 'cli';
|
&& $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 ]);
|
||||||
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-33) unstable; urgency=low
|
||||||
|
|
||||||
|
* fix bug #121: activate volumes correctly
|
||||||
|
|
||||||
|
-- Proxmox Support Team <support@proxmox.com> Thu, 29 Mar 2012 11:09:36 +0200
|
||||||
|
|
||||||
qemu-server (2.0-32) unstable; urgency=low
|
qemu-server (2.0-32) unstable; urgency=low
|
||||||
|
|
||||||
* fix usb host syntax (correctly pass hexadecimal numbers with prefix
|
* fix usb host syntax (correctly pass hexadecimal numbers with prefix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user