The starting point our lab is the following:
1 STEP – CREATE VM ON HOST SERVER VIA KVM CONSOLE
Run the following command:
$: sudo mkdir -p /var/kvm/images
$: sudo virt-install \
--name ubuntu1804 \ --ram 4096 \ --disk path=/var/kvm/images/ubuntu1804.img,size=30 \ --vcpus 2 \ --os-type linux \ --os-variant ubuntu16.04 \ --network bridge=br0 \ --graphics none \ --console pty,target_type=serial \ --location 'http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/' \ --extra-args 'console=ttyS0,115200n8 serial'
let’s proceed with the installation of ubuntu 18.04 and complete all tasks.
Very important that we scroll all the way down using our arrow keys and select “OpenSSH Server” using the space bar before continuing.
to list the VM use
$: virsh list Id Name State ---------------------------------------------------- 1 ubuntu1804 running
After finishing installation, back to KVM host and shutdown the guest like follows
$: virsh shutdown ubuntu1804
In case we decided to delete the VM we must use this command before of its shutdown:
$: virsh destroy ubuntu1804 $: sudo rm /var/kvm/images/ubuntu1804.img
2 STEP- ADD KVM-BACKED NODE ON MAAS
Now it’s time to adding our KVM node on MAAS, let’s go on MAAS dashboard -> Machines. From that we can adding either a new chassis (useful to see all VM created via KVM) or a new machine to add only one. For our lab we have used the chassis. As Address to use this command:
save that and after few second we’ll see the VM previously created.
This task is done.
3 STEP – COMMISSION THE NODE
Let’s continue with the guide, it’s the time to Acquire and running the commission of our KVM node
at the end of this task we’ll have that
then acquire it
4 STEP – DEPLOY THE NODE
Once our node is in Ready status we can deploy our Ubuntu 16.04 LTS Server Edition definitely on it and having the control of that.
at the end on our KVM node will be deployed Ubuntu 18.04 LTS Server Edition.
The forth part is done see you to next one.
Disclaimer: All the tutorials included on this site are performed in a lab environment to simulate a real world production scenario. As everything is done to provide the most accurate steps to date, we take no responsibility if you implement any of these steps in a production environment.
“We learn from our mistakes”