Virtual Geek

Tales from real IT system administrators world and non-production environment

Part 2: Configure IIS server to allow download .ISO files

This is a part 2 of my Part 1 article Inject and install VMware Tools During Install by modifying Microsoft Windows ISO. I will use this IIS server setup in the Hashcorp Packer.exe configuration to create VMware Microsoft Windows VM Template on vCenter server. 

Here I will configure IIS (Internet Information services) web server from scratch, where I will keep my all modified (VMWare Tools injected/slipstreamed) Windows Server OS ISO file and packer setup will pickup and download these ISO files for further to create VMware Virtual Machine Templates on vCenter server. This IIS server configuration is a one time process.

Part 1: Inject and install VMware Tools During Install by modifying Microsoft Windows ISO
Part 2: Configure IIS server to allow download .ISO files
Part 3: Using HashiCorp Packer to build a Windows Server VM template for VMware vSphere

To install IIS server on Windows, Open Server Manager and click Manage > Add Roles and Features.

Microsoft widnows server modified ISO IIS server hosting add roles and features manage hashicorp packer.exe vmware vshpere esxi vcenter vcsa template virtualmachine automation installation.png

In the Add Roles and Features Wizard click Next button for before you begin and Select installation type pages. Keep selected Role based or feature based installation in installation type.

Microsoft windows server inject vmware tools modify ISO IIS server web host ISO download Internet and information services hashicorp packer.exe vmware vsphere vcenter esxi vcsa virtual machine vmtx template automation.png

Next in the Select destination server, server is already selected, click Next.

Select Server roles step is crucial, Choose Web Server (IIS) from the list and Add features. Click Next.

Microsoft add roles and features wizard IIS server installation Modify ISO install.vim hashicorp packer.exe vmware vsphere vCenter esxi template creation automation.png

No changes required in Features or Web Server Role (IIS). Click Next button for both.

Microsoft IIS server Modified ISO file dism hosting download allow internet and information web services vmware vsphere template virtual machine vm vmware vsphere esxi vcenter vcsa server windows microsoft iso.png

In the Role Services verify or add addition services if needed, In our case I am using default configuration. Click Next. Confirm Installation Selection again verify your configuration, click Install button to proceed.

VMware vsphere vcenter esxi vcsa virtual machine template creation automation iis server microsoft windows server 2022 modified ISO file hashicorp packer.exe automation tf terraform json.png

You can view Installation progress. Feature Installation is succeeded on the server. Click close button.

Microsoft server add roles and features wizard Web server IIS http hashicorp packer template creation vmware vsphere vcenter esxi virtual machine template vm vmtx configuration IAAS infrastructure.png

Once this IIS Web server is installed you will see new folder structure inetpub is created under C: drive. You will need to copy modified ISO file earlier created (in Part 1: Inject and install VMware Tools During Install by modifying Microsoft Windows ISO) under C:\inetpub\wwwroot\iso folder as shown below. (Note: Create a iso directory it will not exist)

Microsoft windows server slipstream inject vmware tools in ISO web server wwwroot inetpub vmware vsphere vCenter vcsa VM template vmtx automation using packer hashicorp.png

For further IIS web server configuration. Click Tools Internet Information Services (IIS) Manager in Server Manager.

Microsoft windows server manager internet information services iis manager web server host ISO file modified vmware tools injection vmware vsphere automated installation esxi virtual machine vm template vmtx hashicorp packer.exe.png

First configuration is I need IIS web server to show all files under iso folder as directory listing on web browser on website.

For this in IIS manager expand Server > Sites > Default Web Site > iso directory in left pane. From middle pane choose Directory Browsing and in the Right side Actions pane click Open Feature. At the moment you can see Directory browsing has been disabled by default. Click Enable. As you can see Directory browsing/listing is enabled.

Internet information service IIS manager directory browsing feature enable hashicorp packer automation install vmware virtual machine vcenter configuration.png

Next go back to folder iso home. Click MIME Types and click Open Feature from Actions. Click Add button to Add new MIME Type. Use below information and click OK.
File name extensions: .iso
MIME Type: application/octet-stream

Next you will see new MIME type in the list.

Microsoft server ISO on internet information services (IIS) Manager virtual directory Add MIME Type open feature hashicorp packer configuration vmware vsphere virtual machine template .png

At this point IIS web server is ready. All the above IIS configuration is captured inside and governed by web.config file under iso folder. If incase you want to migrate web server. you can use the same file to automate configuration.

Its time to test web server. On my browser I have used web server ip with iso folder location example http://webserverip/iso. In the browser I see the modified Windows 2022 Eval server ISO. Click it and check if you are able to download the ISO file. In my case I am successful. I will use this web server in next article for Hashicorp packer VMware windows Virtual machine template creation.

vmware vsphere vCenter esxi hashicorp packer virtual machine template creation modified windows server eval iso inject vmware tools vmtool slipstream drivers host iso web server.png

Useful Articles
Deploy install VCSA (vCenter server appliance 6.5) on VMWare Workstation
Enable or disable SSH on VMWare vCenter Server Appliance (VCSA)
The top 10 reasons to upgrade to VMware vSphere 6.5
vCenter server appliance 6.5 deployment Error The supplied system is not valid
How to deploy vCenter server appliance on VMware Workstation
Enable Access to the VCSA Bash shell or Appliance Shell
Patching the vCenter Server Appliance VCSA
Install and Configure VMware UMDS on Linux
How to Install vCenter server appliance on ESXi host

Go Back


Blog Search

Page Views


Follow me on Blogarama