<html><head><meta http-equiv="Content-Type" content="text/html charset=gb2312"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">hi,</div><div class=""><br class=""></div><div class="">this feature can change to optional ?</div><div class=""><br class=""></div><div class="">if will be destroy a vm with the unused disk, with optional to remove too.</div><div class=""><br class=""></div><div class="">conditions of use:</div><div class=""><div class="ordinary-wrap output-mod"><div style="padding-bottom: 0px;" class="output-bd" dir="ltr"><p class="ordinary-output target-output"><span tabcount="-1" class="ordinary-span-edit" left-pos="0|40" right-pos="0|40" space="">If change the system vdisk, but need to keep the data vdisk.</span></p><div class="">so...</div></div></div></div><div class=""><br class=""></div><div class="">/PVE/QemuServer.pm </div><div class="">¡...</div><div class=""><div class=""> # also remove unused disk</div><div class=""> eval {</div><div class=""> my $dl = PVE::Storage::vdisk_list($storecfg, undef, $vmid);</div><div class=""><br class=""></div><div class=""> eval {</div><div class=""> PVE::Storage::foreach_volid($dl, sub {</div><div class=""> my ($volid, $sid, $volname, $d) = @_;</div><div class=""> PVE::Storage::vdisk_free($storecfg, $volid);</div><div class=""> });</div><div class=""> };</div><div class=""> warn $@ if $@;</div><div class=""><br class=""></div><div class=""> };</div><div class=""> warn $@ if $@;</div></div><div class="">¡¡</div><div class=""><br class=""></div><div class="">thanks.</div></body></html>