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