Pages

Monday, January 11, 2016

VMware Distributed Virtual Switch (DVS) Test Plan





























Category Name Description Test Method Expected Result Pass/Fail
Operations Implementation Create a new virtual switch. Create a new virtual switch within a specified vCenter and migrate hosts to it.  Specific steps are required here based on environment specific variables. New virtual switch is created successfully and is available for use.
Operations Upgrade Upgrade a virtual switch. Upgrade the virtual switch to the latest version based on vCenter/ESXi host versions. Virtual switch is upgraded with no impact to applications/users.
Operations Cross virtual switch vMotion Migrate a VM from one virtual switch to another. Dynamically migrate a VM from one virtual switch to another. VM is migrated with no impact to applications/users.
Operations Config Backup Backup configuration. Backup and save virtual switch configuration. Configuration is exported and saved.
Operations Config Restore Restore configuration. Delete or change virtual switch configuration then restore to a previous version. Configuration is restored successfully to a previous version.
Operations Network IO Control Designate different network IO properties for different types of VM workloads. Create Network Resource Pools to associate port groups with specific network SLAs. VM traffic is treated differently depending on identified SLAs configured.
Operations LACP Ensure virtual switch communicates properly across LACP enabled uplinks. Configure LAGs for host uplinks ports to match upstream switch LACP configurations. Network traffic successfully traverses the LAG.
Operations RBAC Ensure appropriate operations resources are able to manage/configure/monitor the virtual switch. Create a "network" specific role and apply permissions to the appropriate AD security group. Operations resources have the proper access required.
Operations VLAN Updates via PowerCLI Add additional VLANs to Port Groups Leverage PowerCLI script(s) to add one or more VLANs to an existing Port Group or create a new Port Group. Port Group is successfully created or updated and is configured to leverage the specified VLAN(s).
Operations Maximum Transfer Unit (MTU) Configure MTU per virtual switch. Specify the required MTU per virtual switch to support network traffic requirements. MTU is successfully configured and network traffic behaves properly.
Failover Host Failure Validate VMs are successfully restarted via HA on another host in the cluster. Power off a host with a test VM running on it. VM is restarted on another host and network traffic resumes normal operation.  An alert is also generated.
Failover vCenter Failure Validate normal network operations continue without the vCenter server. Power off vCenter. No network traffic from ESXi hosts or VM is impacted.  Any virtual switch modifications will not be available until vCenter is available.  An alert is also generated.
Failover Physical Switch Failure Validate physical network redundancy. Power off a physical upstream switch. No network traffic from ESXi hosts or VM is impacted because of redundant network uplink configuration and load balancing algorithms.  An alert is also generated.
Failover Physical NIC Failure Validate physical network redundancy. Unplug a physical NIC from the blade/chassis or virtually disable one via blade virtualization (Virtual Connect/UCS Manager). No network traffic from ESXi hosts or VM is impacted because of redundant network uplink configuration and load balancing algorithms.  An alert is also generated.
Troubleshooting NetFlow Send NetFlow data to a collector for analysis purposes. Configure and enable virtual switch to send flows to NetFlow collector.  Specific steps required here based on environment specific variables. NetFlow collector receives and analyzes the configured object(s).  Data is clean and usable.
Troubleshooting Port Mirroring Mirror a VM vNIC to an Layer 3 IP address for the analysis purposes. Configure and enable port mirroring to send traffic to a designated IP address.  Specific steps required here based on environment specific variables. Designated IP address receives specified network traffic from mirrored port and can be captured via 3rd party tools.  Data is clean and usable.
Troubleshooting Packet Capture Capture network packets for specific objects for analysis purposes. Configure a packet capture session for a specified workload and save/export the capture file in a ".pcap" file format. Packet capture is successfully generated and is able to be opened in a 3rd party packet capture analysis tool.
Troubleshooting Traffic Filtering Allow or Drop traffic from a specified object. Configure and enable traffic filtering to allow or drop specific types of traffic from specific objects. Designated traffic is allowed or dropped.
Troubleshooting Traffic Tagging Tag specific traffic via Cos or DSCP standards. Configure and enable traffic tagging to tag specific types of traffic from specific objects. Designated traffic is tagged.
Troubleshooting Monitor Statistics Connect via CLI to gather network statistics (dropped packets) Connect to ESXi via SSH or vCenter via PowerCLI to gather virtual switch statistics. Network statistics are viewed/gathered via CLI methods.

