Automation

 View Only
  • 1.  Creating a VM with a constant Name

    Posted Apr 19, 2012 05:15 AM

    Hi All,

    Is there any way by which I can create Virtual Machines ( either using import-vapp or by New-VM ) with a constant Name.?

    i.e It cannot ne renamed later on or it will require some kind of authentication for it.?

    I have a similar need, Certain virtual machines should never be powered off and require some authentication for it.?

    Any ideas?

    Thanks

    Nikunj



  • 2.  RE: Creating a VM with a constant Name

    Posted Apr 19, 2012 05:34 AM

    One way of doing this would be through the use of permssions and privileges.

    Create a special role with the rename and poweroff privileges, and give a permission with that role to a limited set of users.

    All other users should have a permission with a role that doesn't have these privileges.

    To create the special role, you could do

    $tgt = "VirtualMachine.Config.Rename","VirtualMachine.Interact.PowerOff" 
    $privs
    = Get-VIPrivilege | where {$tgt -contains $_.Id} New-VIRole -Name Special -Privilege $privs