vSphere PowerCLI and replication

Hello

I ve seen a discussion about this in the forum, though none recently.

Would it not possible to trigger a failover of PowerCLI?

My thought is to trigger a script of our UPS in case PowerFailure to stop a virtual machine and it lights on another host in another location. I have only a virtual Center and the two hosts attached to it.

The script should do the following.

  1. Stop the machine source
  2. Activate failover
  3. Turn on the destination on the new host machine.

Would this be possible?

Hello

The original question was about turn on/off the VM another host on a different location. I guess that there is no storage shared between the two locations. vSphere replication could be used to replicate the VMDK, but yes, there is currently no Automation (unless using the API of SRM and SRM currently requires two vCenter servers - each manage its location).

Kind regards

Martin

Tags: VMware

Similar Questions

  • After upgrading vSphere 5.5 replication device cannot add VM replication

    Dear all,

    We have improved our server vcenter and device of replicaion of vpshere of version 5.1 to 5.5. after upgrade cannot add new virtual machine replication replication vsphere device. Configure the replication vsphere option grey out on VM right click menu. See the image below.

    replication.JPG

    Please advice how to solve this problem.

    Thank you and best regards,

    Lasa.

    Hello

    There is a known issue for this behavior described in VMware vSphere replication 5.5 Release Notes (shares of vSphere in vSphere Client Web replication are not available after the upgrade.) The solution is to restart your Web Client vSphere

  • cannot deploy template ovf "vSphere unit of replication.

    Hello

    I can't a vSphere replication device deployment.

    have followed the installation of "VMware vSphere Administration of replication" chapter and did everything that they asked (web client deployment, a web client plugin installation, by replacing VirtualCenter.FQDN with static IP address [my network has dns server without reverse lookup lausy, so I will try to put all the addresses static]).

    I am after a deployment wizard and after selecting the files from my drive (vsphere replication ovf10 (NOT the AddOn) - version 5.5), accepting the EULA, selection of folder/name it brings me to the selection of storage, where I select my internal store of host data.

    When I press Next there is an error: "could not establish an SSL with vCenter Server connection", then "Impossible to validate that the FVO can be imported to the server vCenter Server.

    I do not know if that could be relevant, but my server vcenter (5.5) runs on windows 2003 Server (only the https port is passed to 444 by default 443) and I was installing it a few times before I did.

    Please, give some advice.

    Thanks in advance.

    If you change the default port (possible then try), you are able to deploy?

    In this way, we will be able to understand any problem?

    -A

  • What to buy to use vSphere PowerCLI

    Hello

    I'm kinda new on ESX but used PowerCLI at length in the last six months.

    However, I have trouble understanding what I have to put in place infrastructure vSphere, however small, at home; specifically, if I want to use PowerCLI.

    What should I buy to run ESX on one or two hosts and use vCenter and PowerCLI to administer guests? The "Essentials" kit made it? What license do I need? I see that I can download PowerCLI, but will it work with any installation ESX or vSphere?

    Please notify.

    Thank you.

    What should I buy to run ESX on one or two hosts and use vCenter and PowerCLI to administer guests? The "Essentials" kit made it? What license do I need? I see that I can download PowerCLI, but will it work with any installation ESX or vSphere?

    Unfortunately, VMware has decided to lock automation ESXi API accessed by PowerCLI and other tools, while the API is read-only on ESXi hosts running with the license free "vSphere Hypervisor. You can always perform 'read' operations such as Get - VM or Get-VMHost, but everything 'written' with Set-* Add-* New-* Remove-* cmdlets etc will not work with the free license.

    Any official license is sufficient to lift this limitation, so you can get the kit of essentials at low cost. Of course you are still bound by the limitations of features General this license then well.

    Another great option would be that you re - build your laboratory every 60 days with evaluation licenses.

  • Groups PowerCLI and MS SCOM 2012

    Hello

    We recently added 2012 at our data center which consists of servers HP Proliant ESXi 5.1 MS System Center.  We have packs of Directors of HP to manage physical servers but no MP (such as Veeam) for virtual machines.  Microsoft does not set the property of the Virtual Machine VMware, only for Hyper-V.  I want to create a group of just the VMs VMware, but there is nothing to differentiate the VMs from the physical Windows servers.  I can create the group manually, but at this time, it's stupid.  I tell myself that I can just put in place a Powershell script that retrieves the VMware VMs to a list, create a group of Operations Manager and fill in the list.  Child's play, right?  Except that there is a real lack of information to do this in Operations Manager.  I thought that I run it past the PowerCLI group and see if someone has already invented this wheel rather than reinventing myself.

    Thank you!

    Alan

    You can create an attribute that distinguishes vSphere VMs and then create a group based on this attribute.

    There are several ways to create such an attribute of vSPhere:

    • in the eyes of registry for HKLM\System\CurrentControlSet\Services\VMTools
    • check with the manufacturer of BIOS, should contain VMware

    Take a look on

    http://www.systemcentercentral.com/Pack-Catalog/virtual-machine-discovery-MP-for-Operations-Manager-2007/

    How to create a group of computers for the servers VMware or Hyper-V servers | Director of operations

  • PowerCLI and updateipmi

    I'm trying to set the parameters of the IPMI/ILO for the power management on a single ESX host that resides in one of our data centers, and I'm having a few problems. The server is a Dell R610 with a company of the iDRAC 6. I have reactivated the account/password DRAC, and every time I try and run the code, I get the following error.

    Exception, calling 'UpdateIpmi' with '1' or the arguments: "it was not correct to specified parameters.
    "
    E:\Work\VMwareScripts\set-OffsiteServers\setOffsiteServers.ps1:49 char: 21
    + $hostview.updateipmi < < < < ($ipmiinfo)
    + CategoryInfo: NotSpecified: (:)) [], MethodInvocationException)
    + FullyQualifiedErrorId: DotNetMethodException

    In the window of the client vSphere, his shows "a specified parameter was wrong", even if unfortunately it show anywhere WHICH parameter was not correctly.

    The code is not particularly expensive either (fake server names, IPs and accounts)

    $VMHost = "vmhost1.local".
    to connect-viserver vcenterserver.local
    $hostview = get-vmhost-Server "vcenterserver.local" - name $VMHost | % {get-view $_.id}
    $ipmiinfo = new-object vmware.vim.hostipmiinfo
    $ipmiinfo.bmcipaddress = "192.168.2.2.
    $ipmiinfo.bmcmacaddress = ' 84:2 B: 2b: 47:09:F0.
    $ipmiinfo.login = 'root '.
    $ipmiinfo.password = "calvin".
    $hostview.updateipmi ($ipmiinfo)

    Someone has an idea what I am doing wrong? This one is stumping me.

    vCenter is 5.0.0 build 623373

    Host in question is 5.0.0 914586

    PowerCLI on my workstation is VMware vSphere PowerCLI 5.0 build 435427.

    Graham

    Please let us know.

    It is strange that you actually take away the power of the DRAC card to do, it 'read' the new settings. I expect a function or call for it. But heck, you guessed it by working, that's what counts

  • Lifestyle support PowerCLI and tech

    Here, I'm puzzled. I have tech support mode (VMkernal.Boot.techSupportMode is enabled) and the boxes were restarted. Yet when I ask TSM powercli, I see no evidence of it.

    [vSphere PowerCLI] C:\ > get-vmhost ESX_srv | Get-vmhostservice

    Need keys to label political running

    ---                  -----                          ------     -------  -------
    true false ntpd NTP daemon auto
    VMware-vpxa VMware vCenter Agent automatic True False

    In addition, using the VI client, I don't see such TSM shown in the news at the bottom of the link. All I see is the above mentioned services.

    http://www.van-Lieshout.com/2011/01/ESXi-tech-support-mode/

    Also, I used the info in the below link to check the TSM is enabled and all looks right. I don't understand why I can't see TSM.

    http://www.virtu-al.NET/2010/03/01/PowerCLI-technical-support-mode/

    Looks like I've got TSM activate, but why can't I see it.. ?

    Any help is appreciated.

    Yes, that is what seems to confirm KB1017910 .

  • Using Windows Powershell ISE with vSphere PowerCLI

    Hey everybody,

    I'm completely newbieand have just started on the track "managing vSphere with powershell. First problem:

    Is it possible to use Windows Powershell ISE with vSphere cmdlets or can I only use the vSphere PowerCLI?

    I wish I could type my commands directly in the window of the ISE and manage my scripts etc because of this (I find myself n always cut and paste from Notepad when you use the PowerCLI).

    If so, how should I do this?

    I guess its something simple, but when I run the ISE seems not to have registered vSphere cmdlets. I guess I missed something?

    Thank you

    Marc

    In the ISE if you run the following cmdlet, you will get the registered PowerCLI cmdlets:

    Add-PSSnapin "Vmware.VimAutomation.Core".

  • Addition of VMDK to VM in new vSphere PowerCLI

    Hi all

    This message goes hand in hand with may last post and involve the transfer of uncomfortable the new vSphere PowerCLI from the VItoolkit on VMware 3.5.

    One of my scripts uses some functions to add existing VMDK files on an existing virtual machine. The big problem is - this code is a reason any invalid in the CLI of new power.

    As you can see - functions have simple command line with VM, VMDK file and the number of SCSI controller. Can someone hazard a guess then that this process is no longer valid for PowerCLI?

    Thank you in advance: o)

    1. Functions

    # #Examples

        1. Add HD "PC4" "vmfs2" "PC4/PC4.vmdk" "controller SCSI 0".

        2. VM-delete-HD 'name' "disk hard 3" $TRUE ".

    function add-HD {}

    Param ($VMname, $SCSIcntrl, $DSname, $Filename)

    #write - host "adding disc $Filename data $DSname $VMname-VM store."

    $vm = get - View (Get - VM $VMname) USER.USER

    $ds = get - View (Get-Datastore-name $DSname) USER.USER

    {foreach ($dev to $vm.config.hardware.device)}

    If ($dev.deviceInfo.label - eq $SCSIcntrl) {}

    $CntrlKey = $dev.key

    }

    }

    $Unitnumber = 0

    $DevKey = 0

    {foreach ($dev to $vm.config.hardware.device)}

    If ($dev.controllerKey - eq $CntrlKey) {}

    If ($dev. Unitnumber - gt $Unitnumber) {$Unitnumber = $dev. Unitnumber}

    If ($dev.key - gt $DevKey) {$DevKey = $dev.key}

    }

    }

    LogEntry $sLogFile 'DeviceKey is $DEVKEY, UnitNUm is $UnitNUmber, ContrlKey is $CntrlKey.

    $spec = new-Object VMware.Vim.VirtualMachineConfigSpec

    $spec.deviceChange = @)

    $spec.deviceChange += new-Object VMware.Vim.VirtualDeviceConfigSpec

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDisk .device

    $spec.deviceChange [0].device.backing = new-Object VMware.Vim.VirtualDiskFlatVer2BackingInfo

    $spec.deviceChange [0].device.backing.datastore = $ds. MoRef

    $spec.deviceChange [0].device.backing.fileName = "" + $Filename

    $spec.deviceChange [0].device.backing.diskMode = "independent_persistent".

    $spec.deviceChange [0].device.key = $DevKey + 1

      1. UnitNUmber SCSIID 7 is reserved for the controller - so ignore it and move on to 8.

    If ($Unitnumber - eq 6) {$Unitnumber = $Unitnumber + 1}

    $spec.deviceChange [0].device.unitnumber = $Unitnumber + 1

    $spec.deviceChange [0].device.controllerKey = $CntrlKey

    $spec.deviceChange [0] .operation = 'Add '.

    $vm. ReconfigVM_Task ($spec)

    }

    delete-HD {} feature

    Param ($VMname, $HDname, $Delflag)

    #write-host "' disassembly disk for VM $HDname: $VMname" "

    $vm = get - View (Get - VM $VMname) USER.USER

    foreach ($dev in $vm. Config.Hardware.Device) {}

    If ($dev. DeviceInfo.Label - eq $HDname) {}

    $key = $dev. Key

    $name = $dev. Backing.FileName

    }

    }

    $spec = new-Object VMware.Vim.VirtualMachineConfigSpec

    $spec.deviceChange = @)

    $spec.deviceChange += new-Object VMware.Vim.VirtualDeviceConfigSpec

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDevice .device

    $spec.deviceChange [0].device.key = $key

    $spec.deviceChange [0] .operation = 'delete '.

    $vm. ReconfigVM_Task ($spec)

    If {($Delflag)

    $svcRef = new-object VMware.Vim.ManagedObjectReference

    $svcRef.Type = 'ServiceInstance.

    $svcRef.Value = 'ServiceInstance.

    $serviceInstance = get-views $svcRef

    $fileMgr = get-view $serviceInstance.Content.fileManager

    $datacenter = (get-View (Get - VM $VMname |)) Get-Datacenter) USER.USER) .get_MoRef)

    $fileMgr.DeleteDatastoreFile_Task ($name, $datacenter)

    }

    }

    Below the new versions of my HD - Add and Remove-HD functions.

    The functions Add - HD had an error in this line

         $spec.deviceChange[0].device.backing.fileName =" " + $Filename
    

    The function Remove-HD can be optimized in vSPhere.

    With the help of the LayoutEx.Disk property, you can now find all the files that are located behind a virtual disk.

    The new versions are attached because there are some hooks in the code.

  • This virtual machine to become protected vsphere HA and HA can not try to restart after a power failure

    I got a 5.1 cluster with some problems HA.

    a few virtual machines are showing this

    This virtual machine to become protected vsphere HA and HA can not try to restart after a power failure.

    When I try to reconfigure HA on the host. It times out and fails.

    any idea?

    Instead of reconfiguring HA on the concerned host, have you tried to disable HA on the cluster and enable again? See: VMware KB: State of the virtual machine changes from protected to Unprotected

  • VMware vSphere: optimize and [5.5] course is worth doing or not advice to scale

    Hi all

    Need some advice, as I am preparing to take the exam of the VCAP-DCA 5.5 in April.

    Will makes VMware vSphere: optimize and adapt training aid [5.5] or would be using the DCA official study guide book suffice?

    Just take peoples opinons, before I decide to spend money on the course.

    Thank you all very much.

    JIT

    Personally, I think that if you have below you don't take it out not before, then follow the course (unless you miss the VCP and the requirement of course)

    1 watch the video of Pluralsight VCP and VCAP

    2 buy the VCAP-DCA-5 study study guide bonus ebook on the VMware press - practical site reviews includes in the book

    3. go on the official and unofficial study guide CLI guide study

    4. do you have a host laboratory and practice and practice and make sure you only go on all the (MOST important) action plan.

    Enjoy autolab

    5. If you really need to take the course... you can do the lab connect version of the course which is $ 300 to $ 500.

    If the course if the company paid for the course, and he is not from your Pocket then of course the course.  But your hard-earned income is better spend in

    buy yourself gear lab, subscription VMUG and VMware books.

  • Cannot download - VMware vSphere PowerCLI for tenants

    Hi people,

    I'm not able to download VMware vSphere PowerCLI for the R2 version of tenants i.e. 5.1. Go to the page cannot be displayed.

    Please check.

    Kind regards

    Rajesh

    VMware vSphere PowerCLI for tenants

    Seems to work for me from this link.

    Perhaps a local cache in your browser problem, or a problem of Akamai in your area?

  • VSphere APIs and compatibility ESX

    I've implemented the backup of a VMWare VM and application of recovery with vSphere API and VDDK. The development has been done entirely on 5.0 ESX servers. The following discussion provides an overview of how I implemented the restoration.

    http://communities.VMware.com/message/2130483#2130483

    When another person has tested my application, he noted the rollback feature does not work. When I've debugged, I found parameter spec unit to CreateVM_Task behaves differently 5.0 Esx to Esx 4.0. In the case of Esx 5.0, it works perfectly, where as in the case of Esx 4.0, none of the devices that I fill before the CreateVM_Task is created and the restore fails because of this.

    How can I understand the compatibility of the Esx and the vSphereAPI versions? I assumed that the SDK should be retro-compatible with Esx Server? Can someone shed some light how this problem can be solved?

    Thank you

    . / Siva.

    Hi Siva,

    That sounds good, maybe, we'll get you going even faster than I expected:

    As already noted William

    lamw wrote:
    but in general, the more recent editions of vSphere will support previous editions of vSphere. vSphere 5.1 supports vSphere 4.x and 5.0

    the only thing being that if new properties are added to a data in 5.1 object then you can not use in 4.x or 5.0.

    It seems to me that your code is based on 5.0 WSDL generated by gsoap stubs. It is ultimately you generate SOAP requests that are supposed to work with 5.0, 5.1, 6.x one as well now. Yet, when he delivers the SOAP messages to 4.x, it is likely that you include a property that is not defined in the WSDL of 4.x.

    Attached is a diff of the definition WSDL VirtualMachineConfigSpec of 4.0 to 5.0 Quick. Look at line 27 and following

    
    27              
    ====
          !>      
    ====
    28              
    

    Here, you can see that numCoresPerSocket property was not available in 4.0, but was added in 5.0. It is also what we said the documentation centre: for vSphere API 5.0.

    You declare that numCPUs is affected but memoryMB not. Between the two numCoresPerSocket has been inserted to 5.0. It seems that the 4.0 Server reads your VirtualMachineConfigSpec until numCPUs then encounter numCoresPerSocket and abandoned.

    So far my theory.

    What I don't understand is that this seems to happen in silence as you don't declare any exception. Yet, says William

    wlam wrote:
    As you know, there will be new properties in new versions of vSphere such as 5.1, that if you try to assign to an older version of vSphere, it will throw an unknown error...

    As you can learn from the attached diff we serveral more properties that have been added to the 5.0. Might well want to comment on all those in your current code and re-run CreateVM_Task against server 4.0.

    Perhaps this might solve the problem.

  • Auto open when you click on VMware vSphere PowerCLI icon.

    Hello

    Quick question is there a configuration file or a way for me to have powershell cli automaticly "connect-viserver" when I open the icon "VMware vSphere PowerCLI.

    Thank you

    There are several ways to achieve this.

    The best way, in my humble opinion, is to add the Connect-VIServer cmdlet to a PowerShell profile files.

    Just add a line to the file. If you use an authorized account, you can do

    SE connect-VIServer-Server MyServer

    I suggest you use the profile of the current user, in this way that the Connect-VIServer will run only when you start PowerCLI

  • PowerCLI and SCOM2007 - namesake of component snap-&gt; get task

    The two 4.0U1 PowerCLI and Powershell Microsoft Operations Manager 2007 System snap have a command with the same name, get-task. Is it possible to get a work around, so we can use the features of these two snap-ins?

    Is it possible to order PowerCLI can be replaced by something like Get-VITask? Thank you.

    To work around the problem, you can do

    VMware.VimAutomation.Core\Get-Task
    

    or

    $PCLI = "VMware.VimAutomation.Core"
    ....
    & "$PCLI\Get-Task"
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

Maybe you are looking for

  • Must be recharged frequently

    My Apple TV remote seems must recharge frequently - every day - are others that knows as well?

  • Sam 5100 Bluetooth stack do not work

    No matter what the parameter is set to the test, the answer is "Bluetooth is not ready."-definition of COM ports-opening new connectionDebice is turned on both physically (switch) and in the bluetooth Manager.Hardware problem?

  • myRIO C code examples

    Hi all I'm just starting to watch myRIO for use for programming in C labs with the students. Depending on the resources, there is a link to the C code examples, for example. on http://www.NI.com/Tutorial/14619/en/ but this link is broken. Examples ar

  • Update blocking Group Policy settings

    Hello, I have only one admin account on my computer when I installed windows, I chose to not check for updates just to start now when I go into control panel > system and security > windows update > settings I can not change anything and it says on t

  • I can be more open with my Windows Media Player video

    When I go to my msn, or shaw email.when, I'll open a video someone sent me I get the message: Windows Media Player cannot find the file. If you try to read, burn or sync an item that is in your library, the element can point to a file that has been m