Skip to content

vSphere backup

May 4, 2017
tags:

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2042141

Backup:

powerCLI

Connect-VIServer -Server 192.168.2.19 -User root -Password whatever
Get-VMHostFirmware -VMHost 192.168.2.19 -BackupConfiguration -DestinationPath f:\zip

Update vSphere CLI

May 3, 2017
tags:

profile list – https://esxi-patches.v-front.de/ESXi-6.5.0.html

DBCC progress

March 16, 2017
tags:

SELECT
percent_complete,
start_time,
DATEADD(ms,estimated_completion_time,GETDATE()) AS EstimatedEndTime,
status,
command ,
total_elapsed_time AS elapsed_time_ms
FROM sys.dm_exec_requests
where command like ‘%DBCC%’

Move SQL files

March 14, 2017
tags:
  • USE master;
    ALTER DATABASE SmartFactory
    MODIFY FILE (name=’SmartFactory_log’,filename=’S:\MSSQL\DB\SmartFactory_log.ldf’);
    (new file location)
  • ALTER DATABASE SmartFactory SET OFFLINE WITH ROLLBACK IMMEDIATE;
    (move files to new location)
  • ALTER DATABASE SmartFactory SET ONLINE;

Kill VM vSphere

January 26, 2017

find lock:

[root@esx01:~] vmkfstools -D /vmfs/volumes/Datastore/Server/Server.vmx
Lock [type 10c00001 offset 235544576 v 270, hb offset 3809280
gen 101, mode 1, owner 56f32abb-b98107ba-ba5c-ac1624ee27e8 mtime 5372
num 0 gblnum 0 gblgen 0 gblbrk 0]

mode 1 –  file is locked

ac1624ee27e8 – MAC address of the a physical NIC in the host, that owns the lock.

——————————–

To find the host i use RVTools to look for the MAC address in the vNIC tab, or us PowerCLI.

PowerCLI C:\> $vmhost = Get-VMHost | Get-VMHostNetworkAdapter | Where-Object {$_.Mac -eq "ac:16:24:ee:27:e8"}
PowerCLI C:\> $vmhost.vmhost

——————————–

[root@esx01:~] esxcli vm process list | grep Server -A 1 | grep -v “Display Name” | grep -v “Config File”
Server
World ID: 112261247

———————————-

[root@esx01:~] esxcli vm process kill -t hard -w 11226124

can try “force” instead

Thanks – https://www.virtual-allan.com/vm-operation-not-allowed-in-this-state/

 

HPE 5130 switch configuration

December 13, 2016

https://www.elasticsky.de/2015/08/hp-5130-ei-switch-konfiguration/http://allhpnetworking.blogspot.lt/2010/10/hp-networking-series-example.html

Install Zabbix – CentOS

November 29, 2016

CentOS7

///systemctl disable firewalld

# yum install httpd httpd-devel

# yum install mariadb-server
# yum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml

yum install nano
yum install epel-release
yum install phpmyadmin
nano /etc/httpd/conf.d/phpMyAdmin.conf
systemctl restart httpd.service
http://server_domain_or_IP/phpMyAdmin


 

 

service httpd start
service mariadb start

# mysql_secure_installation

# rpm -Uvh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway

# nano /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Europe/Vilnius

# service httpd restart

# mysql -u root -p

mysql> CREATE USER ‘zabbix’@’localhost’ IDENTIFIED BY ‘***’;GRANT USAGE ON *.* TO ‘zabbix’@’localhost’ IDENTIFIED BY ‘***’ REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;CREATE DATABASE IF NOT EXISTS `zabbix` CHARACTER SET UTF8;GRANT ALL PRIVILEGES ON `zabbix`.* TO ‘zabbix’@’localhost’;

///mysql> CREATE DATABASE zabbix CHARACTER SET UTF8;
///mysql> GRANT ALL PRIVILEGES on zabbix.* to zabbix@localhost IDENTIFIED BY ‘password’;
mysql> FLUSH PRIVILEGES;
mysql> quit

 

 

 

# cd /usr/share/doc/zabbix-server-mysql-3.2.1

gunzip create.sql.gz

#  mysql -u zabbix -p zabbix < create.sql

service zabbix-server start

go to  http://zabbix-server/zabbix/

web -> next, next

login admin / zabbix

 

nano /etc/zabbix/zabbix_server.conf
change DBPassword

getsebool -a | grep zabbix
httpd_can_connect_zabbix –> off
zabbix_can_network –> off
setsebool -P zabbix_can_network=true
setsebool -P httpd_can_connect_zabbix=true


systemctl start zabbix-agent
systemctl enable zabbix-agent
systemctl enable httpd
systemctl enable mariadb
systemctl enable zabbix-server 
reboot

Thanks http://tecadmin.net (http://tecadmin.net/install-zabbix-network-monitoring-on-centos-rhel-and-fedora/#)

 


C:\zabbix_agents\bin\win32\zabbix_agentd.exe --config C:\zabbix_agents\conf\zabbix_agentd.win.conf --install