VM Creation
It is time to create the Node Wizard demo VM.
- The Node Wizard needs an encrypted password to set up the user account in the VM. I'll install the mkpasswd utility and then use it to generate a hash from my password.
dev-user@local-dev:~$ sudo apt install whois
dev-user@local-dev:~$ mkpasswd
Password: YourPassword
$y$j9T$wGRgLBMeecXudQJjJ4BMk.$j3Eil5Pxykb.babzriPpAvOnbfbG8iAfRr0SqfvF9P/ - Next, I will create the JSON file that describes my VM. The JSON file contains values for memory, core counts, OS variants, user accounts, and much more. The command
node-client -desc vmcreate
can provide more information about the JSON file format.dev-user@local-dev:~$ nano Node-Wizard-demo1.json
{
"vm_mem":"8",
"vm_core":"4",
"vm_img_size":"128",
"os_variant":"ubuntu22.04",
"vm_img_type":"local",
"localpath" :"/storage/VM/images/",
"fstype" :"xfs",
"ipaddr":"192.168.7.206/18",
"username":"dev-user",
"passwd":"$y$j9T$wGRgLBMeecXudQJjJ4BMk.$j3Eil5Pxykb.babzriPpAvOnbfbG8iAfRr0SqfvF9P/"
} - It's finally time to create the VM. Typically, you would use virt-install to begin the setup, connect with VNC, and click through multiple OS installation menus. I did that on this server to set up my other VMs. Now, the Node Wizard handles those steps on our behalf. If you have ever set up many VMs on multiple hosts, you'll see how much easier Node Wizard is compared to alternative methods.
It will take a few minutes for the VM to be created. If you want, the automated installation can be monitored via VNC. The Node Client can provide the VNC port.
dev-user@local-dev:~$ node-client -c vmcreate -S 192.168.6.206 -v Node-Wizard-demo1 -f ./Node-Wizard-demo1.json
Starting install...
Retrieving 'vmlinuz' | 0 B 00:00 ...
Retrieving 'initrd' | 0 B 00:00 ...
Allocating 'Node-Wizard-demo1.img' | 0 B 00:00 ...
Creating domain... | 0 B 00:00
Domain is still running. Installation may be in progress.
You can reconnect to the console to complete the installation process.
VM [Node-Wizard-demo1] installation is started. To check the status using vnc, use -c vncdisplayOtherwise, I check the VM status with the Node Client. Here, the Node Client is also reporting on all my existing VMs. Once the new VM, Node-Wizard-demo1, is finished installing, the VM will be in a shut-off state.dev-user@local-dev:~$ node-client -c vncdisplay -S 192.168.6.206 -v Node-Wizard-demo1
5900dev-user@local-dev:~$ node-client -c list -S 192.168.6.206
vm name vm state
------------------ -------------
Node-Wizard-demo1 running
VM1 running
VM2 running
Server1 running
Server2 running
Server3 running
...
dev-user@local-dev:~$ node-client -c list -S 192.168.6.206
vm name vm state
------------------ -------------
Node-Wizard-demo1 shut-off
VM1 running
VM2 running
Server1 running
Server2 running
Server3 running - Once the installation is finished, I can start the Node-Wizard-demo1, connect to it, and begin work.
dev-user@local-dev:~$ node-client -c vmstart -S 192.168.6.206 -v Node-Wizard-demo1
dev-user@local-dev:~$ ssh dev-user@192.168.7.206
Node Wizard can handle so much more than just automated VM creation. It offers:
- snapshots
- templates
- attaching host devices like GPUs and network devices such as Virtual Functions
- VM life cycle management
- network storage via Ceph RDB
For more information, see Node Client usage page. Thanks for walking along as I set up my two hosts with Node wizard and Node client.