KB ID 0001695
I’ve been working on a load balancing lab in EVE-NG this last week or so. I created some web servers (in TinyCore Linux,) to act as the web servers in that lab. (Essentially they serve a different colour web page so I can test the load balancing is working OK).
Now I wanted to save the changes I made so that I could redeploy the configured servers to multiple labs. But when you deploy a qemu VM as a node in a lab, EVE-NG copies the VM to the lab, and the changes you make, only apply to the node, in the lab, in the pod, you are working on!
So I wanted to update the ‘Master‘ image in EVE-NG, with the one I configured. Here is how to do that;
Firstly you need to get your POD NUMBER, you can get that from the user management screen, below you can see my user, (you can see already logged on), is using pod number 1.
Now you need to get the LAB ID NUMBER. Open the lab > Shut down the machine that you want to save the changes from > Lab Details > Copy the lab ID number.
Lastly you need the NODE ID NUMBER. Either select Nodes and take note of the number, or right click the node and the node ID is shown (in brackets).
Armed with those three pieces of information, SSH into the EVE-NG host, and execute the following commands;
cd /opt/unetlab/tmp/POD-NUMBER/LAB-ID/NODE-ID/ for example; cd /opt/unetlab/tmp/1/2277307f-b0bc-45a4-831f-a89a716b5841/3/
Now depending on the VM/Appliance in question, it may be called hda.qcow2, or virtioa.qcow2 (a quick ls command will tell you!) Take the name and commit the changes with the following command;
/opt/qemu/bin/qemu-img commit hda.qcow2
Yes but you wanted three different servers? Correct, I then copied the server (twice) edited the IP address, and the web page served on the two copies and committed the changes back to the original VMs!
Related Articles, References, Credits, or External Links