# File lib/fog/libvirt/models/compute/server.rb, line 63
        def save

          raise Fog::Errors::Error.new('Resaving an existing server may create a duplicate') unless new?

          validate_template_options

          xml ||= xml_from_template

          create_or_clone_volume

          xml = xml_from_template

          # We either now have xml provided by the user or generated by the template
          begin
            if xml
              self.raw = persistent ? connection.raw.define_domain_xml(xml) : connection.raw.create_domain_xml(xml)
            end
          rescue
            raise Fog::Errors::Error.new("Error saving the server: #{$!}")
          end
        end