Set NTP settings on a Dell server with iDRAC7

Set the DNS first to ensure the iDRAC can resolve the NTP host names:
racadm -r 10.1.1.100 -u root -p calvin set idrac.ipv4static.dns1 8.8.8.8

Set the NTP server names:
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp1 0.asia.pool.ntp.org
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp2 1.asia.pool.ntp.org
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp3 2.asia.pool.ntp.org

In case it won’t update the time when FQDN’s are used, IP addresses can also be used:
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp1 129.250.35.250
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp2 180.211.88.50
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp3 202.112.29.82

Enable NTP and set max hops:
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.NTPEnable Enabled
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.NTPMaxDist 16

Set the timezone:
racadm -r 10.1.1.100 -u root -p calvin set idrac.time.timezone Japan

Use a USB to RS232 serial converter from Ubuntu / Debian

Detection of the USB-Serial converter used on your machine (so you get the correct device name to use later):

1. tail -f /var/log/messages or /var/log/syslog
2. Plug in the USB cable
3. It will show up like this:
Nov 19 16:53:12 nyx kernel: [30040.171597] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0

Connect with screen as follows:
screen <device> <speed>
root@nyx:~# screen /dev/ttyUSB0 115200

Disconnect with CTRL+a followed by CTRL+d:
[detached from 4197.pts-2.nyx]

SQL Server setup media does not support the language of the OS: SCVMM deploying non-English VMs in English by default (!)

Ever deployed a non-English Windows server via SCVMM and then tried installing SQL server on it? Won’t work. The OS and SQL server languages have to match and in a stroke of genius SCVMM always make the base deployment for any new VM templates in English!!

What I’d imagine throws most people off is that the OS will display in the language locale you’d expect – Japanese in my case, but underneath the settings will be English. This can be verified by opening the command prompt. All errors will be in English and not the language the GUI is displayed in.

Error message:
“SQL Server setup media does not support the language of the OS or does not have ENU localized files. Use the matching language-specific SQL Server media or change the OS locale”

It’s easy enough to fix with an update to the SCMMM VM templates (use the updated template to re-deploy the server OS):

$template = Get-SCVMtemplate | where {$_.Name -eq "Win2012R2_JP_NEW_WG"}
$settings = $template.UnattendSettings;
$settings.add("oobeSystem/Microsoft-Windows-International-Core/UserLocale","ja-JP");
$settings.add("oobeSystem/Microsoft-Windows-International-Core/SystemLocale","ja-JP");
$settings.add("oobeSystem/Microsoft-Windows-International-Core/UILanguage","ja-JP");
$settings.add("oobeSystem/Microsoft-Windows-International-Core/InputLocale","1041:00000411");
Set-SCVMTemplate -VMTemplate $template -UnattendSettings $settings

The InputLocale values must match with “ja-JP” or whatever you wish to use. To get the values, please refer to:

Language Pack Default Values: http://technet.microsoft.com/en-us/library/cc766191(v=ws.10).aspx

Default Input Locales: http://technet.microsoft.com/en-us/library/cc766503(v=ws.10).aspx

Configure CentOS / RedHat 7 to use a proxy

Global settings stored here:
vi /etc/profile

Add to the end:
MY_PROXY_URL=”http://proxyserver:portnumber/”
HTTP_PROXY=$MY_PROXY_URL
HTTPS_PROXY=$MY_PROXY_URL
FTP_PROXY=$MY_PROXY_URL
http_proxy=$MY_PROXY_URL
https_proxy=$MY_PROXY_URL
ftp_proxy=$MY_PROXY_URL
export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy

For example:
MY_PROXY_URL=”http://proxy.dsc.local:8080/”

Change Windows IP address settings remotely with psexec and netsh

Download psexec from Sysinternals / MS. It only needs to be installed on the machine you run the commands from, not the targets.

Note:
* All machines must be in the same domain or workgroup
* Firewalls must be down on the targets (haven’t checked exactly which ports, so lowered them for domain access in my case)
* Ideally, create/use a local admin user on each remote machine for execution

Change from DHCP to static IP (note the “-h” for elevated admin access):
psexec \\<remote-computer-name> -u <remote-admin-user> -p <password> -h netsh interface ip set address name=”<interface-name>” static addr=<ip> <mask> <gateway> 1

Since the IP change command doesn’t include DNS settings we also need the the below:

Change DNS settings:
psexec \\<remote-computer-name> -u <user> -p <password> -h netsh interface ip set dns name=”<interface-name>” static addr=<ip>

Example changing the settings remotely on a Japanese Windows 7 machine from a Windows 2012 R2 server:
psexec \\Win7-01 -u admusr -p Passw0rd! -h netsh interface ip set address name=”ローカル エリア接続 2″ static addr=192.168.0.100 255.255.255.0 192.168.0.1 1

psexec \\Win7-01 -u admusr -p Passw0rd! -h netsh interface ip set dns name=”ローカル エリア接続 2″ static addr=8.8.8.8

 

Tip:
If you’re uncertain of the interface name: Run “ipconfig” remotely and copy and paste the interface name from there.
psexec \\<remote-computer-name> -u <remote-admin-user> -p <password> ipconfig

 

Hyper-V Error (23001) Cannot create or update a non highly available virtual machine

OK, so you created a Hyper-V cluster using clustered, shared storage (CSV) and installed SCVMM. Now when you try to deploy a VM to a cloud it won’t work. Your clouds are listed with zero stars for compatibility and the below, rather cryptic, error message will be shown:

Full Error message:
Error (23001) Cannot create or update a non highly available virtual machine because the path C:\ClusterStorage\Volume1\Virtual Hard Disks\ is a clustered resource. Recommended Action Ensure that the path exists and that the path is not a cluster disk or cluster shared volume, and then try the operation again.

Fix:
This happens if the cloud is configured to use clustered storage but the VM hardware profile doesn’t have a check in the “Make this virtual machine highly available” checkbox.

Thank you for the useful error messages MS. They really make me want to pull my hair out.

Hyper-V_HA