<?xml version="1.0"?>
<DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/<%= erb_version %>/">
   <requestId><%= @request_id %></requestId>
  <reservationSet>
    <item>
      <reservationId>default</reservationId>
      <ownerId><%= erb_user_name %></ownerId>
      <groupSet>
        <item>
          <groupId>default</groupId>
        </item>
      </groupSet>
      <instancesSet>
        <% vmpool.each do |vm| %>
        <% if include_terminated_instance?(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 %>
          <productCodes/>
          <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>
        <% end %>
        <% end %>
      </instancesSet>
    </item>
  </reservationSet>
</DescribeInstancesResponse>
