Archive

Archive for the ‘vsphere’ Category

vSphere 6 available for download!

13 Mar 2015 Leave a comment

vSphere 6 is live and dowloadable! Since yesterday, not only ESXi 6.0 and vCenter 6.0 (with VSAN 6.0, vSphere Replication, VDP and Orchestrator), but also Site Recovery Manager 6.0 and VMware Integrated Openstack are available.

And also all the new official documentation i available.

Worth mentioning is the VMware Software Manager, a new toolt that simplifies the download of VMware suites and products.

You can find all downloads here: https://my.vmware.com/web/vmware/downloads

and official documentation here: https://www.vmware.com/support/pubs/vsphere-esxi-vcenter-server-6-pubs.html

Categories: vmware, vsphere Tags:

vSphere 6.0 disponibile per il download!

13 Mar 2015 Leave a comment

Ebbene si, finalmente vSphere 6 è disponibile per il dowload! Oltre al nuovo ESXi 6.0 e vCenter 6.0 (con relativa VSAN 6.0 e vSphere Replication, VDP e Orchestrator), è disponibile il nuovo Site Recovery Manager 6.0 e VMware Integrated Openstack.

E ovviamente è ora disponibile anche tutta la nuova documentazione ufficiale.

Degna di nota è l’esistenza di un nuovo tool chiamato VMware Software Manager per il download semplificato dei vari prodotti e suite VMware.

Tutti i download sono disponibili qui: https://my.vmware.com/web/vmware/downloads

e tutta la documentazione qui: https://www.vmware.com/support/pubs/vsphere-esxi-vcenter-server-6-pubs.html

Categories: vmware, vsphere Tags:

Massive VM Advanced Setting check with PowerCLI

11 Mar 2015 Leave a comment

Some time ago, I needed a quick way to check the value of an Advanced VM Setting on all VM of a vCenter. As usual, PowerCLI to the rescue! It’s just a one-liner:

 Get-VM | Get-AdvancedSetting -Name

And with another PowerCLI one-liner I was able to change it massively:

Get-VM | Get-AdvancedSetting -Name | Set-AdvancedSetting -Value ” -Confirm:$false

Categories: vmware, vsphere Tags: , ,

Check massivo degli advanced setting delle VM con PowerCLI

11 Mar 2015 Leave a comment

Mi è capitato di dover fare un check sul valore di un advanced setting su tutte le VM di un vCenter. Anche in questo caso una sola riga di PowerCLI è stata sufficiente, eccola:

 Get-VM | Get-AdvancedSetting -Name

Se poi servisse modificarlo in modo massivo, anche questo si puo’ fare con una singola riga di PowerCLI:

Get-VM | Get-AdvancedSetting -Name  | Set-AdvancedSetting -Value ” -Confirm:$false

Categories: vmware, vsphere Tags: , ,

vCenter 6.0 – le principali architetture di deployment

9 Mar 2015 3 comments

Anche se non è ancora disponibile la release definitiva, grazie ad alcuni documenti ufficiali rilasciati da VMware (in particolare la vCenter Server 6.0 Deployment Guide) è possibile far luce sulle nuove architetture possibili per vCenter 6.0

In vCenter 6.0 i componenti che costituiscono l’installazione sono stati raggruppati in due entità:

  • il vCenter Server
  • il Platform Service Controller (PSC) che comprende il vCenter Single Sign-On, il License Server e la VMware Certificate Authority (VMCA)

E’ cosi’ possibile avere due tipologie di installazione:

  • embedded: tutti i componenti, tranne eventualmente il database, sono installati nella stessa macchina
  • external: il vCenter Server è installato in una macchina e il PSC in un’altra

L’installazione di tipo embedded è raccomandata per le configurazioni standalone con un solo vCenter e senza necessità di replicare il PSC, mentre quella di tipo external è necessaria nel caso di più’ vCenter, di necessità di replicare il PSC o in caso di SSO esterno.

Requisiti

Ci sono alcuni requisiti comuni sia all’installazione del vCenter Windows che per la vCenter Server Appliance (VCSA):

  1. DNS: deve essere funzionante la risoluzione DNS del FQDN, dello short name e il reverse lookup di tutti i sistemi
  2. orario: è necessario che l’ora di tutti i sistemi sia correttamente sincronizzata
  3. password: la password del Single Sign-on deve contenere solo caratteri ASCII

