Tuesday, April 21, 2015

Changing the file descripter

Error:
Cannot open the disk '/vmfs/volumes/52d00900-b511428c-b993-0025b501a03d/XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)/XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)_1-000001.vmdk' or one of

Files on vmx
/vmfs/volumes/52d00900-b511428c-b993-0025b501a03d/XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8) # less "XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8).vmx" | grep -i vmdk
scsi0:0.fileName = "XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8).vmdk"
scsi0:1.fileName = "XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)_1-000001.vmdk"

cat "XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)_1-000001.vmdk"

# Disk DescriptorFile
version=3
encoding="UTF-8"
CID=4c2eccba
parentCID=4c2eccba
isNativeSnapshot="no"
createType="vmfsSparse"
parentFileNameHint="XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)_1-000003.vmdk"

cat "XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)_1-000003.vmdk"

# Disk DescriptorFile
version=3
encoding="UTF-8"
CID=4c2eccba
parentCID=788572b1  -- > bde46dfe
isNativeSnapshot="no"
createType="vmfsSparse"
parentFileNameHint="XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)_1.vmdk"
# Extent description
RW 83886080 VMFSSPARSE "XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)_1-000003-delta.vmdk"


cat "XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)_1.vmdk"

# Disk DescriptorFile
version=3
encoding="UTF-8"
CID=bde46dfe    --FIX---> 788572b1
parentCID=ffffffff
isNativeSnapshot="no"
createType="vmfs"

# Extent description
RW 83886080 VMFS "XXXXXXXXXX (ca868118-dafa-4549-ac84-1e195e76eab8)_1-flat.vmdk"

DO backup with .bak
Use vi to change and save it

Monday, April 6, 2015

SNAPSHOT VMware




find /vmfs/volumes/ -iname "*delta.vmdk" (where are there snapshots for all VMs on all shared storage visible from this host)

du -h -c -d 1 *delta.vmdk (from the specific VM directory how big are the deltas combined)

watch -d 'ls -luth | grep -E "delta|flat|sesparse"' (what is the consolidation doing date time stamps will change and deltas will be removed from list as they are processed)

vim-cmd vimsvc/task_list (what jobs are outstanding)

vim-cmd vimsvc/task_info (from returned list between colon and single quote will give status and percentage)
Here are KB articles which should answer most  questions about snapshots and where many of the mentioned commands come from:

http://kb.vmware.com/kb/2053758 - "Estimating the time required to consolidate snapshots (2053758_draft)"

http://kb.vmware.com/kb/1007566 - "Commands to monitor snapshot deletion in ESX 2.5/3.x/4.x and ESXi 3.x/4.x/5.x (1007566)"

http://kb.vmware.com/kb/1015180 - "Understanding virtual machine snapshots in VMware ESXi and ESX"

http://kb.vmware.com/kb/1025279 - "Best practices for virtual machine snapshots in the VMware environment"

http://kb.vmware.com/kb/1007849 - "Consolidating snapshots"

http://kb.vmware.com/kb/1018029 - "Configuring VMware vCenter Server to send alarms when virtual machines are running from snapshots"

Tuesday, February 7, 2012

Cisco Switches info


Nexus Family switches :-

Nexus 7000 family 7009 7010 7018 very dense 10 Gigi core

Nexus 5500 second generation top-of-rack 10Gb optional layer 3 capability

Nexus 5010 and 5020 --layer 2 swtiches only,supports FCOE
5010 --1U --20 10Gb ports plus module
5020 --2U --40 10Gb ports plus module

Nexus 2000 series (top of rack) these are not ture switches they are called FEX must be connected
with Nexus 5K or 7K .No local switching .All the switching is done by talking to 5K and 7K.
support FCOE.

FEX : FEX is a tecnology where the switching fabric is extended  by using devices,adapters or software.
requires connectivty back to a smart device.

Switch FEX :Examples Nexus 2K of a5548up.

Adapater FEX :Split a physical adapter in to mutiple logical adapters.

VM FEX :Extends adapter FEX in to a Virtual machine.

Nexus 1000v :Software switches
two Modules VSM Virtual Supervisor Module -(Mgmt Control plane)
            VEM Virtual Ethernet Module -(Dataplane)

MDS Switches Cisco Fibre Channel Switches

Cloud Provisioning and Automation:
Tidal is cisco orchetration
Newscale is Cisco Cloud Protal like cloud Director from Vmware but is provides support for other hyperisors as well.and chargeback

Sunday, February 5, 2012

ESXi/ESX cmd for VM's

ESXi VMX files

vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.off vmid
vim-cmd vmsvc/power.on vmid
vim-cmd vmsvc/power.reboot vmid
vim-cmd solo/registervm  name.vmx

vmfsktools -D name.vmx would show you the MAC address of NIC associated 


ESX cmd:
vmware-cmd  /vmname.vmx  getstate
vmware-cmd  /vmname.vmx  reboot
vmware-cmd  /vmname.vmx  start
vmware-cmd  /vmname.vmx  shutdown
vmware-cmd  /vmname.vmx  suspend
vmware-cmd  /vmname.vmx  hassnapshot (Query if VM has snapshot)
vmware-cmd  createsnaspshot nameofvm quiesce memory
vmware-cmd  /vmname.vmx  revertsnapshot
vmware-cmd  /vmname.vmx  removesnapshots
vmware-cmd  -s register /vmname.vmx   
vmware-cmd  -s unregister /vmname.vmx 




Hub Network :Everything goes everywhere in a hub network.

Switch Network would get
1)Broadcast Traffic
2)Multicast Traffic
3)Traffice to and from a specfic MAC address
4)Any Traffic going to or from UNKNOWN MAC address which is very rare.

Since it is not possible to discconect your server and inject hub in a real time network problem we go for SPAN (Swtiched Port Anaylsis)  also called Port Mirroring.Port Mirroring we configure the switch to copy servers traffic to a alyser port


Analyzer Placement :
1)Hub - Switch all network can be captured when analyser is placed at HUB
2)Switch - Switch  use Port mirroing  SPAN a port  and copy all the traffic on that port to anaylzer port.
3)Switch -Router - Switch traffic between switch and router can be traced ,but not both the layer2 traffics on the switch.
-------------------------------------------------
Packet Transmittal :-

TCP  Source port 1024 (can be anything)
     destination port 21

IP protocal  6  (Reolve name to IP)
   source Ip 192.16.1.4
   destination IP 192.11.1.5

Eth  Destination MAC B (Ip to mAC)
     Source MAC      A
     Ether Type : xyx800
---------------------------------------------
Transulate FTP to port number 21
Get Host IP address resultion(Cache,Hosts file,Network)
Local or remote destination (SUbnet mask)
Local Get MAC address (ARP) (Cache or Network)
Remote Lookup route Inforation (Host,Network or Gateway)
Get MAC address (ARP) (Cache,Network)