# File lib/fog/libvirt/models/compute/volume.rb, line 64 def save requires :pool_name raise Fog::Errors::Error.new('Resaving an existing volume may create a duplicate') if key xml=xml_from_template if xml.nil? begin volume=nil pool=connection.raw.lookup_storage_pool_by_name(pool_name) volume=pool.create_volume_xml(xml) self.raw=volume true rescue raise Fog::Errors::Error.new("Error creating volume: #{$!}") false end end