Friday, 14 December 2012

Host Profile Error: host state doesn't match specification SATP configuration for device


host state doesn't match specification SATP configuration for device
To disable the PSA and NMP profiles in the vSphere Client:
  1. Log into the vCenter using the VI Client.
  2. Under the Home view, click Host Profiles under Management.
  3. In the Host Profiles view, right click the host profile and select the second option, Enable/Disable Profile Configuration.
  4. Expand Storage Configuration.
  5. Expand Pluggable Storage Architecture (PSA) configuration.
  6. Deselect the PSA Device Configuration profile.
  7. Expand Native Mulitpathing (NMP).
  8. Expand PSP and SATP Configuration for NMP Devices.
  9. Deselect PSP configuration for and SATP configuration for
  10. Click OK.
  11. In Profile compliance, click Check compliance

Tuesday, 11 December 2012

Creation of SQL DB for vCenter 5.1

http://pubs.vmware.com/vsphere-51/topic/com.vmware.vsphere.install.doc/GUID-36B92A8C-074A-4657-9938-62AB97225B91.html
From the website above do the following in this order:

1. Create a SQL Server Database and User for vCenter Server
2. Set Database Permissions By Manually Creating Database Roles and the VMW Schema
3. Set Database Permissions by Using the dbo Schema and the db_owner Database Role

OR using scripts...make vpxuser has DB Owner

1. Create a SQL Server Database and User for vCenter Server


use [master] 
go 
CREATE DATABASE [VCDB] ON PRIMARY 
(NAME = N'vcdb', FILENAME = N'C:\VCDB.mdf', SIZE = 2000KB, FILEGROWTH = 10% ) 
LOG ON 
(NAME = N'vcdb_log', FILENAME = N'C:\VCDB.ldf', SIZE = 1000KB, FILEGROWTH = 10%) 
COLLATE SQL_Latin1_General_CP1_CI_AS 
go
use VCDB 
go 
sp_addlogin @loginame=[vpxuser], @passwd=N'vpxuser!0', @defdb='VCDB', @deflanguage='us_english'
go 
ALTER LOGIN [vpxuser] WITH CHECK_POLICY = OFF 
go 
CREATE USER [vpxuser] for LOGIN [vpxuser]
go
use MSDB
go
CREATE USER [vpxuser] for LOGIN [vpxuser]
go


2. Use a Script to Create a Microsoft SQL Server Database Schema and Roles

Use [VCDB]
CREATE SCHEMA [VMW]
go
ALTER USER [vpxuser] WITH DEFAULT_SCHEMA =[VMW]
go

if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = 'VC_ADMIN_ROLE')
CREATE ROLE VC_ADMIN_ROLE;
GRANT ALTER ON SCHEMA :: [VMW] to VC_ADMIN_ROLE;
GRANT REFERENCES ON SCHEMA :: [VMW] to VC_ADMIN_ROLE;
GRANT INSERT ON SCHEMA ::  [VMW] to VC_ADMIN_ROLE;

GRANT CREATE TABLE to VC_ADMIN_ROLE;
GRANT CREATE VIEW to VC_ADMIN_ROLE;
GRANT CREATE Procedure to VC_ADMIN_ROLE;

if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = 'VC_USER_ROLE')
CREATE ROLE VC_USER_ROLE
go
GRANT SELECT ON SCHEMA ::  [VMW] to VC_USER_ROLE
go
GRANT INSERT ON SCHEMA ::  [VMW] to VC_USER_ROLE
go
GRANT DELETE ON SCHEMA ::  [VMW] to VC_USER_ROLE
go
GRANT UPDATE ON SCHEMA ::  [VMW] to VC_USER_ROLE
go
GRANT EXECUTE ON SCHEMA :: [VMW] to VC_USER_ROLE
go
sp_addrolemember VC_USER_ROLE , [vpxuser]
go
sp_addrolemember VC_ADMIN_ROLE , [vpxuser]
go
use MSDB
go
if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = 'VC_ADMIN_ROLE')
CREATE ROLE VC_ADMIN_ROLE;
go
GRANT SELECT on msdb.dbo.syscategories to VC_ADMIN_ROLE
go
GRANT SELECT on msdb.dbo.sysjobsteps to VC_ADMIN_ROLE
go
GRANT SELECT ON msdb.dbo.sysjobs to VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_job TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_delete_job TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_jobstep TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_update_job TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_jobserver TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_jobschedule TO VC_ADMIN_ROLE
go
GRANT EXECUTE ON msdb.dbo.sp_add_category TO VC_ADMIN_ROLE
go
sp_addrolemember VC_ADMIN_ROLE , [vpxuser]
go


3. Use a Script to Create a vCenter Server User by Using the dbo Schema and db_owner Database Role


use VCDB
go
sp_addrolemember @rolename = 'db_owner', @membername = 'vpxuser'
go
use MSDB
go
sp_addrolemember @rolename = 'db_owner', @membername = 'vpxuser'
go


Friday, 7 December 2012

VMware 5 Host Profiles prompts for MAC address


