For Emergency case Shutdown all Running VM’s

In Emergency case (Power Lost, Backup Power Won’t Start, UPS battery gone bad) it’s fine that you have a script that will shutdown every running VM

######################################################################
# Shutdown All VM’s at Once Emergency case
######################################################################>
CLS
# write-host “Shutdown All VM’s at Once Emergency case”
$viserver = Read-Host ‘What is the name of the Virtual Center Server?’

$choice = “”
while ($choice -notmatch “[y|n]”){
     $choice = read-host “ARE YOU SURE ALL VM’s WILL SHUTDOWN? (Y/N)”
     }

if ($choice -eq “y”){
     Connect-VIServer $viserver
     $vmservers=Get-VM | Where-Object {$_.powerstate -eq ‘PoweredOn’}
     $vmservers | Shutdown-VMGuest -Confirm:$false
     }

Free Hyper9 GuessMyOSToo Plug-in for VI3 and vSphere4

This plug-in replaces generic VM icons in the VI3 and vSphere4 client inventory trees with OS-specific icons for both Windows and Linux guests.

gos-02
System Requirements
The only requirement is Virtual Center 2.5 or higher. The Hyper9 product is NOT required.

Download HERE

BUG in VMWare Toolkit 1.5 tijdens het maken van een Geplande Taak met een Service Account.

image

Ik had een probleempje met een scriptje van Collega Ivo Beerens. Hij heeft een mooi script
geschreven genaamd Healthscript. Dit wou script wou ik implementeren aangezien ik een nieuwe virtual center center server had ingericht.

Ik liep tegen het probleem dat ik het script niet werkend kreeg met een service account user die deze taak moest uitvoeren. Onder ingelogde account werkte het wel.

Oplossing:

Boven aan het powershell script de volgende code toegevoegd en daarna werkte het als een trein.:
#FIX FOR TOOLKIT 1.5
$USER = $env:username
$APPPATH = "C:Documents and Settings" + $USER + "Application Data"
#SET THE APPDATA ENVIRONMENT WHEN NEEDED
if ($env:appdata -eq $null -or $env:appdata -eq 0)
{
$env:appdata = $APPPATH
}

VMware Server 2.0 Tips and Tricks

 

Hierbij sommige  Tips & Tricks van VMWare Server 2.0

1. Use a web browser (Firefox and Internet Explorer are the two officially supported ones) to
connect to http://yourserver:8222 or https://yourserver:8333 if you selected the default
ports during installation/configuration.

2. If you manage from a Windows client then the VI (Virtual Infrastructure) client is also
available which is what is used to manage ESX/ESXi and Virtual Center too. It is available at
https://yourserver:8333/client/VMware-viclient.exe.

3. The VI Client cannot add USB devices to VMs running at hardware versions greater than 4 –
version 7 is required for USB 2.0 support.

4. Specify yourserver:8333 for the connection in the VI Client.

5. The credentials you specify to logon are admin credentials that you would use on the host
even without VMware installed – VMware does not introduce any credentials/accounts
itself.

6. The admin account you use must have a password defined for it or you will not be able to
login.

7. The remote console is a locally installed application which will be installed when the console
tab is first clicked onto.

8. For remote management through firewalls, VPNs or over SSH tunnels, port 902 is also used as well as 8222/8333. Note that during Linux configuration; you may have selected a
different port from 902 as sometimes it can be statically detected as being in use.

9 .Backing up VMs can be achieved in a number of ways:
a. If the VM is not powered up then simply copy all of its files to another location.
b. If the VM is running, take a snapshot and then copy the base disk file(s) to another
location (*.vmdk except *-00001*.vmdk). A new VM can then be constructed using
this disk. Note that you can only have a single snapshot.
c. In a Windows VM, use a VSS (Volume Shadow copy Service) aware backup tool to
create a backup that can then be restored using the same tool to a bare VM.
d. On a Windows host, use a VSS aware backup tool to backup the files that constitute
the VM.

10. If a VM fails to power on and was not shut down properly, check for .lck files/folders and
remove them if they exist as long as the VM definitely is not running.

11. Server 2.0 stores VMs in datastores – a default datastore is created which is calle
“[standard]” and will map to the root of the folder you select during installation.

12. VMs can be run from external USB drives by defining a datastore for the mount point.

13. Remote datastores can also be added – NFS for Linux hosts and CIFS/SMB for Windows.

Bekijk HIER de volledige PDF met Tips & Tricks van VMWare Server 2.0

Translate »