<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rohit Kasture on Medium]]></title>
        <description><![CDATA[Stories by Rohit Kasture on Medium]]></description>
        <link>https://medium.com/@kasturerohit7?source=rss-37065fb36353------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*uU3P3Lt2hU0AeEii</url>
            <title>Stories by Rohit Kasture on Medium</title>
            <link>https://medium.com/@kasturerohit7?source=rss-37065fb36353------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 22:53:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kasturerohit7/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ How to Deploy a Virtual Machine in VMware Cloud Foundation Using Terraform]]></title>
            <link>https://medium.com/@kasturerohit7/how-to-deploy-a-virtual-machine-in-vmware-cloud-foundation-using-terraform-3938db84f596?source=rss-37065fb36353------2</link>
            <guid isPermaLink="false">https://medium.com/p/3938db84f596</guid>
            <category><![CDATA[vmware]]></category>
            <category><![CDATA[vcf]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Rohit Kasture]]></dc:creator>
            <pubDate>Sun, 06 Jul 2025 10:33:49 GMT</pubDate>
            <atom:updated>2025-07-06T10:55:12.752Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tUOAMVQNwusLwIZUO-hDIw.png" /></figure><p>Manually provisioning VMs in vSphere can be slow and error-prone, especially in large VMware Cloud Foundation (VCF) environments. In this guide, I’ll show you how to automate VM creation using <strong>Terraform</strong>, and give you access to a <strong>ready-to-use GitHub module</strong>.</p><h4>🔧 Prerequisites</h4><ul><li>VMware Cloud Foundation environment (vCenter and ESXi)</li><li>Terraform installed: Install Terraform</li><li>A VM template in vCenter with <strong>VMware Tools installed</strong></li><li>Static IP and network configuration</li></ul><h4>📦 Use My Terraform Module (Open Source)</h4><p>You can use the code I wrote to instantly deploy VMs:</p><p><strong>GitHub Repo:</strong> <a href="https://github.com/kasture-rohit/tf-vsphere-vm">github.com/kasture-rohit/tf-vsphere-vm</a></p><p>Clone the repo:</p><pre>git clone https://github.com/kasture-rohit/tf-vsphere-vm.git<br>cd tf-vsphere-vm</pre><h4><strong>📁 What’s Inside the Repo</strong></h4><ul><li>main.tf — VM configuration using Terraform</li><li>variables.tf — All customizable parameters</li><li>terraform.tfvars — Editable config with your vSphere settings</li></ul><p>Supports:</p><ul><li>VM clone from template</li><li>Guest customization with static IP</li><li>Custom CPU, memory, and disk size</li></ul><h4>⚙️ Sample Configuration (terraform.tfvars)</h4><pre>vsphere_user     = &quot;administrator@vsphere.local&quot;<br>vsphere_password = &quot;your_password&quot;<br>vsphere_server   = &quot;vcenter.mycompany.com&quot;<br><br>datacenter = &quot;SDDC-Datacenter&quot;<br>datastore  = &quot;vsanDatastore&quot;<br>cluster    = &quot;Cluster-1&quot;<br>network    = &quot;VM Network&quot;<br>template   = &quot;ubuntu-template&quot;<br><br>vm_name     = &quot;my-tf-vm&quot;<br>vm_ip       = &quot;192.168.10.100&quot;<br>vm_gateway  = &quot;192.168.10.1&quot;<br>vm_cpu      = 4<br>vm_memory   = 8192<br>vm_disk_size = 40</pre><h4>🚀 Deploy the VM</h4><p>Run the following Terraform commands:</p><pre>terraform init<br>terraform plan<br>terraform apply</pre><p>This will:</p><ul><li>Connect to vCenter</li><li>Clone a VM from your template</li><li>Configure its CPU, memory, disk, and static IP</li></ul><h4><strong>🧠 Pro Tips</strong></h4><ul><li>Ensure your template has <strong>VMware Tools</strong> installed for guest customization</li><li>Static IP requires that the guest OS supports customization</li><li>You can deploy multiple VMs using count or for_each in Terraform</li></ul><h4><strong>🤝 Want to Contribute?</strong></h4><p>Fork the repo, add features, or open issues!<br> Here’s the repo again:<br> 🔗 <a href="https://github.com/kasture-rohit/tf-vsphere-vm">https://github.com/kasture-rohit/tf-vsphere-vm</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3938db84f596" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>