<RunInstancesResponse xmlns="http://ec2.amazonaws.com/doc/<%= erb_version %>/">
  <requestId><%= @request_id %></requestId>
  <reservationId>default</reservationId>
  <ownerId><%= erb_user_name %></ownerId>
  <groupSet>
    <item>
      <groupId>default</groupId>
    </item>
  </groupSet>
  <instancesSet>
    <% erb_vms.each { |vm| %>
    <item>
      <%= render_instance_id(vm) %>
      <imageId><%= vm['USER_TEMPLATE/IMAGE_ID'] %></imageId>
      <instanceState><%= render_state(vm) %></instanceState>
      <% if vm.has_elements?("TEMPLATE/NIC/IP") %>
      <% ips_str = vm.retrieve_elements("TEMPLATE/NIC/IP").join(', ') %>
      <privateIpAddress><%= ips_str %></privateIpAddress>
      <privateDnsName><%= ips_str %></privateDnsName>
      <dnsName><%= ips_str %></dnsName>
      <% end %>
      <% if vm['TEMPLATE/CONTEXT/EC2_KEYNAME'].nil? %>
      <keyName>none</keyName>
      <% else %>
      <keyName><%= vm['TEMPLATE/CONTEXT/EC2_KEYNAME'] %></keyName>
      <% end %>
      <instanceType><%= vm['USER_TEMPLATE/EC2_INSTANCE_TYPE'] %></instanceType>
      <%= render_launch_time(vm) %>
      <placement>
        <availabilityZone>default</availabilityZone>
      </placement>
      <amiLaunchIndex><%= vm.id %></amiLaunchIndex>
      <kernelId>eki-EA801065</kernelId>
      <ramdiskId>eri-1FEE1144</ramdiskId>
      <monitoring>
        <state>disabled</state>
      </monitoring>
      <clientToken><%= vm['USER_TEMPLATE/EC2_CLIENT_TOKEN'] %></clientToken>
    </item>
    <% } %>
  </instancesSet>
</RunInstancesResponse>

