Modify License MAC of Linux-based appliances on VM

This post entails the procedure of modifying License MAC address of any Linux-based Cisco UC appliances in Lab environment.

Procedures Overview.

  1. Customize BIOS of VM to boot from Red Hat Enterprise LINUX 5.
  2. Enter rescue mode, and enable root remote ssh access to Linux OS
  3. Access with root privilege and change License MAC to desired value.

Pre-requisites: Bootable image or CD of Red Hat Enterprise LINUX 5.

Detailed Step-by-Step Tutorial:

  1. Enable BIOS access by modify *.vmx file of VMware virtual machine.
    [For VMware Workstation only: close VMware Workstation application or VM’s Tab, then add bios.bootDelay = “5000″ to *.vmx file, which will introduce 5 seconds delay for system boot to let you press “ESC” to select the boot location.]
    Use VMware vSphere client to access ESXi host, navigate to Summary tab, right click datastore1 and select Browse Datastore…, download *.vmx to local PC, edit it by adding below line;
    bios.forceSetupOnce = “TRUE”;
    then upload it again to let the change take effect.
    NOTE that this parameter only takes effect only for one single instance of “power on” because “bios.forceSetupOne” will return to FALSE after you enter BIOS every single time. You will need to manually change “Enter BIOS of VMware Virtual Machine” to “TRUE” again if you want to enter BIOS for the second time. But, you changes in BIOS remains there permanently.
  2. Enter BIOS of VMware Virtual Machine & Change boot sequence
    Power on virtual machine and you will BIOS setting page, configure it to boot from CD-ROM firstly. Then power off the virtual machine, mount the Red Hat Enterprise LINUX 5 image to CD/DVD driver of virtual machine, make sure you have “connect at power on” selected.
  3. Activate “Linux Rescue” mode and enable root remote ssh access
    After powering on virtual machine, you will be led to boot command line (boot: ) of Linux 5, execute below commands and selections;
    boot: linux rescue
    Select Language & Keyboard, do not start Network Interface
    sh-3.2# chroot /mnt/sysimage
    sh-3.2# cd /etc
    sh-3.2# rm securetty
    sh-3.2# passwd root         //change the password for root as per prompt
    sh-3.2# vi passwd
    change “root:x:0:0:root:/root:/sbin/nologin” to “root:x:0:0:root:/root:/bin/bash”.
    ssh-3.2# vi ssh/sshd_config
    change “#PermitRootLogin yes” to “PermitRootLogin yes”.
    ssh-3.2# exit
    Now, un-mount the Red Hat Enterprise Linux 5 boot image and restart server again to boot from CUCM system folder on Hard Driver.
  4. Root Access CUCM CLI to change License MAC
    After CUCM has completely finished powering on, SSH access CUCM CLI using root credential, execute below commands;
    [root@CUCM]# cd /usr/local/bin/base_scripts/
    [root@CUCM]# vi
    change 【FinalString=’expr substr”$SHA1sum” 1 12’】to【FinalString=”desired license mac”】
    [root@CUCM]# cd /root/etc/selinux/
    [root@CUCM]# vi config
    change “SELINUX=enforcing” to “SELINUX=permissive”.
    Wait for several minutes to allow you new license MAC to take effect.

How to access BIOS of VMware virtual machine.

Enable Root access on Linux-based UC Appliances.

Modify License MAC.

Modify MAC & Licensse MAC of UC appliances on VM.