Fix Ubuntu Server bash for internet accessing (DNS querying)

I have multiple devices installed with Ubuntu Server. Some of them have a strange problem:
They can access internet using some applications, such as squid, without any problem.
They can ping to internet IP address.
They can use host / dig to query IP by domain name.
They cannot ping to internet by using domain name directly.
They cannot download file through wget / curl using domain name, but can do with IP.
They cannot use apt, stuck at connecting.
All they use a local dnsmasq as their dns.

After a long time dig, I found the problem and here is the fix.
open the file /etc/nsswitch.conf, search the line with “hosts:” and change the setting to “files dns” (without quotes).

Web Deploy for Visual Studio

While I’m trying to deploy my site from Visual Studio to a Windows Server 2012 R2 instance, I have to dig a lot for troubleshooting about Web Deploy related problems.

 

Here are some not listed in Microsoft documents:

  • Visual Studio need both Web Deploy (Web Deployment Agent Service, MsDepSvc) and Web Management Service (WMSVC).
  • You cannot install Web Management Service separately.
  • The easy way to install the both is choose “Web Deploy 3.6 for Hosting Servers” Web Platform Installer.
  • If you selected “Web Deploy 3.6” in another release, without “for Hosting Servers”, Web Management Service will not be installed.
  • If you leave Web Deploy installed without Web Management Service, you could add it by install “Web Deploy 3.6 for Hosting Servers” but IT WILL NEVER WORK! You have to UNINSTALL existed Web Deploy first and then reinstall the “Web Deploy 3.6 for Hosting Servers”.

Install ubuntu server into Soekris net6501 by using USB boot

This will guide you to prepare a installation media from Windows and install ubuntu into Soekris net6501.

Stuffs you need:

  • a USB stick that CAN BE RECOGNIZED by net6501 device.
    Not sure? Attach it to net6501 and reboot. If you can read the SIZE of this stick while booting, it is.
  • an ISO file for ubuntu server 32-bit. Version 16.10 is tested.
  • rufus. Guide and download point at https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows.
  • a working serial connection from your workstation to your net6501, software included.

Prepare installation media:

  • Use rufus to build the USB stick. Check the guide above.

Install:

  1. Link net6501 to your computer using serial connection and start the link. In this case, I’m using the default setting (Speed=19200, Data bits=8, Stop bits=1, Parity=None, Flow control=XON/XOFF).
  2. Boot your net6501 with USB stick attached.
  3. Hit ctrl-p to go into bios.
  4. Type “boot 81” (without quotes) and press enter to boot from USB.
  5. You will see that something wrong with gfxboot.
  6. Type this text below SLOWLY and press enter. DO NOT COPY AND PASTE:
    install console=ttyS0,19200
  7. Do not press any key related to screen mode selection. It will be passed.
  8. Choose a language and continue installation steps as normal.

Finalize:

Grub configuration need to be adjusted for using serial as console.

Edit /etc/default/grub and change to these lines below:
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="console=ttyS0,19200 noplymouth"

Then run update-grub.

 

Hope this help you.

When you fall in love with Spanned Volumes

In our company, our major productive servers are hosted in vSphere as Windows-based virtual machines. Some of them need very big disks. Through the largest disk space supported in vSphere is 16TB (or maybe more, i dunno), I’m not interested to create such a big file in VMFS. It will be really a pain your *** when you have to move such a big file among datastores, even among data facilities by using portable hard drives.

Creating smaller disks instead of a big one for every Windows-based VM, IMHO.

Fortunately, Windows support to merge small disks as a big one, using dynamic disk function. There are 4 kinds of volume can be supported in such a condition: Spanned, Striped, Mirrored and RAID-5. You can consider them like JBOD, RAID-0, RAID-1 and RAID-5 functions in a simple legacy storage device.

Because data protection is existed in the SAN, Mirrored and RAID-5 volumes are not considered at all. Striped will make it a little faster when lots of virtual disks fight for limited IOPS resources within one datastore. But there is no way to extend any stripped volume (https://technet.microsoft.com/en-us/library/cc770938.aspx).

So, the useless volume format in a traditional world, spanned volume, is the best solution, maybe the only one. Next time when you need to create big virtual disks for Windows in any virtualization environment, don’t forget to consider using Spanned Volumes.

[Obsoleted] Windows 10.0.14393 cannot work with WSUS, yet

After several weeks testing, I’m sad to tell you all that at least currently, Windows 10.0.14394 (aka 1607) still cannot work with WSUS.

Problem: If there is Windows related package push from WSUS, svchost processes on Windows clients keep crashing.

 

Check this for details: https://social.technet.microsoft.com/Forums/windows/en-US/31718a20-64dd-43f7-87d7-c86f03f74a4d/14393-windows-update-crash-every-minute?forum=win10itprogeneral

Strange problem: VMware Inventory Service cannot start due to Microsoft Update (July 2016)

In one datacenter of my company, there was a strange problem last month of VMware vSphere.

Here is our structure:
SqlServer instance for vSphere is installed dedicated on cluster server. SqlServer version is 2012 Enterprise and Windows is 2012R2 Standard
vCenter is installed on another server.

After we applied July patches from Microsoft and restart the vCenter server, nearly all services from VMware cannot start. In event viewer, one event said:

The VMware Inventory Service service terminated with the following service-specific error:
Incorrect function.

As the request from VMware support, I uninstalled all updates related and reboot but it won’t help. I thought there may be some error related to the database connection. I ran the connection test from ODBC setup window, test finished succeeded. So I collected and submitted the log file generated from vCenter server command line. You know it’s really huge.

2 weeks later, I got an email from the high level engineers of VMware. By digging the log, they found that the vCenter cannot connect to SqlServer and the tcp service port is specified. At that moment, thanks to documentation I wrote :), I found that tcp service port is different than it should be. When I checked the SqlServer, I found the reason really weird: the TCP port of this instances is modified, automatically and silently. Due to I really used vSphere client just before upgrading Windows, I’m quite sure this issue is related to at least one of the patch which applied on the database cluster, launched by Microsoft in July 2016. And after a search, there is another instance of SqlServer which has the port changed. Due to the port changed and our firewall policy is set based tcp port, the client, vCenter in this issue, cannot connect to this SqlServer instance. After the port setting changed back and instance restarted, vCenter is back to normal.

Don’t ask me why ODBC test passed without any problem. If you know the answer, I’m listening as well.