mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-04 20:48:29 +00:00
improve error message whern cdrom is on local storage
This commit is contained in:
parent
9b20b0601a
commit
86b8fbeeee
4
qmigrate
4
qmigrate
@ -286,6 +286,7 @@ sub sync_disks {
|
|||||||
eval {
|
eval {
|
||||||
|
|
||||||
my $volhash = {};
|
my $volhash = {};
|
||||||
|
my $cdromhash = {};
|
||||||
|
|
||||||
# get list from PVE::Storage (for unused volumes)
|
# get list from PVE::Storage (for unused volumes)
|
||||||
my $dl = PVE::Storage::vdisk_list($storecfg, undef, $vmid);
|
my $dl = PVE::Storage::vdisk_list($storecfg, undef, $vmid);
|
||||||
@ -313,6 +314,7 @@ sub sync_disks {
|
|||||||
if (PVE::QemuServer::drive_is_cdrom($drive)) {
|
if (PVE::QemuServer::drive_is_cdrom($drive)) {
|
||||||
die "cant migrate local cdrom drive\n" if $volid eq 'cdrom';
|
die "cant migrate local cdrom drive\n" if $volid eq 'cdrom';
|
||||||
return if $volid eq 'none';
|
return if $volid eq 'none';
|
||||||
|
$cdromhash->{$volid} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
|
my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
|
||||||
@ -321,6 +323,8 @@ sub sync_disks {
|
|||||||
|
|
||||||
return if $scfg->{shared};
|
return if $scfg->{shared};
|
||||||
|
|
||||||
|
die "can't migrate local cdrom '$volid'\n" if $cdromhash->{$volid};
|
||||||
|
|
||||||
$sharedvm = 0;
|
$sharedvm = 0;
|
||||||
|
|
||||||
my ($path, $owner) = PVE::Storage::path($storecfg, $volid);
|
my ($path, $owner) = PVE::Storage::path($storecfg, $volid);
|
||||||
|
Loading…
Reference in New Issue
Block a user