VMware 5 Host Profiles prompts for MAC address

host profile Prompt the user for the MAC Address
thanks to Paul Whitman
http://blog.eight02.com/2012/02/vmware-5-host-profiles-prompts-for-mac.html

Thursday, 6 December 2012

Host Profile error call hostprofilemanager.createprofile active directory all

Work around for this error when trying to create a host profile is to enable the "active directory all" in the host filewall

call hostprofilemanager.createprofile

Monday, 10 September 2012

Unplanned Device Loss

Unplanned device loss is a condition that occurs when your ESXi host permanently loses connection to a storage device.

To verify the status of the device, see Check the Connection Status of a Storage Device.
To unmount a datastore, see Unmount VMFS or NFS Datastores.
To perform a rescan, see Perform Storage Rescan.


http://pubs.vmware.com/vsphere-50/topic/com.vmware.vsphere.storage.doc_50/GUID-BA39DB47-F8DB-4945-B061-1B6FF3DD12E1.html

Thursday, 31 May 2012

power off / get state of vm vim-cmd


from VMware's own www

Using the ESXi command-line utility vim-cmd to power off the virtual machine

  1. On the ESXi console, enter Tech Support mode and log in as root. 
  2. Get a list of all registered virtual machines, identified by their VMID, Display Name, and path to the .vmx configuration file, using this command:

    vim-cmd vmsvc/getallvms

  3. To get the current state of a virtual machine
    vim-cmd vmsvc/power.getstate VMID
  4. Power off the virtual machine using the VMID found in Step 2 and run:

    vim-cmd vmsvc/power.off VMID

    Note: If the virtual machine fails to power off, use the following command:
    vim-cmd vmsvc/power.shutdownVMID

vSphere CLI


From VMware's own website...vSphere CLI commands
Documentation Description
esxcli command Lists descriptions of esxcli commands.
esxcli fcoe FCOE (Fibre Channel over Ethernet) comands
esxcli hardware Hardware namespace. Used primarily for extracting information about the current system setup.
esxcli iscsi iSCSI namespace for minitoring and managing hardware and software iSCSI.
esxcli license License management commands.
esxcli network Network namespace for managing virtual networking including virtual switches and VMkernel network interfaces.
esxcli software Software namespace. Includes commands for managing and installing image profiles and VIBs.
esxcli storage Includes core storage commands and other storage management commands.
esxcli system System monitoring and management command.
esxcli vm Namespace for listing virtual machines and shutting them down forcefully.
svmotion Moves a virtual machine's configuration file and optionally its disks while the virtual machine is running. Must run against a vCenter Server system.
vicfg-advcfg Performs advanced configuration including enabling and disabling CIM providers. Use this command as instructed by VMware.
vicfg-authconfig Manages Active Directory authentication.
vicfg-cfgbackup Backs up the configuration data of an ESXi system and restores previously saved configuration data.
vicfg-dns.pl Specifies an ESX/ESXi host's DNS (Domain Name Server) configuration.
vicfg-dumppart Manages diagnostic partitions.
vicfg-hostops Allows you to start, stop, and examine ESX/ESXi hosts and to instruct them to enter maintenance mode and exit from maintenance mode.
vicfg-ipsec Supports setup of IPSec.
vicfg-iscsi Manages iSCSI storage.
vicfg-module Enables VMkernel options. Use this command with the options listed, or as instructed by VMware.
vicfg-mpath Displays information about storage array paths and allows you to change a path's state.
vicfg-mpath35 Configures multipath settings for Fibre Channel or iSCSI LUNs.
vicfg-nas Manages NAS file systems.
vicfg-nics Manages the ESX/ESXi host's NICs (uplink adapters).
vicfg-ntp Specifies the NTP (Network Time Protocol) server.
vicfg-rescan Rescans the storage configuration.
vicfg-route Lists or changes the ESX/ESXi host's route entry (IP gateway).
vicfg-scsidevs Finds available LUNs.
vicfg-snmp Manages the Simple Network Management Protocol (SNMP) agent.
vicfg-syslog Specifies the syslog server and the port to connect to that server for ESXi hosts.
vicfg-user Creates, modifies, deletes, and lists local direct access users and groups of users.
vicfg-vmknic Adds, deletes, and modifies virtual network adapters (VMkernel NICs).
vicfg-volume Supports resignaturing a VMFS snapshot volume and mounting and unmounting the snapshot volume.
vicfg-vswitch Adds or removes virtual switches or vNetwork Distributed Switches, or modifies switch settings.
vifs.pl Performs file system operations such as retrieving and uploading files on the remote server.
vihostupdate Manages updates of ESX/ESXi hosts. Use vihostupdate35 for ESXi 3.5 hosts.
vihostupdate35 Manages updates of ESX/ESXi version 3.5 hosts.
vmkfstools Creates and manipulates virtual disks, file systems, logical volumes, and physical storage devices on ESX/ESXi hosts.
vmware-cmd Performs virtual machine operations remotely. This includes, for example, creating a snapshot, powering the virtual machine on or off, and getting information about the virtual machine.