Data Center shutdown Complete weekend activity...

Dear team,

In our environment, we have 22 esx host 4 storage san, 4 fabric switches, network switches 4. every weekend, there is problem of complete power failure will be there, so each client weekend for full on stop data center, so we install full stop that I just want to know what will be recommended for this bee and as precaustion to take before making this kind of activity, so need your help on the same

Will it work this way, if we turned off the entire infrastructure,

(1) fist take the glance of each virtual machine power on each host
(2) then take snap of all the SAN data store that r connected on each host are
(3) make the snap of networking architecture
(4) stop each virtual machines on an esx host,.
(5) stop ESX host
(6) stop SAN storage
7-stop Fabric Switches
(8) stop all network switches

While switch on/off the infrastructure unit will it work that way,

(1) power on network switches, after 5 minutes
(2) after 5 minutes on the fabric power switches
(3) power storage SAN, after 10 minutes
(4) power on all ESX hosts after 45 minutes
(5) power on all the virtual machines on all ESX hosts
(6) cross check all works very well.

Correct if I'm wrong, please help me on the same.

Concerning

Mr. VMware

every weekend he comes from complete power failure

The steps you mentioned certainly works, but I don't see a reason for snapshots. Better make sure that you have a good backup in place. I guess you also have an exact plan on the order in which the power and off the virtual machine.

On the other side, it may be interesting to find out the reason for the failure and eliminate it or think of a suitable UPS system to avoid this procedure.

André

Tags: VMware

