<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Convert Template to VM to Template after Patching in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2875327#M103995</link>
    <description>&lt;P&gt;Afaik, no.&lt;BR /&gt;&lt;BR /&gt;The advantage of using Invoke-VMScript is that it only requires the VMware Tools to be running.&lt;BR /&gt;There is no need for a network connection in the Guest OS.&lt;BR /&gt;So instead of logging on, you can launch the required command in the Guest OS, analyse the output and then set the network.&lt;BR /&gt;&lt;BR /&gt;No need to logon at least&lt;/P&gt;</description>
    <pubDate>Fri, 29 Oct 2021 16:34:38 GMT</pubDate>
    <dc:creator>LucD</dc:creator>
    <dc:date>2021-10-29T16:34:38Z</dc:date>
    <item>
      <title>Convert Template to VM to Template after Patching</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873451#M103838</link>
      <description>&lt;P&gt;Hi LucD,&lt;/P&gt;&lt;P&gt;I have a query..&lt;/P&gt;&lt;P&gt;1. Convert Template to VM&lt;BR /&gt;2. Power On the VM&lt;BR /&gt;3. Patch the VM with&lt;BR /&gt;3. Power Off&lt;BR /&gt;4. Convert to Template&lt;/P&gt;&lt;P&gt;Operating System: Linux&lt;/P&gt;&lt;P&gt;Looking forward to your reply, thanks for the help.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 11:35:04 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873451#M103838</guid>
      <dc:creator>Adv-CODE-R</dc:creator>
      <dc:date>2021-10-21T11:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Template to VM to Template after Patching</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873452#M103839</link>
      <description>&lt;P&gt;What is in fact the question?&lt;BR /&gt;All these steps, besides 3, are simple cmdlets.&lt;BR /&gt;And 3 is of course Guest OS dependent&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 11:38:10 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873452#M103839</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2021-10-21T11:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Template to VM to Template after Patching</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873511#M103844</link>
      <description>&lt;P&gt;LucD,&lt;/P&gt;&lt;P&gt;Thank you for the response.&lt;/P&gt;&lt;P&gt;I was able to figure out about template to VM to template cmdlets and it works. But I'm stuck at assigning the IP address to the VM (Linux OS) using PowerShell - is there any possibility to assign IP address to the VM using powerCLI cmdlets.&lt;/P&gt;&lt;P&gt;I came across this cmdlet but this is for windows, not really sure if this works for Linux:&lt;/P&gt;&lt;P&gt;New-NetIPAddress&lt;/P&gt;&lt;P&gt;Kindly help.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:29:18 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873511#M103844</guid>
      <dc:creator>Adv-CODE-R</dc:creator>
      <dc:date>2021-10-21T15:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Template to VM to Template after Patching</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873524#M103845</link>
      <description>&lt;P&gt;I'm afraid you will have to do that inside the Guest OS itself.&lt;BR /&gt;Most Linux systems allow you to do that via config files.&lt;BR /&gt;You can for example do that via Invoke-VMScript and run a sed command inside the Guest OS.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:49:59 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873524#M103845</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2021-10-21T15:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Template to VM to Template after Patching</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873805#M103873</link>
      <description>&lt;P&gt;We have a static IP address on all our templates.&amp;nbsp; Changing the IP is part of the deployment of a VM.&lt;BR /&gt;&lt;BR /&gt;We time the convert from template to VM and power on with our patch window.&amp;nbsp; When SCCM or Satellite pushes patches, the VM is up and running. Then, power off and convert back to a template.&amp;nbsp; When things don't work correctly, it's usually on the SCCM or Satellite side.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 14:09:26 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2873805#M103873</guid>
      <dc:creator>Bruticusmaximus</dc:creator>
      <dc:date>2021-10-22T14:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Template to VM to Template after Patching</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2874032#M103893</link>
      <description>&lt;P&gt;You can set the IP using Invoke-VMScritp, with this command you need to run a OS command to set IP for the guest&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 05:35:15 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2874032#M103893</guid>
      <dc:creator>pmoralesc</dc:creator>
      <dc:date>2021-10-24T05:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Template to VM to Template after Patching</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2874050#M103895</link>
      <description>&lt;P&gt;Thanks for basically repeating my answer.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 09:47:30 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2874050#M103895</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2021-10-24T09:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Template to VM to Template after Patching</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2875305#M103992</link>
      <description>&lt;P&gt;Thank you for your response earlier &lt;img class="lia-deferred-image lia-image-emoji" src="https://communities.vmware.com/html/@DCF4E2F7991292CEECF250394DB2C2BC/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;Luc, I have another question:&lt;/P&gt;&lt;P&gt;I want to assign a IP address to the linux VM so, I would be running this script:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;$VM = Get-VM -Name "Linux-Test-TemplateRHEL7"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;$code = @'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ls &amp;gt; "tmp/test.txt"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ip address add 1.1.1.1&lt;/SPAN&gt;&lt;SPAN&gt;/24 dev ens199 (network interface)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'@&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Invoke-VMScript -VM $VM -ScriptType bash -ScriptText $code -GuestUser "&amp;lt;string&amp;gt;" -GuestPassword "&amp;lt;string&amp;gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So the question is.. Do we have any way/cmdlets to get the information about the network interface of the linux VM? without logging into the VM after converting it from template to VM.&lt;/P&gt;&lt;P&gt;Because right now my script works but I was successful only after logging into the VM and manually finding the network interface (&lt;SPAN&gt;ens199&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;Kindly help. Thanks in advance &lt;img class="lia-deferred-image lia-image-emoji" src="https://communities.vmware.com/html/@DCF4E2F7991292CEECF250394DB2C2BC/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 15:12:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2875305#M103992</guid>
      <dc:creator>Adv-CODE-R</dc:creator>
      <dc:date>2021-10-29T15:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Template to VM to Template after Patching</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2875327#M103995</link>
      <description>&lt;P&gt;Afaik, no.&lt;BR /&gt;&lt;BR /&gt;The advantage of using Invoke-VMScript is that it only requires the VMware Tools to be running.&lt;BR /&gt;There is no need for a network connection in the Guest OS.&lt;BR /&gt;So instead of logging on, you can launch the required command in the Guest OS, analyse the output and then set the network.&lt;BR /&gt;&lt;BR /&gt;No need to logon at least&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 16:34:38 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Convert-Template-to-VM-to-Template-after-Patching/m-p/2875327#M103995</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2021-10-29T16:34:38Z</dc:date>
    </item>
  </channel>
</rss>