Sunday, January 10, 2016

Shell Prompt with Username and Hostname

export PS1="[${LOGNAME}@$(hostname)]$ "

In .profile >>

PS1="[${LOGNAME}@$(hostname)]$ ";       export PS1

SSH Bastion Host

Based on blog post here - http://blog.scottlowe.org/2015/11/21/using-ssh-bastion-host/

THis works for me on FreeBSD

Host fbsd01.dc01
        Hostname 95.80.241.17
        Port 2222
        User cdave
        ForwardAgent yes

Host fbsd02.dc01
        User cdave
        Hostname fbsd02.dc01.uw.cz
        IdentityFile ~/.ssh/id_rsa
        #ProxyCommand ssh cdave@fbsd01.dc01 nc %h %p
        ProxyCommand ssh cdave@fbsd01.dc01 -W %h:%p

Monday, January 4, 2016

Github / Git

GithHud Identification

git config --global user.email "david.pasek@gmail.com"
git config --global user.name "davidpasek" 

GithHub SSH authentication 

// *********** github SSH public key
ssh-keygen -C "david.pasek@gmail.com"
Add pub key (.ssh/id_rsa/id_rsa.pub) to GitHub ... Settings > SSH and GPG keys > New SSH key
 
// *********** Test if your ssh authentication works
ssh -T git@github.com 

// *********** Clone your existing repostiory - davidpasek/uw.cz-gitops
git clone git@github.com:davidpasek/uw.cz-gitops
or
git clone git@github.com:davidpasek/uw.cz-gitops.git 

Create new GitHub repository

// *********** Create new git repository from directory
Create a directory to contain the project.
Go into the new directory.
Type git init
Write some code.
Type git add -A to add all the files from current directory.
Type git commit
 
// *********** You must create the repository on GitHub manually
Type git remote add origin git@github.com:davidpasek/[REPOSITORY-NAME].git
Type git push push --set-upstream origin main

Clone existing GitHub repository

// *********** Clone existing github repository with username and token
git clone https://github.com/davidpasek/math4kids
 
// *********** Clone existing github repository with SSH key
git clone git@github.com:davidpasek/uw.cz-gitops.git

// *********** Add file to github

git status
git add file.html
git commit -m "Commit comment"

// push back to github
git push

// pull out from github
git pull

// *********** Add all files in local directory to github
git add -A
git commit -m "Initial add of files into the repository"
git push

// *********** Working with github - commit changes
git status
git pull
... working with files
git commit -a
git push
git status

GLOBAL CONFIG
git config --global user.name "David Pasek"
git config --global user.email david.pasek@gmail.com

Save credentials
$ git config credential.helper store
$ git push http://example.com/repo.git
Username: <type your username>
Password: <type your password>

[several days later]
$ git push http://example.com/repo.git
[your credentials are used automatically]

Q&A
Q: What is the difference between git clone and git checkout?
A: 
The man page for checkout: http://git-scm.com/docs/git-checkout
The man page for clone: http://git-scm.com/docs/git-clone
To sum it up, clone is for fetching repositories you don't have, checkout is for switching between branches in a repository you already have.

Links:
Visual GIT reference - http://marklodato.github.io/visual-git-guide/index-en.html
GIT Simple Guide - http://rogerdudler.github.io/git-guide/
How To Use Git Effectively -  https://www.digitalocean.com/community/tutorials/how-to-use-git-effectively

Monday, December 21, 2015

Code Samples

FYI posilam odkaz na novou iniciativu, kde VMware developeri a komunita sdileji priklady svych scriptu, workflows apod. pro ruzne ulohy, muze se hodit..


Wednesday, December 9, 2015