Skip to main content
Version: 0.3.0

VM Creation

It is time to create a VM.

  1. To get a hash of a password, we will use the mkpasswd utility.
    $ sudo apt install whois
    $ mkpasswd
    Password: mypassword
    $y$j9T$0/PuSDxIvi6GlhLZ6ddOI1$K9KTlLvUvH9eNzRA06EpagXsSds/tHTYTUTdDFbfv81
  2. Next, we will create a JSON file that describes my VM. The command node-client -desc vmcreate can provide more information about the JSON file format.
    configs/test-vm.json
    {
    "vm_mem" :"4",
    "vm_core" :"4",
    "vm_img_size":"64",
    "os_variant" :"ubuntu24.04",
    "vm_img_type":"local",
    "localpath" :"/storage/VM/images/",
    "fstype" :"ext4",
    "ipaddr" :"dhcp",
    "username" :"cluster-admin",
    "passwd" :"$y$j9T$0/PuSDxIvi6GlhLZ6ddOI1$K9KTlLvUvH9eNzRA06EpagXsSds/tHTYTUTdDFbfv81"
    }
  3. It's finally time to create the VM.
    $ node-client -S localhost -c vmcreate -v test-vm -f configs/test-vm.json
    Depending on the host and network, it will take some time for the VM auto-installation to be done. When it is done, the status of VM will be shut-off.
    $ node-client -S localhost -c list
    If you want to check the progress, you may connect to the vnc of the VM console. The VNC connection detail can be retrieved using node-client as well.
    $ node-client -S localhost -c vncdisplay -v test-vm
  4. Once the installation is finished, we start the test-vm, connect to it, and begin work.
    Once the VM is in shut-off state, we start the VM.
    $ node-client -S localhost -c vmstart -v test-vm
    To find the IP address assigned by DHCP, we again use node-client command.
    $ node-client -S localhost -c vm-domain-info -v test-vm -key ipaddr
  5. Now, we can connect to the VM through ssh using the IP provided by the previous command.

In this walk-through, our purpose is to demonstrate how to set up node-wizard and node client so that we can create a VM. To have concise and environment-independent commands, we use the same host for Node Wizard and Node Client. Normally, Node Client is not on a KVM host and handles multiple KVM hosts remotely.

Node Wizard supports many more features than just automated VM creation. It offers:

  • VM life cycle management
  • network (vxlan, vlan, bridge) creation
  • snapshots
  • templates / cloning
  • attaching disks and bridges
  • attaching host devices like GPUs and network devices such as Virtual Functions
  • network storage via Ceph RDB

For more information, see Node Client usage page.