Wednesday, March 30, 2016

VCenter Security certificates

Options available for replacing vCenter Server Security Certificates
A. Replace with certificates signed by the VMCA
B. Make VMCA an ICA
C. Use your own Certificates ( do not use VMCA)


Scenarios:
A. Replace existing VMCA-signed certificates with new VMCA signed certificates
is needed when root certifcate expires ( 10 y  default)
can be performed  only by administrator@vsphere.local or member of CAAdmins local group
you need to use vSphere Certificate Manager
Steps:
1.Generate a New VMCA-Signed Root Certificate
using certool CLI and then publish them to vmdir
2.Replace Machine SSL Certificates with VMCA-Signed Certificates 
3.Replace Solution User Certificates With New VMCA-Signed Certificates
4.Replace the VMware Directory Service Certificate in Mixed Mode Environments

B. Use VMware Certificate Authority  as an intermediate Certificate authority 
You can replace the VMCA root certificate with a certificate that is signed by an enterprise CA or third-party CA. VMCA signs the custom root certificate each time it provisions certificates, making VMCA an intermediate CA.
Steps:
1.Replace the Root Certificate (Intermediate CA)
The first step in replacing the VMCA certificates with custom certificates is generating a CSR and adding the certificate that is returned to VMCA as a root certificate.
2.Replace Machine SSL Certificates (Intermediate CA)
After you have received the signed certificate from the CA and made it the VMCA root certificate, you can replace all machine SSL certificates. These steps are essentially the same as the steps for replacing with a certificate that uses VMCA as the certificate authority. However, in this case, VMCA signs all certificates with the full chain. 
3.Replace Solution User Certificates (Intermediate CA)
You replace the machine solution user certificate on each management node and on each Platform Services Controller node. 
You replace the other solution user certificates only on each management node. Use the --server parameter to point to the Platform Services Controller when you run commands on a management node with an external Platform Services Controller. 
4.Replace the VMware Directory Service Certificate
If you decide to use a new VMCA root certificate, and you unpublish the VMCA root certificate that was used when you provisioned your environment, you must replace the machine SSL certificates, solution user certificates, and certificates for some internal services. If you unpublish the VMCA root certificate, you must replace the SSL Signing Certificate that is used by vCenter Single Sign-On.
You must also replace the VMware Directory Service (vmdir) certificate. 
5.Replace the VMware Directory Service Certificate in Mixed Mode Environments

C. Use your own Certificates ( do not use VMCA)
1 Request Certificates and Import a Custom Root Certificate
2 Replace Machine SSL Certificates With Custom Certificates
3 Replace Solution User Certificates With Custom Certificates
4 Replace the VMware Directory Service Certificate
5 Replace the VMware Directory Service Certificate in Mixed Mode Environments

Tuesday, March 29, 2016

vCenter Permisions User Groups and Roles

https://pubs.vmware.com/vsphere-60/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-60-security-guide.pdf

The permission model for vCenter Server systems relies on assigning permissions to objects in the vSphere object hierarchy.
Each permission gives one user or group a set of privileges, that is, a role for the selected object.
You need to understand the following concepts:
Permissions 
Each object in the vCenter Server object hierarchy has associated permissions. Each permission specifies for one group or user which privileges that group or user has on the object.
Users and Groups On vCenter Server systems:
you can assign privileges only to authenticated users or groups of authenticated users. Users are authenticated through vCenter Single Sign-On. The users and groups must be defined in the identity source that vCenter Single Sign-On is using to authenticate. Define users and groups using the tools in your identity source, for example, Active Directory. vSphere Security
Roles:
Roles allow you to assign permissions on an object based on a typical set of tasks that users perform. Default roles, such as Administrator, are predefined on vCenter Server and cannot be changed.
Other roles, such as Resource Pool Administrator, are predefined sample roles.
You can create custom roles either from scratch or by cloning and modifying sample roles. Privileges Privileges:
are fine-grained access controls. You can group those privileges into roles, that you can then map to users or groups.

------------------------
 To assign permissions to an object, you follow these steps:
1 Select the object in the vCenter object hierarchy to which you want to apply the permission.
2 Select the group or user that should have privileges on the object.
3 Select the role, that is the set of privileges, that the group or user should have on the object.
By default, permissions propagate, that is the group or user has the selected role on the selected object and its child objects.
Permission assignments:
1. If an object inherits permissions from two parent objects, the permissions on one object are added to the permissions on the other object. 

