[pve-devel] [Feature request]also remove unused disk can Chang to optional?

lyt_yudi lyt_yudi at icloud.com
Thu Mar 10 10:21:54 CET 2016


hi,

this feature can change to optional ?

if will be destroy a vm with the unused disk, with optional to remove too.

conditions of use:
If change the system vdisk, but need to keep the data vdisk.

so...

/PVE/QemuServer.pm 
…...
    # also remove unused disk
    eval {
        my $dl = PVE::Storage::vdisk_list($storecfg, undef, $vmid);

        eval {
            PVE::Storage::foreach_volid($dl, sub {
                my ($volid, $sid, $volname, $d) = @_;
                PVE::Storage::vdisk_free($storecfg, $volid);
            });
        };
        warn $@ if $@;

    };
    warn $@ if $@;
……

thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20160310/50510331/attachment.htm>


More information about the pve-devel mailing list