VMware vSphere

 View Only
  • 1.  Notes field in vSphere

    Posted Jan 25, 2023 07:02 PM

    If this isn't the correct board, please point me in the right direction.

    Our VM Templates all have extensive details in the Notes section in vSphere and the problem is they aren't blanked out when deploying a VM from that template.

    Is there a way to remove or blank out the Notes section when actually deploying the VM?  Perhaps running a command in the customization script?  Or even having a batch file saved on the windows template, that's called by the customization script?  I'm thinking there *might* be a vmtools command line that might accomplish it that way..?

    Trying to only find a solution that does this on the deployment, or in that timeframe.  I don't want to just remove them all, or run a task every day that wipes out Notes from recent deployments, in case someone deployed one and updated the Notes section appropriately.

    Thanks in advance.



  • 2.  RE: Notes field in vSphere

    Posted Jan 25, 2023 08:08 PM

    Convert VM template to VM make needed notes there and convert it back to template. 

    If I correctly understood what you mean.



  • 3.  RE: Notes field in vSphere

    Posted Jan 25, 2023 08:25 PM

    That would update the notes on the template, and iirc that's the only way.

    But then when that template gets deployed, the newly created VM has those very same notes.



  • 4.  RE: Notes field in vSphere

    Posted Jan 26, 2023 01:33 PM

    in the same theme I would like to be able to change the notes in the customization process , no way ?



  • 5.  RE: Notes field in vSphere

    Posted Jan 26, 2023 02:12 PM

    I wonder if that would be doable in powercli

    "Get-VM * |Set-VM -Description " " -Confirm:$false"

    This should remove the notes from the new vm if you scripted out the template deploy.



  • 6.  RE: Notes field in vSphere

    Posted Jan 26, 2023 02:32 PM

    Get-VM *

    Is that going to run through all VM's and blank out the field?



  • 7.  RE: Notes field in vSphere

    Posted Jan 26, 2023 02:53 PM

    hmmm, is it in general possible? 



  • 8.  RE: Notes field in vSphere

    Posted Jan 26, 2023 02:57 PM

    yes sorry you should specify the vm's identity



  • 9.  RE: Notes field in vSphere

    Posted Jan 26, 2023 03:17 PM

    Hahaha yeah that's the issue I'm having.  I'd love to be able to add a runonce command into the customization script but how do I define "this vm that I'm deploying right now"?

    Get-vm -name $env:Computername

    ?

    I'll just have to make sure my template has powercli setup, which isnt' a problem..



  • 10.  RE: Notes field in vSphere

    Posted Jan 26, 2023 10:06 PM

    Actually that worked.  So my template will need the powercli modules and i haven't worked out if i can run the command in the runonce section of the customization script or, more likely call it from a cmd file that's already running as part of the customization script....one of the lines in the customization script is c:\Admin\Process.cmd and I could just call powershell from that...regardless...this worked and nearly instantly removed the Notes section of the VM:

    Get-VM -name $env:Computername |Set-VM -Description " " -Confirm:$false