2. Permissions applied on a child object always override permissions that are applied on a parent object.

 ***3. If multiple group permissions are defined on the same object and a user belongs to two or more of those groups, two situations are possible:
3.1. If no permission is defined for the user on that object, the user is assigned the set of privileges assigned to the groups for that object. n
3.2 If a permission is defined for the user on that object, the user's permission takes precedence over all group permissions. 



------------------------
Users in the vsphere.local domain. 
SolutionUsers
Solution users group vCenter services.
Each solution user authenticates individually to vCenter Single Sign-On with a certificate.
By default, VMCA provisions solution users with certificates.
Do not add members to this group explicitly.
CAAdmins
Members of the CAAdmins group have administrator privileges for VMCA.
Adding members to these groups is not usually recommended.
DCAdmins 
Members of the DCAdmins group can perform Domain Controller Administrator actions on VMware Directory Service.
***Do not manage the domain controller directly. Instead, use the vmdir CLI or vSphere Web Client to perform corresponding tasks.
SystemConfiguration.BashShellAdministrators 
This group is available only for vCenter Server Appliance deployments.
A user in this group can enable and disable access to the BASH shell.
By default a user who connects to the vCenter Server Appliance with SSH can access only commands in the restricted shell. Users who are in this group can access the BASH shell.
ActAsUsers
Members of Act-As Users are allowed to get actas tokens from vCenter Single Sign-On. ExternalIPDUsers
This group is not used by vSphere. This group is needed in conjunction with VMware vCloud Air. SystemConfiguration.Administrators 
Members of the SystemConfiguration.Administrators group can view and manage the system configuration in the vSphere Web Client.
These users can view, start and restart services, troubleshoot services, see the available nodes and manage those nodes.
DCClients
This group is used internally to allow the management node access to data in VMware Directory Service.
NOTE Do not modify this group. Any changes might compromise your certificate infrastructure. ComponentManager.Administrators
Members of the ComponentManager.Administrators group can invoke component manager APIs that register or unregister services, that is, modify services. Membership in this group is not necessary for read access on the services.
LicenseService.Administrators
Members of LicenseService.Administrators have full write access to all licensing related data and can add, remove, assign, and unassign serial keys for all product assets registered in licensing service. Administrators 
Administrators of the VMware Directory Service (vmdir). Members of this group can perform vCenter Single Sign-On administration tasks.
Adding members to this group is not usually recommended.

----------------------------------

vCenter Server provides system roles and sample roles by default:
1. System roles
System roles are permanent. You cannot edit the privileges associated with these roles.
Administrator Role, No Access Role, Read Only Role

***The administrator@vsphere.local user, the root user, and vpxuser are the only users not assigned the No Access role by default. Instead, they are assigned the Administrator role.
You can remove the root user from any permissions or change its role to No Access as long as you first create a replacement permission at the root level with the Administrator role and associate this permission with a different user.
***With Read Only Role a user can view virtual machine, host, and resource pool attributes. The user cannot view the remote console for a host. All actions through the menus and toolbars are disallowed.

2. Sample roles 
VMware provides sample roles for certain frequently performed combination of tasks.
You can clone, modify or remove these roles.
VM User Role, VM PowerUser Role, DataStore Consumer Role, Network Consumer Role,
Resource Pool Administrator
***To avoid losing the predefined settings in a sample role, clone the role first and make modifications to the clone. You cannot reset the sample to its default settings.





Thursday, March 17, 2016

Networking

vSS

vDS
General settings: name,uplink,Network I/O control
Advance settings: MTU, Multicast Filtering Mode, CDP

Port Group types:
VMkernel Network Adapter
Physical Network Adapter
VM PortGroup for virtual switch

PortGroup Settings: promiscuous mode, Netfflow

Which network will be utilized by default by vSS? The one with VM in it?

Networking rollbacks 
occur when an invalid change is made to the networking configuration for the connection with vCenter Server. Every network change that disconnects a host also triggers a rollback.
1.Updating the speed or duplex of a physical NIC, 
2. updating DNS and routing settings, updating teaming and failover policies or traffic shaping policies of a standard port 3. group that contains the management VMkernel network adapter, 
4. updating the VLAN of a standard port group that contains the management VMkernel network adapter,
5. increasing the MTU of management VMkernel network adapter and its switch to values not supported by the physical infrastructure, 
6. changing the IP settings of management VMkernel network adapters
7. removing the management VMkernel network adapter from a standard or distributed switch, 
8. removing a physical NIC of a standard or distributed switch containing the management VMkernel network adapter or
9. migrating the management VMkernel adapter from vSphere standard to distributed switch. 

