how to test faoliver using powercli?
privilege : test failover
description: Fault Tolerance failover by making the Secondary virtual machine the Primary virtual machine
Is this can be done in the same way like get-viprivilege,new-vipermission,new-virole?
MakePrimaryVM_Task is one of the methods for a virtual machine in the VMware vSphere API. If you do:
$vm = MyVM$vm.ExtensionData | Get-Member
you will see all of the methods available for a virtual machine.
Click on the link above for the documentation.
the id for this is
Virtualmachine.Interaction.Test failover
I make it in bold so you see it this time heheheh
Yes, it can be don in that way like in your previous posts , by the way have you checked this document ?
It has all the privs in it and the definitions.
Hmm..ya..last time i dint notice that.I have that document already.anyway thanks for tha link.is that can be done in any other way?
Is there any other direct commands for that?
not by default. i suppose instead of creating new roles you can edit existing ones, i dont know what do you mean with other approach.
For example you could make yourself a function that does all those steps for you. It would automate the whole process. Can you explain in bigger detail what kind of solution are you looking for?
Actually,the commands like create vm ,change vm setting,test failover are the privileges of vm admin.We have direct commands for cretaing a vm and change setting and etc.so like that can we combile any powercli commands to perform this action?Or should we use like the previous solution?
Im sorry, i do not quite understand the question.
direct commands are there to perform these actions.for example
delete vm : remove-vm -vm host1
Like that,Is there any powercli command or combining such command,can we do this?
For all the vmware privileges, the privilege id is there.
to remove a vm, the powercli command is there and with the privilege id also,we can do that.
Likewise,is there anyother way to perform this action with anu such commands other than using privilege id?
If I understand your question correctly then you want to failover a primary VM to the secondary VM. You can do something like:
$PrimaryVM = Get-VM -Name PrimaryVM $SecondaryVM = Get-VM -Name SecondaryVM $PrimaryVM.ExtensionData.MakePrimaryVM_Task($PrimaryVM.Id,$SecondaryVM.Id)
is makeprimary_task is one of the default property that can be used directly?
MakePrimaryVM_Task is one of the methods for a virtual machine in the VMware vSphere API. If you do:
$vm = MyVM$vm.ExtensionData | Get-Member
you will see all of the methods available for a virtual machine.
Click on the link above for the documentation.