[pve-devel] removed ISO files block migration

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Thu Aug 20 10:41:37 CEST 2015


I'm currently struggling.

There is sync_disks method in QemuMigrate.pm which might be good for
this. But the code is failing before in sub prepare calling
PVE::Storage::activate_volumes($self->{storecfg}, $vollist);

sub activate_volume {
    my ($class, $storeid, $scfg, $volname, $exclusive, $cache) = @_;

    my $path = $class->filesystem_path($scfg, $volname);

    # check is volume exists
    if ($scfg->{path}) {
        die "volume '$storeid:$volname' does not exist\n" if ! -e $path;

So where to implement this?

Another method in prepare before calling activate_volume to cleanup the
config?

Another approach would be to skip cdroms in those checks completely and
set a cdrom in vm_start to none if the iso does not exist.

Stefan
Am 20.08.2015 um 10:33 schrieb Alexandre DERUMIER:
>>> I think we should eject it automatically instead of do not start the 
>>> machine!
> 
> +1 for this.
> Simply do an eject before migration, if the iso is local
> 
> 
> ----- Mail original -----
> De: "Wolfgang Link" <w.link at proxmox.com>
> À: "Stefan Priebe" <s.priebe at profihost.ag>, "pve-devel" <pve-devel at pve.proxmox.com>
> Envoyé: Jeudi 20 Août 2015 09:52:34
> Objet: Re: [pve-devel] removed ISO files block migration
> 
> I think we should eject it automatically instead of do not start the 
> machine! 
> 
> This could be done easily if we check this on start. 
> 
> On 08/20/2015 09:39 AM, Stefan Priebe - Profihost AG wrote: 
>> Hi, 
>>
>> i've no real idea how to solve this. 
>>
>> Currently the following happens pretty easily. 
>>
>> You insert a cd iso image into your VM CD ROM. May be driver disk for 
>> windows virtio-X. 
>>
>> Than some month later somebody updates this one from virtio-X to 
>> virtio-Y and deletes the old iso files. 
>>
>> From now on every attempt to migrate this VM fails with: 
>> volume 'cdisoimages:iso/virtio-win-0.1-100.iso' does not exist 
>>
>> It would be great if we can handle this. 
>>
>> Stefan 
>> _______________________________________________ 
>> pve-devel mailing list 
>> pve-devel at pve.proxmox.com 
>> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 
>>
> 
> 
> _______________________________________________ 
> pve-devel mailing list 
> pve-devel at pve.proxmox.com 
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 
> 



More information about the pve-devel mailing list