mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
fix for custom path
This commit is contained in:
parent
07bcb8f5ee
commit
c551196411
@ -44,7 +44,16 @@ module VagrantPlugins
|
||||
libvirt_disk = env[:libvirt_compute].volumes.all.select do |x|
|
||||
x.name == diskname
|
||||
end.first
|
||||
libvirt_disk.destroy if libvirt_disk
|
||||
if libvirt_disk
|
||||
libvirt_disk.destroy
|
||||
elsif disk[:path]
|
||||
poolname = env[:machine].provider_config.storage_pool_name
|
||||
libvirt_disk = env[:libvirt_compute].volumes.all.select do |x|
|
||||
# FIXME can remove pool/target.img and pool/123/target.img
|
||||
x.path =~ /\/#{disk[:path]}$/ && x.pool_name == poolname
|
||||
end.first
|
||||
libvirt_disk.destroy if libvirt_disk
|
||||
end
|
||||
end
|
||||
|
||||
# remove root storage
|
||||
|
Loading…
Reference in New Issue
Block a user