Windows 8.1 and SSD disk

Also on Windows 8/8.1 Windows System Assessment Tool is present and used. For Optimizing Windows 8/8.1 to use SSD disk run this command:

WinSAT.exe formal

Check also that your SATA mode is in AHCI to have trim enabled.
Is non necessary to reinstall OS… check this: http://support.microsoft.com/kb/2751461 or boot in SafeMode one time and then reboot.

Via: http://technet.microsoft.com/en-us/library/hh825197.aspx

Posted in Computers and Internet | Tagged | Leave a comment

How to remove dumpfile on ESXi

For clean up ESXi dumpfile on ESXi host, first check where the dumpfile is configured and active:

esxcli system coredump file list

Then remove the file using this command:

esxcli system coredump file remove --force -f [path of dumpfile]
Posted in Computers and Internet | Tagged | Leave a comment

How to Backup ESXi Configuration with PowerCLI

I have 2 ESXi Hosts without vCenter. For backup the ESXi configuration I used a PowerCLI script:

Connect-VIServer [2001:DB8::10]
Connect-VIServer [2001:DB8::11]
$esxhost = Get-VMHost
Get-VMHostFirmware -VMHost $esxhost -BackupConfiguration -DestinationPath C:\Backup

Change the IP Address with the address of yours ESXi hosts and set the DestinationPath according to your environment.

For restore the configuration use these commands:

Connect-VIServer [2001:DB8::10]
$esxhost = Get-VMHost
Set-VMHostFirmware -VMHost $esxhost -Restore -SourcePath C:\Backup\configBundle-[2001:DB8::10].tgz

Remember to put ESXi host in “Maintenance Mode” before restore the conf.

Posted in Computers and Internet | Tagged , , | Leave a comment

How to Batch Redirection

To merge Standard Output and Standard Error and redirect them together to a single file:

Script.cmd > Script.log 2>&1

To redirect success and error messages to separate log files:

Script.cmd > Script.log 2> ScriptErrors.log

Use >CON to send text to the screen, no matter what, even if the batch file’s output is redirected.
This could be useful when prompting for input even if the batch file’s output is being redirected to a file.

Posted in Computers and Internet | Tagged | Leave a comment

How to create backup role on SQL 2008 R2

The minimum rights for backup/restore on SQL server 2008R2 are these:

Server roles:
dbcreator
public

Database roles:
db_backupoperator
db_denydatareader
public

 

This is an example of error when some rights are missing when BACKUP EXEC try to backup SQL:

Login failed for user ‘[DOMAIN]\backup_service’. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]

 

Posted in Computers and Internet | Tagged , | 1 Comment

Ubuntu 14.04 and Hyper-V

Ubuntu 14.04 (or better Linux kernel 3.13) can now run on Hyper-V Generation 2 virtual machines.
You only need to disable secure boot (run this on Hyper-V machine):

Set-VMFirmware -VMName "DEV03-Ubuntu" -EnableSecureBoot off

After installation, remember to install these daemons (run this on Ubuntu virtual machine):

sudo apt-get install hv-kvp-daemon-init

Via: http://technet.microsoft.com/en-us/library/dn531029.aspx

Update:
The hv-kvp-daemon-init is deprecated. Install this:

sudo apt-get install Linux-cloud-tools-generic

For copy files from host to VM you can now use powershell:

Copy-VMFile -name Ubuntu-VM -SourcePath "C:\Data\test.txt" -DestinationPath "/home/linuxuser/test.txt" -CreateFullPath -FileSource Host
Posted in Computers and Internet | Tagged , | Leave a comment

How to avoid ssh client to check key fingerprint

Sometime, especially on script, is necessary to avoid fingerprint host check. You can do this by setting  ‘StrictHostKeyChecking no’ on /etc/ssh/ssh_config or passing it via command line as option:

ssh -o 'StrictHostKeyChecking no' account@server

..or use public key: http://241931348f64b1d1.wordpress.com/2014/06/03/how-to-configure-esxi-to-use-public-key-authentication-for-ssh/

Posted in Computers and Internet | Tagged , , | Leave a comment