<RunInstancesResponse xmlns="http://ec2.amazonaws.com/doc/<%= erb_version %>/">
  <requestId><%= @request_id %></requestId>
  <reservationId></reservationId>
  <ownerId><%= erb_user_name %></ownerId>
  <groupSet>
    <item>
      <groupId>default</groupId>
    </item>
  </groupSet>
  <instancesSet>
    <% erb_vms.each { |vm| %>
    <item>
      <%= render_instance_id(vm) %>
      <imageId><%= erb_vm_info[:ec2_img_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 %>
      <amiLaunchIndex><%= vm.id %></amiLaunchIndex>
      <instanceType><%= erb_vm_info[:instance_type] %></instanceType>
      <%= render_launch_time(vm) %>
      <placement>
        <availabilityZone>default</availabilityZone>
      </placement>
      <monitoring>
        <enabled>true</enabled>
      </monitoring>
    </item>
    <% } %>
  </instancesSet>
</RunInstancesResponse>

