def memory=(size)
      fail(CloudError,
           "Invalid vm memory size #{size}MB") if size <= 0

      Config
        .logger
        .info "Changing the vm memory to #{size}MB."

      payload = entity_xml
      payload.change_memory(size)

      task = connection.post(payload.reconfigure_link.href,
                             payload,
                             Xml::MEDIA_TYPE[:VM])
      monitor_task(task)
      self
    end
def memory=(size)
      fail(CloudError,
           "Invalid vm memory size #{size}MB") if size <= 0

      Config
        .logger
        .info "Changing the vm memory to #{size}MB."

      payload = entity_xml
      payload.change_memory(size)

      task = connection.post(payload.reconfigure_link.href,
                             payload,
                             Xml::MEDIA_TYPE[:VM])
      monitor_task(task)
      self
    end
sets size of memory in megabytes