<VM>
  <ID><%= id %></ID>
  <UID><%= vm[:uid] ? vm[:uid] : 0 %></UID>
  <GID><%= vm[:gid] ? vm[:gid] : 0 %></GID>
  <NAME><%= vm[:name] ? vm[:uid] : 'pepe' %></NAME>
  <LAST_POLL><%= vm[:last_poll] ? vm[:last_poll] : '1309275256' %></LAST_POLL>
  <STATE><%= vm[:state] ? vm[:state] : 3 %></STATE>
  <LCM_STATE>3</LCM_STATE>
  <STIME>1309275252</STIME>
  <ETIME>0</ETIME>
  <DEPLOY_ID>dummy</DEPLOY_ID>
  <MEMORY><%= vm[:memory] ? vm[:memory] : 128 %></MEMORY>
  <CPU><%= vm[:cpu] ? vm[:cpu] : 1 %></CPU>
  <NET_TX><%= vm[:net_tx] ? vm[:net_tx] : 0 %></NET_TX>
  <NET_RX><%= vm[:net_rx] ? vm[:net_rx] : 0 %></NET_RX>
  <TEMPLATE>
    <CPU><![CDATA[1]]></CPU>
    <MEMORY><![CDATA[1024]]></MEMORY>
    <NAME><![CDATA[PEPEPE]]></NAME>
    <VCPU><![CDATA[1]]></VCPU>
    <VMID><![CDATA[4]]></VMID>
  </TEMPLATE>
  <% if history = vm[:history] %>
  <HISTORY_RECORDS>
    <% history.each do |h| %>
    <HISTORY>
      <SEQ><%= h[:seq] ? h[:seq] : 0 %></SEQ>
      <HOSTNAME><%= h[:hostname] ? h[:hostname] : "kvxen" %></HOSTNAME>
      <VM_DIR>/Users/dmolina/trabajo/acctmoni/install/var/</VM_DIR>
      <HID><%= h[:hid] ? h[:hid] : 0 %></HID>
      <STIME>1309275256</STIME>
      <ETIME>0</ETIME>
      <VMMMAD>vmm_dummy</VMMMAD>
      <TMMAD>tm_dummy</TMMAD>
      <PSTIME><%= h[:pstime] ? h[:pstime] : 0 %></PSTIME>
      <PETIME><%= h[:petime] ? h[:petime] : 0 %></PETIME>
      <RSTIME><%= h[:rstime] ? h[:rstime] : 0 %></RSTIME>
      <RETIME><%= h[:retime] ? h[:retime] : 0 %></RETIME>
      <ESTIME><%= h[:estime] ? h[:estime] : 0 %></ESTIME>
      <EETIME><%= h[:eetime] ? h[:eetime] : 0 %></EETIME>
      <REASON><%= h[:reason] ? h[:reason] : 0 %></REASON>
    </HISTORY>
    <% end %>
  </HISTORY_RECORDS>
  <% end %>
</VM>