Nodegrid and Virtual Machines

Nodegrid and Virtual Machines

To use VMs with Nodegrid, you need to enable the service and add a VM license. If you don't have a VM license for Nodegrid OS, you can reach out to your account manager or contact support@zpeystems.com. Without a VM license, your container will be automatically terminated after a few minutes.

The minimum storage disk available varies depending on the Nodegrid device model. For NetSR, GateSR, BoldSR, and NSCP devices, a minimum of 32GB of storage disk is available. HiveSR, LinkSR, and MiniSR devices have a minimum of 16GB. In most cases, you can customize the storage size. To learn more about available storage accessories that you can add to your Nodegrid device, contact your account manager or contact support@zpesystems.com

If you need additional storage for Nodegrid, you can also use a USB drive. The following tutorial will guide you through the process of adding your VM license, setting up the USB drive, and creating a Storage Pool on the USB:


Virtual Machine License and Virtualization Service activation from GUI 

To activate the Virtual Machine License and enable the Virtualization Service in Nodegrid using the GUI, follow these steps:
  1. Log in to Nodegrid's WebUI as an admin.
  2. Navigate to System and click on License.
  3. Click on the Add button to add a new license.
  4. Enter the VM license key and click Save to add the license to Nodegrid.
  5. Go to Security and click on Services.
  6. Under the Enable Virtualization Services section, check the boxes for Enable Qemu/KVM and Enable VMware Manager.
  7. Click Save to enable the Virtualization Services.
  8. Optional: If you want to allow VMs to be accessed using an IP address, enable IPv4 IP Forwarding. Go to "Network" and click on Settings. Select Enable IPv4 IP Forward and click Save.
  9. Now you should be able to see the Application menu, which includes Virtual Machines.
  10. To check and mount a USB drive in Nodegrid using the CLI, follow these steps:

Check/Mount USB 
1. Login as admin in CLI and go to shell using "shell sudo su -" 
2. Make sure the external disk is connected to your Nodegrid and run command lsblk -f 
Nodegrid OS should automatically mount the USB drive in /run/media/sdb1.In this example,  the usb device is using NTFS,  we must use ext4. If you device is already mounted and using FSTYPE ext4, you can ignore the next steps. 
3. Run umount /run/media/sdb1
4. Format partition to ext4 using command mkfs -t ext4 /dev/sdb1. Write y and hit enter
6. Run mount /dev/sdb1 /run/media/sdb1

Create a Storage Pool
1. Navigate to Applications :: Virtual Machines. Click Storage Pools.



2. Click Create Storage Pool
3. Type your storage pool name. In type, select Filesystem directory and add the target path of your mountpoint. Click Create.


4. Your storage is created. Check if your state is active, if not, click Activate to enable your storage pool. 
5. To complete the Storage pool configuration, you must create a volume. Select your storage pool :: Storage Volumes :: Create Volume. 



6. You can have one or multiple volumes in your storage pool. Define the name, size and select the Format qcow2 for your volume. Click Create

7. Return to Applications :: Virtual Machines menu. 

Create a Virtual Machine
1. Click Create VM 
2. In this example, I'm installing a VM from an Ubuntu ISO file transfered to my Nodegrid device. The ISO must be inside /var/lib/libvirt/images/ folder. 
Type your VM name;
In Installation type, select Local install media (ISO image or distro install tree)
In Installation source, type the path to your ISO
Nodegrid should detect your Operating system automatically
Select your Storage and Volume
Define the Memory
3. Click Create and Run




4. Click on the VM name to access your VM Overview and Console. The VM creation process is complete.