def modify_adapter
      parent_machine.with_open_session do |session|
        machine = session.machine
        yield machine.get_network_adapter(slot)
      end
    end
def modify_adapter
      parent_machine.with_open_session do |session|
        machine = session.machine
        yield machine.get_network_adapter(slot)
      end
    end
Opens a session, yields the adapter and then saves the machine at
 the end