    # File lib/fog/terremark/requests/shared/instantiate_vapp_template.rb, line 22
            def instantiate_vapp_template(name, vapp_template, options = {})
              unless name.length < 15
                raise ArgumentError.new('Name must be fewer than 15 characters')
              end
              options['cpus'] ||= 1
              options['memory'] ||= 512
              options['network_id'] ||= default_network_id
              options['vdc_id'] ||= default_vdc_id

              data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<InstantiateVAppTemplateParams name=\"\#{name}\" xmlns=\"http://www.vmware.com/vcloud/v0.8\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.vmware.com/vcloud/v0.8 http://services.vcloudexpress.terremark.com/api/v0.8/ns/vcloud.xsd\">\n<VAppTemplate href=\"\#{@scheme}://\#{@host}/\#{@path}/vAppTemplate/\#{vapp_template}\" />\n<InstantiationParams xmlns:vmw=\"http://www.vmware.com/schema/ovf\">\n<ProductSection xmlns:ovf=\"http://schemas.dmtf.org/ovf/envelope/1\" xmlns:q1=\"http://www.vmware.com/vcloud/v0.8\"/>\n<VirtualHardwareSection xmlns:q1=\"http://www.vmware.com/vcloud/v0.8\">\n<Item xmlns=\"http://schemas.dmtf.org/ovf/envelope/1\">\n<InstanceID xmlns=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData\">1</InstanceID>\n<ResourceType xmlns=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData\">3</ResourceType>\n<VirtualQuantity xmlns=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData\">\#{options['cpus']}</VirtualQuantity>\n</Item>\n<Item xmlns=\"http://schemas.dmtf.org/ovf/envelope/1\">\n<InstanceID xmlns=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData\">2</InstanceID>\n<ResourceType xmlns=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData\">4</ResourceType>\n<VirtualQuantity xmlns=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData\">\#{options['memory']}</VirtualQuantity>\n</Item>\n</VirtualHardwareSection>\n<NetworkConfigSection>\n<NetworkConfig>\n<NetworkAssociation href=\"\#{@scheme}://\#{@host}/\#{@path}/network/\#{options['network_id']}\"/>\n</NetworkConfig>\n</NetworkConfigSection>\n</InstantiationParams>\n</InstantiateVAppTemplateParams>\n"

              request(
                :body => data,
                :expects => 200,
                :headers => { 'Content-Type' => 'application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml' },
                :method => 'POST',
                :parser => Fog::Parsers::Terremark::Shared::InstantiateVappTemplate.new,
                :path => "vdc/#{options['vdc_id']}/action/instantiatevAppTemplate"
              )
            end