def save
      return false unless valid?
      raise Exceptions::ReadonlyVMStateException.new("VM must not be in saved state to modify.") if saved?

      with_open_session do |session|
        # Use setters to save the attributes on the locked machine and persist
        # the settings
        machine = session.machine

        # Save the boot order
        save_interface_attribute(:boot_order, machine)

        # Save all the attributes and relationships
        save_changed_interface_attributes(machine)

        # Save relationships, which may open their own sessions if necessary
        save_relationships
      end

      true
    end
def save
      return false unless valid?
      raise Exceptions::ReadonlyVMStateException.new("VM must not be in saved state to modify.") if saved?

      with_open_session do |session|
        # Use setters to save the attributes on the locked machine and persist
        # the settings
        machine = session.machine

        # Save the boot order
        save_interface_attribute(:boot_order, machine)

        # Save all the attributes and relationships
        save_changed_interface_attributes(machine)

        # Save relationships, which may open their own sessions if necessary
        save_relationships
      end

      true
    end
Saves the virtual machine if modified. This method saves any modified
 attributes of the virtual machine. If any related attributes were saved
 as well (such as storage controllers), those will be saved, too.