Resource management


Virtual CPU
a VM can have up to 128vCPU
Hyper Threading 
-can execute  2 threads at the same time on each physical CPU
-is  enabled  at host level on BIOS ( also called  Logical Processor)
- to check if it's enabled  on VMware WebClient go to Host->Summary tab-> CPU under Hardware











Example:
8 physical cores, HT disabled -> 8 logical cores ( you can assign 8 vCPU in VMware)
8 physical cores, HT enabled -> 8x2=16 logical cores ( you can assign 16 vCPU in VMware

Virtual memory
The total configured memory size of all  VMs might exceed the amount of physical memory from the host
Example:
you can have a host with 2GB physical memory and run 4VMs with 1Gb memory each
* if all 4 VMs are actively consuming memory the host can  become overcommited--> no new VMs can start ( the already powered on machines are not affeced)

Resource ( CPU, memory, storage I/O allocations) management:
to control access of a VM to resources you need to configure this:
Shares: the relative priority  or importance of a VMs access to resource
             you can add shares to a VM while it is running
             when you delete or power off a VM the number of total shares decreases
Limit: Consumption of resource cannot exceed  this value
Rezervation: this value of resource has to be available to  the VM in order to start

Example:











Engineering pool 1000/(1000+2000)=1/3= 33% resources
Finance pool 2000/(1000+2000)= 2/3=66% resources
Eng-Test VM: 1000/(1000+2000) from 33%=  1/3*1/3=11% from total resources
Eng-Prod VM: 2000/(1000+2000) from 33%= 2/3*1/3= 22% from total resources

Datastore types

DataStores:
1.VMFS
2.NFS
3.Virtual SAN
4.Virtual Volumes


1.VMFS
supported version: VMFS5, VMFS3*
* you can still use VMFS3 but you cannot create new ones

VMFS5 characteristics:
-you can have up to 256 VMFS datastore per host with the maximum 64TB
-minimum  size for a VMFS datastore is 1.3Gb ( recommended min 2GB)
-greater than 2TB storage devices
*VMFS3 has a 2TB limit
-greater than 2TB disk sizes for RDM
-support of small files of 1KB
-standard 1MB file system block size with support of 2TB disk files
- ability to open any file on a VMFS5 datastore in shared mode ( with 32 hosts)

2. NFS
supported version : NFSv3, NFSv4.1

NFSv3
-supports hardware acceleration ( to be used with thik provisioning)
-storage traffic is tranmitted unencrypted
-cannot access the NFS volumes with nontroot credetials; each host needs root access to the volume
-does not support multipath
-locking protocol is created by vmware ( does not support NLM) implemented by creating lock files on the NFS server ( .lck-file_id)
NFSv4.1
-does not support hardware acceleration
-supports Kerberos authentication prtocol to secure comunication with the NFS server
-supports nonroot users to access files when used with Kerberos
-supports multipath for server that support session trunking
*client ID trunking is not supported
-supports inbuilt file locking
-uses shares and rezervation are a locking mechanism

vSphere feature support:     NFSv3 NFSv4
vMotion&StoragevMotion     y          y
HA                                          y          y
FT                                           y          y
DRS                                        y          y
Host-Profiles                          y          y
Storage-DRS                          y          n
Storage I/O control                 y          n
Site Recovey manager            y          n
Virtual volumes                      y          n

3. Virtual SAN
-creates an aggregated datastore by clustering host attached HDDs and SSDs
- you enable it at cluster level and  it creates a data store using the storage component of all hosts in the cluster
- is mounted using Object Store File System
-can be configured as:
a: hybrid : HDD and SSD for datastore, all-flash for read cache/write buffer
b: all-flash storage:SSD ?  all-flash for  write cache

4. Virtual Volumes
- native representation of VMDK files
-works with existing SAN/NAS volumes
-supports snapshots/replications,etc
-storage containers can expand an entire array

sources:
http://pubs.vmware.com/vsphere-60/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-601-storage-guide.pdf