Tag: command
Command tip #5 – Start a Cron Job in ESXi 5.5 or 6+
As a root insert new Cron Job (/var/spool/cron/crontabs/root):
crontab -e
After you need to restart cron:
kill $(cat /var/run/crond.pid)
/usr/lib/vmware/busybox/bin/busybox crond
To check activity of cron do following:
grep cron /var/log/syslog.log
Command tip #4 – Backup ESXi host & Restore via PowerCLI
To backup & restore ESXi host configuration proceed with:
Backup via PowerCLI:
Connect-VIServer -Server ESXi_host_IP_address
Get-VMHostFirmware -VMHost ESXi_host_IP_address -BackupConfiguration -DestinationPath C:\
Restore via PowerCLI:
Set-VMHost -VMHost ESXi_host_IP_address -State ‘Maintenance’
Set-VMHostFirmware -VMHost ESXi_host_IP_address -Restore -SourcePath c:\bundleToRestore.tgz -HostUser root -HostPassword exampleRootPassword
Command tip #3 – Enable SSL in MikroTik
Generate certificate, enable HTTPS and set MikroTik to listen on HTTPS 443 Port:
/certificate add name=webfig-ssl common-name=router.lan country=US days-valid=3650 key-size=2048 locality=US organization=US trusted=yes key-usage=digital-signature,key-cert-sign,crl-sign;
/certificate sign webfig-ssl ca-crl-host=192.168.88.1 name=webfig-ssl ca-on-smart-card=no;
/ip service set www-ssl certificate=webfig-ssl
/ip service set www-ssl port=443
/ip service enable www-ssl
Pay attention to:
- common-name – this is the DNS name where MikroTik is reachable
- ca-crl-host – this is CRL MikroTik IP Address
Command tip #2 – Change input keyboard in linux terminal
To change current session input keyboard settings:
loadkeys en_US
To change default input keyboard in whole system:
sudo dpkg-reconfigure console-setup