Di questi tre requisiti, il terzo secondo me è da tenere ben presente per evitarsi alcuni “mal di testa” alla SSO 5.1/5.5

 

vCenter su Windows

Per quanto riguarda l’installazione Windows una delle cose più’ interessanti, secondo me, è l’abbandono di SQL Express a favore di PostgreSQL come database locale: con PostgreSQL il nuovo limite supportato è di 20 hosts e 200 VM, decisamente più’ interessante del vecchio limite di 5 host/50VM.
L’aggiornamento alla 6.0 può’ avvenire solo da una 5.0 o successiva e, in caso fosse in uso il db SQL Express, il processo di upgrade lo migrerà a PostgreSQL

 

vCenter Server Appliance

Anche la vCenter Server Appliance utilizza PostgreSQL, ma senza limitazioni (supporta quindi fino a 1000 host/10000VM) e addirittura viene deprecato (anche se ancora supportato) l’uso di database esterni.
Il deploy dell’appliance è possibile solo su host ESXi 5.0 o superiori e l’upgrade è possibile solo dalla versione 5.1 update 3 o superiore.

 

Le architetture di riferimento

Considerando le nuove caratteristiche, VMware individua 6 architetture di riferimento:

  • nuova installazione embedded: è la tipologia piu’ semplice di installazione, raccomandata per ambienti standalone
  • upgrade di un sistema standalone (tutti i componenti sono installati su un’unica macchina): il processo di upgrade si occupa di aggiornare tutti i componenti e di migrare l’eventuale SQL Express a PostgreSQL
  • nuova installazione external: raccomandata per tutti casi tranne lo standalone, è necessario installare prima il PSC e successivamente il vCenter Server, di fatto eseguendo due volte il wizard di installazione
  • upgrade con Single Sign-On esterno: in questo caso è necessario prima aggiornare il Single Sign-On, trasformandolo in PSC e successivamente aggiornare il vCenter
  • nuova installazione Single Sign-On in alta affidabilità: raccomandata in caso di vCenter Server multipli o in caso di requisiti di alti livelli di uptime del Single Sign-On. Questa architettura prevede di installare piu’ PSC dietro a un load balancer opportunamente configurato
  • upgrade di un Single Sign-On in alta affidabilità: in questo caso è necessario aggiornare prima tutti i Single Sign-On a PSC, configurare correttamente il load balancer e aggiornare il vCenter Server

Ovviamente vale la pena ricordarsi che in alcune situazioni l’HA del cluster vSphere puo’ essere sufficiente per garantire il livello di uptime desiderato.

Retrieve vCenter Scheduled Task with PowerCLI

Some days ago, I was asked if there is an ultra quick&easy way to retrieve all vCenter Scheduled Task, and… here is my answer: a PowerCLI one liner!

Here it is:

(Get-View ScheduledTaskManager).ScheduledTask | %{ (Get-View $_).Info }

Be aware that all dates and times are expressed in UTC.

Categories: vmware, vsphere Tags:

Estrarre l’elenco degli Scheduled Task di vCenter con PowerCLI

Qualche giorno fa mi e’ stato chiesto se c’era un modo facile e veloce per estrarre l’elenco degli Scheduled Task di vCenter: ovviamente ho pensato subito a PowerCLI e… si fa tutto con un comando di una sola riga !

Eccolo qui:

(Get-View ScheduledTaskManager).ScheduledTask | %{ (Get-View $_).Info }

 

Nota: le date e gli orari restituiti sono espressi in UTC

Categories: vmware, vsphere Tags:

Import-Export VM notes with PowerCLI

24 Jul 2014 1 comment

In a previous post I blogged about exporting and importing custom attributes, but sometimes you need to do the same also for notes.

A little PowerCLI and all is done quickly.

Export

Just connect to our source vCenter, export all notes and disconnect:

Connect-VIserver -server VCsource.vlab.local
$vmList = Get-VM
$noteList = @()
foreach ($vm in $vmList) {
$row = “” | Select Name, Notes
$row.name = $vm.Name
$row.Notes = $vm | select Notes
$notelist += $row
}
$noteList | Export-Csv “.\exported-notes.csv” –NoTypeInformation

