Home > Virtualization > Alpine Linux on vSphere: Is it Really Small in Size?

Alpine Linux on vSphere: Is it Really Small in Size?

April 11th, 2017 Leave a comment Go to comments

I came to know the Alpine Linux because of its small image size for Docker. Unlike almost 200MB in size of popular CentOS and Ubuntu, it just needs 5MB. That made me wonder if I can get much smaller Linux VM using the Alpine distro for special use cases like network tools.

There is a wiki page on Alpine Website Install Alpine on VMware (https://wiki.alpinelinux.org/wiki/Install_Alpine_on_VMware). The overall steps are correct, but the author does not seem to know the trick in the step 3 on how to get into the BIOS setting. In the VM settings dialog box, you can actually click on a check box for that. Anyway, the commands there are not all required as I found out later. To install the Alpine onto disk, you only need the setup-alpine command.

Time to learn how to "Google" and manage your VMware and clouds in a fast and secure

HTML5 App

On the download page, I found quite a few types of downloads. Because I would install it on VMware, I first tried the VIRTUAL edition size about 25MB, and that didn’t work well. Then, I found an article explaining that the VIRTUAL edition is meant to be run on Windows in a similar way as VirtualBox. Didn’t understand what that means exactly, but moved onto the STANDARD edition, which is about 78MB in size. While writing this post, I think I may have encountered the same disk size issue as STANDARD with the VIRTUAL EDITION.

Because I had an impression of super small size, I initially gave the disk 128MB capacity. It didn’t work and failed in the installation. Then I increased it to 256MB, failed again; then 512MB, still failed. It finally worked with 1024MB disk. After a few time of installation, I could almost answer the questions with eyes closed.

After rebooting the OS as suggested, I typed ifconfig and only it showed nothing, not even the lo interface. That surprised me a lot because I actually selected dhcp while installation. Fixing this is not hard. Just edit the file /etc/network/interfaces with vi editor:

# vi /etc/network/interfaces
auto lo
iface lo inet loopback
 
auto eth0
iface eth0 inet dhcp
hostname alpine1
 
# /etc/init.d/networking restart

Then, the networking recovers.

Also missing is the openssh even though it’s selected during installation. To install it is also easy:

# apk add openssh
 
# /etc/init.d/sshd restart

After that is done, I also installed the open-vm-tools with the apk command. If I remember correctly, the disk size required is pretty big, 50MB.

When all are done, time to test the big question: how big is it?

I then exported it to local disk. The size for the exported OVA is about 317MB in size. Compared with the mini install of CentOS (about 441MB without open-vm-tools installed), it’s a good reduction in size. But it’s not as big as I had expected, maybe within 100MB.

Because I’ve been using CentOS Mini for a while, it’s probably a good idea to continue to use it given the size comparison.

Categories: Virtualization Tags: , , ,
  1. April 11th, 2017 at 01:34 | #1

    [DoubleCloud] Alpine Linux on vSphere: Is it Really Small in Size? https://t.co/es23A3hHgO

  1. No trackbacks yet.