Categories
blog

VMWARE DR backup destination not mounted on reboot

Concerns VDR 1.2
Solution:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1029746

To resolve this issue:
Open an SSH session to the VDR appliance.
Open the /etc/fstab file using a text editor.
Add this line at the end of the file:

/dev/sdX# /SCSI-0:1 ext3 defaults 0 0

where
/dev/sdX# is the device name and partition number i.e /dev/sda1
/SCSI-0:1 is the mount point
ext3 is the file system type
defaults is the mount option
0 is the dump option
0 is the file system check option

Run these commands to unmount and remount the volume:

umount /SCSI-0:1
mount /SCSI-0:1

The operating system in the VDR appliance should now be able to read the fstab file and remount the volume.

A little help, mount the disk using the GUI then issue command “mount” on SSH with root. This will tell you /dev/sdX# and the /SCSI-#:#

Categories
blog howto server windows

EXCHANGE 2007: Certifcate with mutiple DNS names

http://www.exchangeinbox.com/article.aspx?i=127

New-ExchangeCertificate -GenerateRequest -Path c:\install\mail_cert_request.csr -SubjectName "c=BE, o=******, ou=IT, cn=mail.*****.com" -DomainName: mail.******.com, autodiscover.*****.com, MAILSRV2, MAILSRV.*****.**, mail.****.**-KeySize 1024 -PrivateKeyExportable: $true
certreq.exe -submit -attrib "CertificateTemplate:WebServer" c:\install\MAIL_cert_request.csr

Choose the right CA, choose output folder. Open inside Issued certificates in Cert. MMC. Go to details. Click Copy to -> Complete chain, save as p7b file.

Import-ExchangeCertificate -Path C:\install\mail2.*****.com.p7b
Enable-ExchangeCertificate -Thumbprint 5B485A86***********60A04 -services IIS, POP, IMAP, SMTP
Remove-ExchangeCertificate -Thumbprint oldcertificatesthumbprint

Categories
blog howto linux server

DUF alias for sorted du -h

Show disk usage (human readable) for each folder/file sorted by size!

alias duf='du -sk * | sort -n | perl -ne '\''($s,$f)=split(m{\t});for (qw(K M G)) {if($s<1024) {printf("%.1f",$s);print "$_\t$f"; last};$s=$s/1024}'\'
Usage: duf

Alternative without perl:
du -sk * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done


Tested on: Linux (Redhat, Centos, Debian), Unix (Solaris, SunOS)
Author: http://www.earthinfo.org/linux-disk-usage-sorted-by-size-and-human-readable/

Categories
blog howto windows

Windows 7 change product key and activate from command line

Open CMD as Administrator (elevated).
cd /d %systemroot%\system32
cscript slmgr.vbs /inpkey:XXXXX-YYYYY...
cscript slmgr.vbs /ato

Windows 10/2016/2019:

cd /d %systemroot%\system32
cscript slmgr.vbs /ipk XXXXX-YYYYY...

Good luck.

Categories
blog howto windows

Office 2010 command line activate or change product key

Cloned PC, changed office key. Got error with license information on restart office. Ativated through CMD and all was OK.
Open CMD as Administrator.
cd c:\Program Files (x86)\Microsoft Office\Office14
cscript ospp.vbs /act

If you want to change product key through command line it is like this:
cscript ospp.vbs /inpkey:XXXXX-YYYYY....

Categories
blog server virtualization

Install HP offline bundle on VMWARE ESXi v5

EDIT: You can always just download HP’s ready made install ISO for Vpshere 5.

When using the VMWARE iso image on HP Proliant you should install the HP offline bundle for hardware status and event log viewing in the Vsphere client.
Download the files. Check if there are newer versions.
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=4091412&swItem=MTX-dd492ace50c6427389678df8be&prodNameId=4091432&swEnvOID=4115&swLang=8&taskId=135&mode=4&idx=1
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=4091412&prodNameId=4091432&swEnvOID=4115&swLang=8&mode=2&taskId=135&swItem=MTX-48fa6d3608514c60979531d921

Place host in maintenance mode via the Vsphere Client.
Upload the files to the root folder of the datastore.
My datastore is called DAS600GBRAID10, look up your name and change the path in the commands accordingly.

Run these commands from the Vsphere CLI v5.
esxcli.exe -s 192.168.101.60 -u root software vib install -d /vmfs/volumes/DAS600GBRAID10/hp-esxi5.0uX-bundle-1.0-20.zip
esxcli.exe -s 192.168.101.60 -u root software vib install -d /vmfs/volumes/DAS600GBRAID10/hp-nmi-esxi5.0-bundle-2.0-11.zip

Change the IP, path and username according to your situation. Password will be prompted for.

If you want to run the command without vCLI then run them on the host in Local Shell or SSH like this:
esxcli software vib install -d /vmfs/volumes/DAS600GBRAID10/hp-esxi5.0uX-bundle-1.0-20.zip
esxcli software vib install -d /vmfs/volumes/DAS600GBRAID10/hp-nmi-esxi5.0-bundle-2.0-11.zip

Change path according to your situation.

Categories
server virtualization

Enable software iSCSI adaptor on ESXi v5

Through SSH or on local console:
esxcli iscsi software set --enabled=true

Categories
blog server virtualization

HP ESXi 5.0 image license problem

The vmware.lic file is read only with a free ESXi key inside.

Execute on the command line of the particular ESX host:
esxcli software vib remove -n hp-esx-license --no-live-install
Connect with the VI client directly as root to the host and select by right-click to “shutdown” the host.

Categories
blog howto server windows

Errors with ntbackup caused by shadow copy.

Portions of FILENAME cannot be read. The backed up data is corrupt or incomplete. This file will not restore correctly.

I would receive this error numerous times in my ntbackup log.

In my case the C: drive would backup without any issue, but the D: drive would show these errors for every file in use.

My backup destination was a 2TB USB disk (G:) with a newer cluster size that is greater than 512. This is not really an issue for storing the backups. But somehow my shadow copy settings on the D: drive were using the G: backup drive as the place to store the shadow copies for the D: drive. And storing shadow copies on a drive with cluster size != 512 will fail. Note: on the G: drive itself shadow copies are disabled. Not needed for backup drive and will fail anyways because of above mentioned reason.

Categories
blog howto linux server

Ubuntu upgrade from 10.10 to 11.04 broke grub

After upgrading my Ubuntu server from 10.10 to 11.04 using the “do-release-upgrade” method, my system would no longer boot.
It was stuck on a GRUB shell. I downloaded the liveCD, booted from that and ran the excellent Boot-Repair utility. I had to install it using apt-get, so you need an internet connection. They should include it in the liveCD. I belive you can also download a Boot-Repair ISO file to boot from.

But the Boot-Repair tool worked great and fixed my GRUB in no time.
I see a lot of problems with GRUB after the upgrade. Maybe it’s a bug that affects people who, in the past, already upgraded from 9.x or 8.x to 10.x. So people who had GRUB v1 at some point in time.