mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Change libvirt method for creating storage pool
We should use define_storage pool_xml instead of create_storage_pool_xml so that * the pool is permanent * pool creation succeeds if the directory does not already exist
This commit is contained in:
parent
47a21433a5
commit
8df13baade
@ -34,8 +34,10 @@ module VagrantPlugins
|
||||
# Fog libvirt currently doesn't support creating pools. Use
|
||||
# ruby-libvirt client directly.
|
||||
begin
|
||||
libvirt_pool = env[:libvirt_compute].client.create_storage_pool_xml(
|
||||
libvirt_pool = env[:libvirt_compute].client.define_storage_pool_xml(
|
||||
to_xml('default_storage_pool'))
|
||||
libvirt_pool.build
|
||||
libvirt_pool.create
|
||||
rescue => e
|
||||
raise Errors::CreatingStoragePoolError,
|
||||
:error_message => e.message
|
||||
|
Loading…
Reference in New Issue
Block a user