Installing Nano Lightweight Virtual Machine Management Software on CentOS 7

Publish: 2020-05-10 | Modify: 2020-05-10

Nano is a virtual machine management software based on KVM technology and developed using Go language. It is simple, easy to learn, and feature-rich. It provides a complete solution for web management portal, host monitoring, image cloning, and failover. Similar to virtualization management platforms like noKvm and Proxmox VE, Nano can be installed easily without the need for third-party software or libraries.

Server Requirements:

  • X86 server with virtualization support or nested virtualization enabled (Intel VT-x/AMD-v)
  • 2 cores, 4GB RAM, 50GB disk, and a network device
  • CentOS 7.7 (1908) Minimal installed and network ready
  • Firewalld service started and running
  • If using Raid/LVM, configure it before installing Nano

To install Nano, run the following commands:

# Download Nano
wget https://nanos.cloud/files/nano_installer_1.2.0.tar.gz
# Extract
tar zxfv nano_installer_1.2.0.tar.gz
# Enter the directory
cd nano_installer
# Install
./installer

During the installation, you will be prompted to choose modules. In most cases, select option 3 (all) for installation. If you're unsure about other options, keep the defaults. The installation usually completes in a few minutes.

To run Nano, navigate to the /opt/nano/ directory and start the following services:

cd /opt/nano/core
./core start
cd ../cell
./cell start
cd ../frontend
./frontend start

Once the front-end module is successfully started, it will display a listening address like "192.168.6.3:5870". Open this address in Chrome or Firefox to access the platform management portal. The first time you access the web interface, you will be prompted to set up an account and password.

After accessing the Nano web interface, you will see the following interface, which is quite visually appealing.

To get started, follow these steps:

  1. Set up a compute resource pool.
  2. Set up an address pool. Make sure the addresses are valid and within the same network.
  3. Upload system images to be used as virtual machine templates.
  4. Create virtual machines by selecting the desired options and starting the system installation.

There may be some issues encountered, such as not being able to send the Ctrl + Alt + Del shortcut from the console when using Windows Server 2019. The solution is to use a VNC client for connection.

When viewing resource monitoring, if the browser reports insufficient memory, it is likely to occur on Windows virtual machines. The solution is to install the virtio driver and qemu agent. The download link for the virtio driver is https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.173-9/virtio-win.iso. Without these drivers, Nano may freeze when viewing virtual machine resource monitoring.

To manage Nano more conveniently, you can use the provided script nano.sh. Download it and make it executable using the following commands:

# Download management script
wget -O /usr/sbin/nano https://raw.githubusercontent.com/helloxz/shell/master/nano.sh
# Add execute permission
chmod +x nano

After adding the script, you can use the following commands to manage Nano easily:

# Check Nano status
nano status
# Stop Nano
nano stop
# Start Nano
nano start
# Restart Nano
nano restart

To set Nano to start on boot, create a new nano.service file in /etc/systemd/system/ with the following content:

[Unit]
Description=Nano - https://nanos.cloud/
After=network.target

[Service]
Type=forking
ExecStart=/usr/sbin/nano
ExecRestart=/usr/sbin/nano restart
ExecStop=/usr/sbin/nano stop

[Install]
WantedBy=multi-user.target

After adding the service, run systemctl daemon-reload to refresh the newly added nano service. Then, you can use systemctl to manage Nano:

# Enable Nano to start on boot
systemctl enable nano
# Start Nano
systemctl start nano
# Stop Nano
systemctl stop nano
# Restart Nano
systemctl restart nano

Note that this service depends on the nano.sh script, which is available on GitHub.

In conclusion, Nano is a virtual machine management software developed in Go language. It is easy to install and does not require any third-party software or libraries. Compared to other virtualization management platforms, Nano is easier to install and less prone to errors. However, it may have some limitations, such as the need to upload system images online and the inability to send Ctrl + Alt + Del from the web console when using Windows virtual machines. Nano is licensed under MIT, allowing for personal, modified, or commercial use without restrictions.


Comments