mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
fixed handling of nil volumes
This commit is contained in:
@@ -32,6 +32,8 @@ module VagrantPlugins
|
||||
)
|
||||
domain = env[:machine].provider.driver.connection.servers.get(env[:machine].id.to_s)
|
||||
root_disk = domain.volumes.select do |x|
|
||||
!x.nil?
|
||||
end.select do |x|
|
||||
x.name == libvirt_domain.name + '.img'
|
||||
end.first
|
||||
raise Errors::NoDomainVolume if root_disk.nil?
|
||||
|
||||
Reference in New Issue
Block a user