Similar Questions

  • SHUTDOWN: waiting for active calls to complete.

    Hello

    environment is HP - UX 11.23, Version Oracle 9.2.0.5

    We had an ORA-600 error yesterday. We reported this error to support and suggested to install patch 9.2. 0.8

    However, I have a question. As you can see from the output to the alert log file it took a long time to stop the instance using the immediate option:

    Sun Nov 9 17:33:58 2008
    Closure of proceedings: in addition to logons disabled
    Closure of proceedings (immediate)
    License of the high waters = 454
    Sun Nov 9 17:39:07 2008
    Ongoing call for the program process 3991 user 'oracle' "oracle@xyz (TNS V1 - V3)"
    SHUTDOWN: waiting for active calls to complete.
    Sun Nov 9 17:50:36 2008
    ALTER DATABASE CLOSE NORMAL

    Is there anything, can be done in such a situation to accelerate the closure of the proceeding?

    Oracle database has an ease of use and a center of streams queues / advanced.
    These installations are possible by putting in place some auxiliary processes.
    These settings govern the number of processes.
    Their definition to 0 turns completely off the installation.
    You change the setting in memory, like you, that you have rebounded from the database, it will return to the value in the spfile and facilities will work again.
    Deactivation is especially useful when you that facilities are frequently used, that is to say you have a job running every 30 seconds.
    In the past, several databases, it was the only way to allow an immediate stop.

    Hope this helps,

    --
    Sybrand Bakker
    Senior Oracle DBA

  • FabricPath or OTV between two data center using Direct fiber cable

    Hello

    I have two data center both of them has the same equipment N7k, N5k and N2k, and we want the dataCenter being active/active, I'm really confused to use OTV or FabricPath characteristic, if someone can help me with my scenario and explain to me what is the best solution and advantage and disadvantage between OTV and PabrcPath.

    Many thanks in advance

    Hi Steven,

    No problem, I'll go through your points as completely as possible. I advise you to read more about these protocols, maybe if you have access to INE or similar, see their videos on this. I would also like to say again that I have not seen all documentation Cisco indicating that FabricPath to be used as a DCI.

    With regard to the way fabric you ask what follows...

     1. only can use it between two datacenters of you have more we can't, please correct me?

    No, you can use the path of fabric with more than two data centers, but even with OTV, you can use it with more than two data centers.

     2. HSRP localization can not be implemented as OTV. However You can have two differnet Gateways at the Data Center 1 and 2 using two different HSRP groups. If server is moved dynamically from, (i didn't understand this point can you please explain with example?

    OK, so this is a GREAT topic. Location of HSRP CAN be implemented with OTV, but cannot be implemented with fabric path. First hop redundancy protocols can be localized and is supported by Cisco with OTV, this basically allows the same default gateway to reside in two of your data centers providing the ACTIVE/ACTIVE configuration. So no matter where your VM is, they did not change their default, even if gateway your servers to move to the other datacenter.

    If we didn't have this, we would have only an active member of HSRP divided between DC and things would be extremely troublesome in regard to traffic flows. A virtual machine in DC2 VLAN needs to talk to host in VLAN B. But the default gateway is completely in DC1. So frame is sent to the ICD in DC1, then the gateway by default, routes packets VLAN B. This VLAN B lies in fact in DC2, so now it has to go all the way back to DC2. You get my point...? :)

    With localization happen only local to the domain controller. If all servers / VMS in the domain controller can speak locally to its "own" default gateway.

     3. unknown unicast flooding (can you give me an example?)

    Unknown unicast traffic is unicast packets/images with unknown destination mac address. By default, switches are flooding this type of traffic to all ports in the VLAN. With path of fabric that would take place during your DCI, but with OTV, it is all taken care locally, so massive savings on bandwidth here and it is much more effective.

     4. ARP optimization between Data Center (can you give an example regarding ARP optimization?)

    There is another function of OTV, which makes it far superior on the way of tissue. Essentially, we are reducing the volume of traffic passing through the transport infrastructure (i.e. ICD)

    When ARP, host in DC1 to host that responds in DC2, we use links and there is travel time of package that might be minimal, but is not the most optimal. OTV AED - or edge device spy ARP response and subsequently knows that this mapping exists from there. ARP takes place after the first Protocol, the EDA almost proxy ARP to DC1 so the ARP request locally does not have to travel to DC2.

     5. Typically two flows (Odd VLANs by OTV-VDC-1 and even vlans by OTV-VDC-2) carry the entire layer 2 traffic flow between the two Data Centes. Hence the load balancing the links is not efficient. ( (can you explain compare with FabricPath if you have example?)

    IMHO, it's bad and good. Balance the workload of the OTV if you have more than an AED on site. VLAN strange appointment via an AED, even numbered VLAN go through the other. Depending on traffic on VLANs, this could become unbalanced. Fabric used by all its links to mac addresses 'route' to the respective SID - ID switch she needs to do. So perhaps a better uniformity of split here.

     6. VLAN scalability for OTV is lower than FabricPath as of this content writing. (can you explain what this mean i didn't understand it)

    I completely disagree with this comment. I too do not understand.

     7. Resiliency of FabricPath network is better than OTV in some failure scenarios.(can me an example ?)

    I also disagree with that. Resilience of path of fabric could be same as OTV or perhaps better. However, my personal experience is that OTV fine tuning with things like BFD failover is much faster!

    Fabric is good because the control of aircraft ISIS and its operation is admirable, but could say the same for the OTV.

    Lets say one of the DCI links had to die, the transmission of the tissue path would continue through the other links, then perhaps for low latency, high frequency, environments that would be beneficial. OTV will change the EDA and re - learn mac, announced by other AEDS, addresses, but as I said, the time could be extremely minimal and tuning. This isn't a big deal, unless you need under second time convergence!

    I hope that I have answered your questions, I recommend use for your DCI OTV, use the path of fabric for your inside of local switching in your DC. This has been implemented repeatedly and the links I sent you the models validated Cisco also point out.

    Remember - fabric has been built to be a step towards TRILL, and replacement of protocols spanning-tree, OTV was built especially for the dci. They are both built and examples of specific design. It makes no sense to get these confused or mixed up, unless there is a real and pressing the case.

    Joel conclusion is right, use the right tools for the job. If the use case is good for the FP then OK, if not, OTV.

    Rcmnd - reading http://www.packetmischief.ca/2013/04/23/DCI-series-overlay-transport-vir...

    These are just my thoughts.

    Bilal (CCIE #45032)

  • Deliver the addition of new set of switches stacked as an extension to the network in another data center building

    Hello

    I was wondering if someone can help me, I am a humble sysadmin with no real network admin training.

    I have the following Setup to work in a rack in our data center.

    2 x Dell Sonicwall NSA2400
    2 x stacked switches Dell Powerconnect N5524

    A Sonicwall is connected to each switch (active-passive)

    Every Dell server has 2 x nics in servile failover mode, one of each network card connected to each switch

    This is done to allow a full redundancy for network, cable, switches and Firewall interface cards. It works well.

    The above mentioned rack is now full and we ordered a new rack that is in a different datacenter of construction on the same site. We decided to buy another set of stacked switches and _extend_ (no battery) these via optical SPF on the rack on the other.

    The idea is that we still have the switch fault tolerance but link to two grids through 10 GB. The new switches are 2 x Dell Powerconnect N2048 and have been implemented stacked with any connected devices.

    I have implemented SPF ports on both switches to be a junction ports and connected the two sets of switches, unfortunately our site went offline, our alert went ballistic and no servers could not talk to each other!

    Quickly, I unplugged the new switches and after a worrisome 10 alerts deleted seconds and the site is back online.

    I don't know why this has happened and reflected on the STP parameters that my googleing seem well. I don't know I'm missing something basic.

    I'll post a framework and a diagram in a follow-up post

    Which is no doubt tree covering the shot weight. It is a good idea to assign lower priority to the main switch. Generally, your root switch will be the one that plugs into the firewall. Definition of priority on the main switch to 4096, it will make the root switch. So as you work your way through different layers of the network, increase the priority. Access layer switches can be left by default.

    I would also check the physical connections for loops. In situations where you have multiple connections switch, make sure that these ports are configured in a SHIFT.

    Keep us informed.

  • Branch 5505, 1 circuit ISP, Dual - peer VPN Configuration for Data Center & Track Options

    Hi all

    I have a data center with two lines of ISP redundancy and two ASA 5520 for redundancy VPN to my branches.  Each of my branches has 1 ASA 5505 with a base license and 1 ISP circuit. Currently all my VPN tunnels are built for data center main circuit ISP only, so if one goes down, I'm toast.  I need to fix this. Problem is, I don't know how I can control failover on 5505 with 1 single line branch.  Please see my picture for an example of how he looks at it right now.

    So the problem is that the data center LAN my branch has to go to is identical regardless of which circuit of data center is in the. And I know the ASA rules say only 1 VPN tunnel can be active at a time if flow are the same.  So in this case, I know you usually do:

    card crypto outside_map 1 set 12.x.xxx.20 50.xxx.xx.190 counterpart

    and then configure route followed to control when cut down the primary counterpart and turn back up by peers. But where I have only 1 ISP on the side of the branch, I'll only have 1 default route: route outside 0.0.0.0 0.0.0.0 3.3.3.2 1, will be used that the active end counterpart is the primary or the secondary data center. Also, since I did not have a second track, I can't configure followed on the main road with an SLA that defines the trigger conditions, because there is nothing to ensure the follow-up of the routing.

    How is - a would handle a situation like this? Are there other features that can be taken off the roads?  I really need to be able to define "num-package 5 ' in ALS so my sites are not beat all day, but once again, without something to follow, I can't really set up a meaningful SLAS.  Any help is appreciated.

    Thanks for the additional explanation. It helps to clarify your environment. EIGRP running on the Remote would be a nice option, but I'm not sure that it is supported on the SAA. I ran EIGRP to remote peers using IOS routers (using the two ACCORD with IPsec and VTI tunnels tunnels) and it was very effective. But on the SAA, I believe that we must seek an alternative.

    It seems to me that using reverse road Injection as part of your VPN site-to-site should work. With IPP the ASA inserts a static route to remote resources when the VPN tunnel is negotiated and traffic can flow. If you redistribute the static in EIGRP EIGRP then must learn the ways of any ASA a currently active tunnel. And who should provide the dynamic rollover you need.

    HTH

    Rick

  • Migration Oracle RAC to the new data center

    Hi all

    We are 'legacy' Oracle 11 G RAC cluster from another company and I am looking for a way to migrate with the minimum of downtime. Our team has no CARS, nor database administrator Oracle also experience.

    We intend to test the migration by cloning the environment a few weeks before and just see if everything is OK.

    Question is, what is the best way to migrate this RAC cluster and it's data to a new data center? Reinstallation of the operating system (Linux) and recreate the RAC cluster are not an option I want to examine.

    For example, in the land of SQL Server, we can use sending newspapers or replication to keep a copy of the database in the new data center as close as possible direct database (data-wise). Date of commissioning, we stop the direct instance, run last restore log or something else, then set up the databases on the new data center.

    Thanks in advance.

    Data Guard. It is the name of "log shipping" feature Oracle. It's probably closer to always on SQL Server availability groups, except that the Oracle database is a large group.

    I speak not Active Data Guard which is an extra cost that gives options on top of Data Guard.

    HTH,

    Brian

  • Migrate to the new data center

    Hi all

    I want to migrate to a display of a new data center environment in a different physical location.

    I like to keep the original ip addresses and FQDNs.

    Is it best practice for this type of migration methods?

    I have two drivers, composer, brokers security server, 160 related clones with persistent records.

    We do not have a connection in fiber between the sites, so cannot perform a rebalancing.

    There will be a cut-over on the last weekend.

    Concerning

    John

    You can use something like veeam vSphere replication to copy virtual machines to the other site and then just turn the 'old' off the coast and the new ones on. Your biggest problem will be changing hosts. Only other option might be to physically move the old hardware to the new site. Persistent drives will be a pain. I would like to have more useful for you answers.

  • Script to get the tree of data center

    Hi all

    I want to return a complete tree of data through script task centers.

    example:

    Datacenter1:

    CLUSTER1:

    Host1:

    Host2:

    VM1:

    VM2

    When I try to enumerate the data center to get this Cluster fails. Can anyone help on this?

    MyScript:

    var myDatacenters = VcPlugin.getAllDatacenters ();

    for each (i = 0; i < myDatacenters.length; i ++)

    {

    for each (mycluster in myDatacenters [i] .cluster)

    {

    System.Debug (cluster. (Name)

    for each (myHostSystem to myCluster.host)

    {

    System.Debug (myHostSystem.Name);

    for each (myVMs to myHostSystem.vm)

    {

    if(myVMs.isTemplate==true)

    {

    System.Debug (myVMs.Name);

    }

    }

    }

    for each (myDatastore to myCluster.datastore)

    {

    System.Debug (myDatastore.Name);

    mytotalDatastoreCapacity += myVcDatastore.summary.capacity;

    mytotalDatastoreFreeSpace += myVcDatastore.summary.freeSpace;

    }

    }

    }

    Hi LuckyT,

    There is no attribute VcDatacenter.cluster, you could use VcPlugin.getAllClusterComputeResources () instead.

    But I found a code on my environment facing maybe also your needs:

    for each ( var myDatacenter in VcPlugin.allDatacenters ) {
      forEachChildEntity ( myDatacenter );
    }
    
    function forEachChildEntity( myChildEntity ) {
      switch ( true ) {
      case myChildEntity instanceof VcDatacenter:
      System.log( "Datacenter:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.hostFolder.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      for each ( var myChildEntitysChildEntity in myChildEntity.datastoreFolder.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      for each ( var myChildEntitysChildEntity in myChildEntity.networkFolder.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      for each ( var myChildEntitysChildEntity in myChildEntity.vmFolder.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcFolder:
      System.log( "Folder:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcClusterComputeResource:
      System.log( "Cluster:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.resourcePool.resourcePool ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcResourcePool:
      System.log( "ResourcePool:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.resourcePool ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcVmwareDistributedVirtualSwitch:
      System.log( "DV Switch:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.portgroup ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcDistributedVirtualPortgroup:
      System.log( "Portgroup:" + myChildEntity.name );
      break;
      case myChildEntity instanceof VcStoragePod:
      System.log( "StoragePod:" + myChildEntity.name );
      break;
      case myChildEntity instanceof VcVirtualMachine:
      System.log( "VirtualMachine:" + myChildEntity.name );
      break;
      default:
      System.log( "Unknown:" + myChildEntity.name );
      break;
      }
    }
    

    Kind regards

    Chris

  • NFS share for one (1) added when adding to a new host in the existing data center

    I'm sure it's a simple answer, but I've been beating my head on the wall, trying to find a solution. The scenario is as follows:

    1 Vcenter has several hosts in different groups. All built at the same time with a NFS share that is shared among all.

    2. I add a new host to the data center (I tried independently and also added to a cluster as well).

    3. the new host sees its local disk as a data store, as expected, but I have to add the shared NFS datastore.

    4. at the level of the host, I go to configuration-storage-add storage and the NFS share.

    It shows and normal with NFS (1) as the name. I can't rename it as it says THAT NFS already exist. I understand that there are in the vcenter DB, but how to add this new host or host an existing environment and maintain the name of the NFS share? vCenter 5.5, 5.5 esxi

    Thanks for your help

    Neil

    finally found the problem,

    the mounting data store I used FQDN.domain.com /Datashare

    I needed to use the FULL domain. DOMAIN.COM /Datashare

    Plugs in the name of area COMPLETE the variance in the symbolic name that caused the problem.

  • Data center or a Cluster

    Can I create a data center or a cluster? I have 2 computers esxi 5 managed by vcenter. They have about 5-7 VM s between the 2. If these two machines to put in a cluster basically makes like a machine, allowing them to share resources and enabling HA. Then you would want all your machines to esxi on 1 domain under a cluster, which allows you a lot more resources? If that's true then why you just want to add a machine data Center? As I understand it, this seems a waste of resources to me. I'm trying to understand the best config for my domain.  Can you help me understand?

    If you want / need HA and DRS, you use the cluster option.    We wanted only Vmotion and Svmotion so we have never activated HA or DRS so we just add our hosts data Center.

  • The migration of the VM from ESX 3.5 data center to data center inside the same building Vsphere

    Hi experts,

    Currently, we have 5 servers ESX 3.5 and a San in a shelter in the United Kingdom. This kit is now over 3 years old and the company replaces the complete kit with a new SAN, new servers and Vsphere 4.0.

    We have the opportunity to get new equipment to the top and running in the same shelter in Britain and are therefore able to run cable network between the two cabins if necessary.

    What is the best way to migrate existing virtual machines from the old environment running to the new environment running Vsphere ESX 3.5? As mentioned only the two cabins will run in the same shelter so nothing needs to go on a WAN link.

    IM keen to not load the machines on a USB key and move like that if I can help it. It appears from the research you cannot VMotion from one datacenter to another data center, however I can Storage VMotion between the two by using a method of migration cold?

    Any help will be appreciated, thanks

    agile1983 wrote:

    Disconnect a host ESX to the old environment, connect it to the new environment. (this means now that the old host as part of the new vsphere cluster can still see the old SAN?)  Then use this host as the link between the two San as you can see both of them?)

    Yes, presentation of the old drive will still be available on the assumption that it was not presentation of your San.  You can use a transit Host, which means that all the LUNS of the old environment and the new are presented to this host, but there will be a migration in a timely.  You have to vMotion invited to this host, unplug off the old environment and then in the new sVMotion (move the host and data store) to the new.  When this is done, unplug this transit host environment and add in the old, vmotion... Rinse and repeat.   Ideally, a presentation of the new LUNS to the old ESX host would be much faster.  In this way, you can bring your old environment together in the new. Make sense?

    When I disconnect and reconnect the old host to the new environment, which also happens to the virtual machines on this host? I need to move temporarily turned off?

    all comments will continue to operate without interruption.

  • Best practices installation CARS in two areas of data center?

    Data Center has two distinct areas.
    In each area, we have a storage system and a rac node.

    We will install RAC 11 GR 2 ASM.

    For data, we want to use diskgroup + DATA, normal redundancy mirrored on two storage systems.

    CRS + vote, we want to use diskgroup + CRS, normal redundancy.
    But for diskgroup CRS + vote with normal redundancy, there are 3 LUNS and we have only 2 storage systems.
    In my view, that the third logical unit number is necessary to avoid situations of split brain.

    If we put two LUNS to storage lun #1 and the other for storage #2, what will happen when storage faills #1 - it means that two of the three disks for diskgroup + CRS are inaccessible?
    What will happen when all the material in the #1 box fails?
    Is the human intervention: at the time of the failure, which #1 area rises again?

    Is there a best practice for configuration 2-zone 2-storage cars?

    Joachim

    Hello

    With regard to the vote of the files are concerned, that a node must be able to access more than half of the files with the right to vote at any time (simple majority). In order to be able to tolerate failure of n files in vote, need at least 2n + 1 configured. (n = number of files with voting rights) for the cluster.
    The problem in a stretch cluster configuration, is that most of the facilities use only two storage systems (one on each site), which means that the site that hosts the majority of voting records is a potential single point of failure for the entire cluster. If the storage or the site where the files of n + 1 vote is configured fails, the entire cluster will go down, because Oracle Clusterware will lose the majority of the files.
    To avoid a complete cluster failure, Oracle will support a third vote file on a cheap lowend, standard NFS mounted device somewhere in the network. Oracle recommends the file NFS vote on a dedicated server, which belongs to a production environment.

    The white paper below allows you to accomplish:
    http://www.Oracle.com/technetwork/database/Clusterware/overview/grid-infra-thirdvoteonnfs-131158.PDF

    Also with regard to the configuration of the vote and OCR (11.2), when you use ASM. How they should be stored?
    I recommend that you read:
    {message: id = 10028550}

    Kind regards
    Levi Pereira

  • example of Perl to get the host data center

    Hi all

    I try to get the data center for a specific host.  Now I can get the full list of data centers with:

    use strict;

    use warnings;

    use VMware::VIM2Runtime;

    use VMware::VILib;

    OPTS::parse();

    OPTS::Validate();

    Util::Connect();

    My $dcenter_views = Vim::find_entity_views (view_type = & gt; "Data center");

    {foreach (@$dcenter_views)}

    Print $_ - & gt; name. "," . $_ - & gt; name. ";;";

    }

    But I can't seem to find a way that works to get it to only a specific host, rather then a complete list.  Could someone please provide an example of how to do this?

    So I cleaned up your script a little, mostly some optimizations.  I used the construction in the occupied Palestinian territories: module to add a host name parameter to the script instead of using ARGV.  I changed it so it checks for a valid host view before you start your loop, no point in a loop in data centers, if your host name is not a valid real hostname in your inventory of VI.  Take a look at the label of the LOOP, I cleaned up.   You want to leave the loop after you find the data center.

    Just to show you how much faster my original script is logical, I wrote it also another version of my script using the Perl toolkit.  It was > 3.5s faster on my independent ESX host.  It is largely because find_entity_view() functions essentially look the whole game ManagedObject property reference, which is pretty intensive.  This gets quite slow in a larger environment and is compounded in a nested loop.  Usually, I try to avoid the use of find_entity_view() strongly in my scripts for this reason.

    Do not hesitate to work with whatever version you like best.  I think the good scripts to do the work.

    Find_entity_views() using nested:

    #!/usr/bin/perl -w
    
    use strict;
    use warnings;
    
    use VMware::VIRuntime;
    
    my %opts = (
         hostname => {
         type => "=s",
         variable => "HOSTNAME",
         help => "Name of managed ESX host",
         required => 1,
         }
    );
    Opts::add_options(%opts);
    Opts::parse();
    Opts::validate();
    
    Util::connect();
    
    my ($host_views, $datacenter, $hostname);
    $hostname = Opts::get_option('hostname');
    
    my $host = Vim::find_entity_view(
         view_type => 'HostSystem',
         filter => { name => $hostname },
    );
    
    unless (defined $host) {
         Util::disconnect();
         die "No host matching '$hostname' found.\n";
    }
    
    my $datacenter_view = Vim::find_entity_views(view_type => 'Datacenter');
    
    LOOP: foreach (@$datacenter_view)
    {
         $datacenter = $_->name;
         $host_views = Vim::find_entity_views(
              view_type => 'HostSystem', begin_entity => $_
         );
    
         foreach (@$host_views)
         {
              if ($_->name eq $host->name)
              {
                   print "$datacenter\n";
                   last LOOP;
    
              }
         }
    }
    
    Util::disconnect();
    

    The sample output:

    $time perl test.pl --server=172.16.14.51 --username=root --password=vmware --hostname=ESX-01.vmwlab.local
    ha-datacenter
    
    real     0m7.502s
    user     0m1.872s
    sys     0m0.078s
    

    By using the property parent ManagedObject:

    #!/usr/bin/perl -w
    
    use strict;
    use warnings;
    
    use VMware::VIRuntime;
    
    my %opts = (
         hostname => {
         type => "=s",
         variable => "HOSTNAME",
         help => "Name of managed ESX host",
         required => 1,
         }
    );
    Opts::add_options(%opts);
    Opts::parse();
    Opts::validate();
    
    Util::connect();
    
    my $hostname = Opts::get_option('hostname');
    
    my $entity_view;
    sub FindDatacenter
    {
    
         my ($entity) = shift;
    
         unless ( defined $entity )
         {
              print "Root folder reached and datacenter not found!\n";
              return;
         }
         if($entity->type eq "Datacenter")
         {
              my $datacenter_view = Vim::get_view(mo_ref => $entity, properties =>  \['name']); # remove the \ before the property list.
    
              print "Datacenter for HostSystem '" . $hostname . "' = " . $datacenter_view->name . "\n";
              return;
         }
    
         $entity_view = Vim::get_view(mo_ref => $entity, properties => \['parent']); # remove the \ before the property list.
         FindDatacenter($entity_view->parent);
    }
    
    my $host = Vim::find_entity_view(
         view_type => 'HostSystem',
         filter => { name => $hostname },
    );
    
    unless (defined $host)
    {
         die "No host matching \'$hostname\' found.\n";     
    
    }
    
    FindDatacenter($host->parent);
    
    Util::disconnect();
    

    The sample output:

    $time perl test2.pl --server=172.16.14.51 --username=root --password=vmware --hostname=ESX-01.vmwlab.local
    Datacenter for HostSystem 'ESX-01.vmwlab.local' = ha-datacenter
    
    real     0m4.326s
    user     0m1.429s
    sys     0m0.072s
    
  • Cannot complete the update of iOS for my iPad, the "the activation server is temporarily unavailable" message keeps popping up? Suggestions as to how I could complete the activation?

    Suggestions as to how I could complete the activation of my iPad after iOS update?

    I tried for 2 days now to complete the update of iOS on my iPad. Everything was going fine until activation, as I tried to continue, the message "your iPad could not be activated because the activation server is temporarily unavailable" keeps popping up. If anyone has suggestions as to how I could complete the process?

    Thank you.

    I have the same problem with you. There is no suggestions now. It seems that the problem exists only on the IPad 2

  • I would take my existing Server 2008 and upgrade to Server 2012 and the purchase of a virtual server in a data center

    Original title:

    Virtualization server 2012

    I got too many answers to this question. I need the correct answer before buying any CALs galore.

    I would take my existing Server 2008 and upgrade to Server 2012 and the purchase of a virtual server in a data center. I have 25 computers that need to communicate with the server throughout the day, all the different machines. I want to know the best option without breaking the Bank. I permit the data center included in the package to my server.

    Try asking in the Windows Server forum:
    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

Maybe you are looking for