bug fix: allow to set devices directly (-ide1 /dev/XYZ)

This commit is contained in:
Dietmar Maurer 2012-07-27 11:59:42 +02:00
parent 2a7993d9ef
commit eabe0da02d
3 changed files with 23 additions and 13 deletions

View File

@ -2,7 +2,7 @@ RELEASE=2.1
VERSION=2.0 VERSION=2.0
PACKAGE=qemu-server PACKAGE=qemu-server
PKGREL=45 PKGREL=46
DESTDIR= DESTDIR=
PREFIX=/usr PREFIX=/usr

View File

@ -85,21 +85,25 @@ my $create_disks = sub {
delete $disk->{format}; # no longer needed delete $disk->{format}; # no longer needed
$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);
PVE::Storage::activate_volumes($storecfg, [ $volid ])
if PVE::Storage::parse_volume_id ($volid, 1);
my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid); my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid);
my $dl = PVE::Storage::vdisk_list($storecfg, $storeid, undef);
my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
my $foundvolid = undef; my $foundvolid = undef;
PVE::Storage::foreach_volid($dl, sub { if ($storeid) {
my ($volumeid) = @_; PVE::Storage::activate_volumes($storecfg, [ $volid ]);
if($volumeid eq $volid) { my $dl = PVE::Storage::vdisk_list($storecfg, $storeid, undef);
$foundvolid = 1;
return; 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)); die "image '$path' does not exists\n" if (!(-f $path || -b $path || $foundvolid));
$res->{$ds} = $settings->{$ds}; $res->{$ds} = $settings->{$ds};

View 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 qemu-server (2.0-45) unstable; urgency=low
* migrate: only scan available storages * migrate: only scan available storages