Disconnect-VIServer “*” -Confirm:$False

 

Import

And now lets import all notes:

Connect-VIserver -server VCdest.vlab.local

$noteList = Import-Csv “.\exported-notes.csv”
foreach($nLine in $noteList){
if ( $nLine.Notes -ne “”){
Set-VM -VM $nLine.Name -Notes $nLine.Notes -Confirm:$false
}
}

Disconnect-VIServer “*” -Confirm:$False

Categories: vmware, vsphere Tags: ,

Import-Export delle note delle VM tramite PowerCLI

24 Jul 2014 Leave a comment

Nel precedente post ho presentato un paio di script per importare e esportare i custom attributes, ma capita di aver bisogno di fare la stessa cosa anche per le note delle vm.

Anche in questo caso, con pochissime righe in PowerCLI il tutto si risolve velocemente.

Export

Per esportare è sufficiente connettersi al vCenter, esportare tutte le note e disconnettersi:

Connect-VIserver -server VCsource.vlab.local
$vmList = Get-VM
$noteList = @()
foreach ($vm in $vmList) {
    $row = "" | Select Name, Notes
    $row.name = $vm.Name
    $row.Notes = $vm | select Notes
    $notelist += $row
}
$noteList | Export-Csv ".\exported-notes.csv" –NoTypeInformation

Disconnect-VIServer "*" -Confirm:$False

 

Import

E ora reimportiamo il tutto:

Connect-VIserver -server VCdest.vlab.local

$noteList = Import-Csv ".\exported-notes.csv"
foreach($nLine in $noteList){
    if ( $nLine.Notes -ne ""){
        Set-VM -VM $nLine.Name -Notes $nLine.Notes -Confirm:$false
    }
}

Disconnect-VIServer "*" -Confirm:$False

Categories: vmware, vsphere Tags: ,

Import–Export VM custom attributes from vCenter with PowerCLI

21 Jul 2014 1 comment

Some time ago, during a migration, I needed to migrate all VM custom attributes from a cluster in a first vCenter to another one.

As easy (and boring…) as is to just retype the attributes value, there was over 400 VMs, and I didn’t want to do this by hand.

So…PowerCLI to the rescue! Here the two little script I used for this task.

 

Export

First lets connect to our source vCenter and export all custom attributes:

Connect-VIserver -server VCsource.vlab.local

$attList = @()
$attList = Get-CustomAttribute -TargetType VirtualMachine
$attList | Export-Csv “.\exported-attributes.csv” –NoTypeInformation

then lets export all attributes values and disconnect:

$valueList =@()
Get-cluster CL01 | get-vm | % {
for($i = 0; $i -lt $_.CustomFields.Count; $i ++ ){
$row = “” | Select VMname, FieldKey, FieldValue
$row.VMname = $_.Name
$row.FieldKey = $_.CustomFields.Keys[$i]
$row.FieldValue = $_.CustomFields.Values[$i]
$valueList += $row
}
}
$valueList | Export-Csv “.\exported-attributes-value.csv” -NoTypeInformation

 

Disconnect-VIServer –server “*” -Confirm:$False

 

Import

Ok, now we have all vm moved to the destination vCenter and is time to import all attributes.

First connect to destination vCenter and re-create attributes:

Connect-VIserver -server VCdest.vlab.local

$attList = @()
$attList = Import-Csv “.\exported-attributes.csv”
foreach ($CustAttrib in $attList){
New-CustomAttribute -Name $CustAttrib.Name -TargetType $CustAttrib.TargetType
}

and, at last, lets import all attribute values and disconnect:

$NewAttribs = Import-Csv “.\exported-attributes-value.csv”
foreach($line in $NewAttribs){
# if value is empty, skip it (just to have all the import go faster)
if( $line.FieldValue -ne “”) {
Set-CustomField -Entity (get-vm $line.VMName) -Name $line.FieldKey -Value $line.FieldValue -confirm:$false
}
}

Disconnect-VIServer “*” -Confirm:$False

 

Easy peasy, doesn’t it?  Occhiolino

Categories: vmware, vsphere Tags: ,