CentOS 7 for Building Virtual Appliance

I started to play with CentOS 7 recently because I wanted to use it for one of my appliance products. Naturally, I installed the minimum version of the CentOS 7.0.

While it takes time, the installation process is pretty straight-forward like installing any other Linux on a virtual machine. What I did was to upload the .iso file to a datastore, then create a new virtual machine that uses the iso file as CD device. When it booted, the installation started. Although it’s minimal version, but the installer is actually GUI based. So it’s pretty intuitive.

Bothered by SLOW Web UI to manage vSphere? Want to manage ALL your VMware vCenters, AWS, Azure, Openstack, container behind a SINGLE pane of glass? Want to search, analyze, report, visualize VMs, hosts, networks, datastores, events as easily as Google the Web? Find out more about vSearch 3.0: the search engine for all your private and public clouds.

Immediately, I got first problem. I want to see IP address of the virtual machine just installed so that I can remotely SSH to it. To my surprise, the ifconfig command does not work. As I searched the Web, it’s actually not included there. It can be, however, installed using the yum command. But since it’s virtual appliance, I didn’t want the extra because there is already an alternative as follows.

# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8a:3a:99 brd ff:ff:ff:ff:ff:ff
...

With that, I came to second problem – there is no IPv4 address. It turned out that I used the VMX3 adapter in hope that it performs the best, but I didn’t install VMware Tools which includes the driver.

To solve the problem, I had two options: install the VMware Tools, or change the adapter to e1000 NIC. After considering the options, I decided to change the NIC type. After that, it worked pretty well. Notice that the interface name is no longer eth0, but something like ens33. If you really want to use the old name, you can configure it that way.

After the two problems, building the appliance is not much different from using older version of CentOS except the systemctl command vs service command. The overall experience has been very positive.

This entry was posted in Applications & Tools and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Posted July 29, 2015 at 3:03 am | Permalink

    Nice post.

    The older CentOs was fun to work with, and since it takes only 2 tweaks to get it to work as quickly as the new CentO7 is rather interesting and the only difference would be services commands.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  • NEED HELP?


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.