Category: English

English version of my posts.

  • How to Configure Serial Console for VM by Avocent ACS v6000 Virtual Advanced Console Server

    Serials console is very helpful to troubleshooting Linux problem, you can see additional system message via serial console if your Linux server hung. It is essential component on physical server for troubleshooting. It’s challenge to manage serial consoles if your datacenter is very big. You may deploy console server for central management of serial consoles, you don’t have to connect your computer with serial console one by one, you just need connect console server IP follow with port name by telnet protocol.

    Time comes to today, virtualization world. How you connect serial console of Linux virtual machine? Can we do exactly same like physical server? Answer is YES! There is couple of way to connect serial console of VM, each way has different benefit. I’m going to introduce the best one!

    VMware has a KB article 1022303 introduces how to implement virtual console server, but it’s not very clearly, I went to wrong way by follow up the KB.

    Deploy Avocent ACS v6000 virtual advanced console server

    1. Download the software image from Emerson website.

    2. Install the software on console server VM by follow up ACS v6000 Installer/User Guide.

    Configure Linux VM serial console

    1. Add a serial port to target Linux VM you want to use serial console.

    2. Configure the serial port, Select Use Network option.

    3. Select Client (VM initiates connection) option.

    4. Input ACSID in Port URI field.

    5. Select Use Virtual Serial Console Concentrator option.

    6. Input telnet://console server ip:8801 in vSPC URI field.

    7. Select Yield CPU on poll option.

    8. Make sure Connected and Connect at power on options are selected.
    Note: It indicates wrong setting on serial port if Connected option goes back to deselect status automatically after you save the setting.

    Enable kernel message on Linux VM

    1. Login to your target Linux VM by SSH.

    2. Copy following strings to SSH, it will enable kernel message on serial console.
    cat <<EOFEOF > /etc/init/serial-ttyS0.conf

    # This service maintains a getty on /dev/ttyS0.

    start on stopped rc RUNLEVEL=[2345]

    stop on starting runlevel [016]

    respawn

    exec /sbin/agetty /dev/ttyS0 115200 vt100-nav

    EOFEOF

    3. Run following command.
    initctl start serial-ttyS0

    Enable serial console on Linux VM

    1. Edit grub.conf by following command.
    vi /boot/grub/grub.conf

    2. Add following lines after hiddenmenu option.
    serial –unit=1 –speed=19200

    terminal –timeout=8 console serial

    3. Add following line in each kernel line.
    console=tty0 console=ttyS0,115200

    4. Reboot VM.

    Configure ASC v6000 console server

    1. Login management website of ASC v6000 console server.

    2. Go to PortsSerial Ports.

    3. Enable ttyS1 device.

    4. Go to Access option, you will see the serial console is automatically mapped to serial console of target Linux VM.

    Validation

    1. Login serial console of target Linux VM via console server by telnet, SSH or serial viewer.

    2. Login SSH of target Linux VM directly.

    3. On SSH session, run following command to trigger kernel message.
    echo h > /proc/sysrq-trigger

    4. You will see message on serial console screen.

  • Bought a Cisco Linksys WRT54G2 v1 Router

    My wifi router was purchased one years ago, for some reason it’s not stable now, sometimes lost package when I ping it. After chat with my friends Steven, he recommended Cisco Linksys WRT54G2 which he is using, a very stable router. You can install DD-WRT firmware and leverage more new free feature, such as NFS, firewall, VPN…etc. I’m newbie, I’ll try explore more on my spare time. That’s a used router on120RMB (around $20).

    I successfully installed it and turned on internet after 30 minutes, but I cannot log in my VPS by SSH on port 21, then I asked Steven’s VPS SSH to give a try, his port is 443, I cannot connect his also!! I suspected firewall on WRT54G2 maybe blocked the two ports since the router much like a Linux system, you can even run iptables command. Finally I figured out my network provider blocked port 21 and 443, how funny it is that I spend 3 hours to investigated firewall, routing table, wifi setting, NAT…etc. But forgot my sweet network provider!!

    大意了,大意了!没想到21和443同时被封了,搞得我以为是路由器设定问题,弄了3个小时!最后把VPS端口号改成8080,上的飕飕的。这让我想起弟弟的iPhone没有电话信号了,他做的第一件事是拿去经销商处修理,由于过年,需要30天才能返回,其实最简单的是去先换张卡看看是不是真的手机有问题。随着经验的积累,我们遇到事情好像也更复杂的看待,其实有时候复杂的搞不定还是可以从简单入手的,尤其是系统排错方面。不知IT项目实施方面是否也如此?

  • Error: No NIC found with MAC address…

    Your HP server may runs fine on ESXi 4.x or 5.0, but you may get error message No NIC found with MAC address xx:xx:xx:xx:xx:xx after upgrade to ESXi 5.1 or later.

    That’s caused by network adapter firmware, you have to upgrade server network adapter firmware by HP SPP 2013.02 or later. I would recommend you upgrade firmware of each component to this version, it’s pretty stable to run ESXi 5.1.

  • IPv6 link in NetApp SMVI backup log

    NetApp Virtual Storage Console is my favorite to manage and backup data on NetApp attached ESXi host, there is lot of benefits to secure VM data more efficient.

    The installation is pretty simple, and very less resource it requires, you can even install it on a multi-role virtual machine. But the first headache maybe the backup log.…

    The default report URL is IPv6 in NetApp Virtual Storage Console. You have to add parameter in wrapper.conf file manually. Here is detail steps:

    This procedure has to be repeated after NetApp Virtual Storage Console is upgraded.

    1) Shut down SMVI server (via Windows service).

    2) Open the wrapper.conf in C:Program FilesNetAppVirtual Storage Consolesmviserveretc

    3) Locate section

     

    Java Additional Parameters
    wrapper.java.additional.1=-XX:MaxPermSize=128m
    wrapper.java.additional.2=-Dcom.sun.management.jmxremote
    wrapper.java.additional.3=-Dcommon.dir=.
    wrapper.java.additional.4=-Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger

    4) Add following line:

    wrapper.java.additional.5=-Djava.net.preferIPv4Stack=true

    5) Start SMVI server (via Windows service).

  • I need some change in my life

    大约在10年前,我参加过一个CCNA的培训,认识了当时给我们上课的老师——杨佳,那时候他已经是CCIE了。说到CCIE、CCNA,就要先说说Cisco(思科)了。网络是通过路由器、交换机连接在一起的,这个地球上60%以上路由器、交换机是思科制造,可以这么说,思科创造并提供着网络世界。CCIE是思科公司产品专家的最高级别认证,每年只有很少的人可以通过这个考试,因为考试内容几乎全部是上机实战,很少一选择填空,而且是全英文的,一旦拿到CCIE意味着你掌握了非常丰富的网络知识,可以真的称得上网络专家了。我的老师杨佳就是其中一名。

    Today, I’m in company shutdown, have few spare time. I read his blog http://www.yangjia.org/, pretty interesting, look at his colorful life, come back to my life. That’s too much different! I admit single life is different with marriaged life, but that’s the life, the freedom I wanna to be! At least, I need some change in my life…

  • Hello world Can I start?!

    It’s be a while. Provisioning, formatting, and re-provisioning. Compare each Linux distribution, finally I decide to use Debian, since my Raspberry Pi official image also base upon Debian. I also registered this brand new domain to re-start my blog life.

    都不知道是第几次Hello world了,这次一定要开始了,先把之前在Wordpres的文章搬过来再说!

  • Unable to load status of objects in vCenter Server 5.1

    On today’s troubleshooting, I faced a very weird problem. vCenter Server services were up and running fine, it’s able to connect by vSphere client, but VMs, hosts show gray, and I cannot power on VM via PowerCLI.

    After went through each components of vCenter Server, I noticed the database size was 230GB, but only ~20 hosts were there. So I asked DBA team truncat event tables and shrink database. Issue gone after database optimization.

    You may want to do same if you face similar issue.

  • How to change password of vCenter Server service account

    Many company use service account for vCenter Server database and services. To compliance with security policy, you may need to change password of vCenter Server at regular period. This is a way I used to change password:

    1. Change the password of service account of vCenter Server and database in AD.
    2. Change the password of Log-On As account of vCenter Server/Management Webservices in Services.
    3. Run vpxd.exe -p command as administrator to change database password. ( It usually located on C:Program FilesVMwareInfrastructureVirtualCenter Server )
    4. RDP vCenter Server by service account.
    5. Open DSN of vCenter Server and click next button to save password to DSN.
    6. Reboot vCenter Server.

    Notes: You maybe able to logon vCenter Server if you just restart VC services, but you will face low performance to retrieve information of host, VM…etc.

    Most company may has vCenter Update Manager together with vCenter Server, the password change of vCenter Update Manager service account is similar like vCenter Server.
    1. Change the password of service account of vCenter Server and database in AD.
    2. Change the password of Log-On As account of vCenter Update Manager in Services.
    3. Run VMwareUpdateManagerUtility.exe as administrator. ( It’s usually on C:Program Files (x86)VMwareInfrastructureUpdate Manager )
    4. Input new database credential on Database Setting.
    5. Re-register to vCenter Server by new credential.
    6. Reboot vCenter Update Manager server.

    You can also reference to http://kb.vmware.com/kb/1006482 and http://kb.vmware.com/kb/1034605.

  • High KVAG and low VM performance when svmotion or clone

    If you are using EMC VNX with ESXi 5.1, you may experience low performance when do storage vMotion or VM clone.

    This is a known issue on VNX, you have to disable VAAI feature to avoid this problem.

  • How to find which ESXi 5.1 host lock the VM

    Sometimes VM may show unknown, invalid or orphan on vCenter Server, but it still running somewhere. Some technical support engineer may request reboot VM/ESXi host, or search on each host one by one.

    Declare: This article only apply to ESXi 5.1, I haven’t tested on other version.

    This is easiest way to find out which host lock the VM:

    1. SSH to any host on the cluster.
    2. Go to VM folder. ( Usually it’s under /vmfs/volumes/… )
    3. Run command:  vmkfstools -D “vmx file name” | grep owner
    4. Return line similar like this:
      gen 483, mode 1, owner 529495c4-0b6a7d90-a0f3-0025b541a0dc mtime 211436
    5. The red highlight section is MAC address of owner host.
    6. Run command: esxcfg-nics -l on each ESXi host to see which host match this MAC address.

    Then you need to remove the invalid VM from inventory, and login to the owner host by vSphere Client and import the VMX file again.

    This procedure can save lot of time to find the real owner host, but it still consumes time if it’s a large cluster. You want to more fast? It’s possible!

    After you find the MAC address, change it to regular format, like: xx:xx:xx:xx:xx:xx.

    Logon vMA console and connect to vCenter Server by command: vifptarget -s vCenter Server Name

    Run command: esxcfg-nics -h ESXi host name -l | grep xx:xx:xx:xx:xx:xx

    More fast?

    Try use Excel to list commands with all ESXi host name then past on console….