Ubuntu 14.04 - Getting Started with KVM using PHP Helper Script
This post carries on from my previous article on how to install KVM on Ubuntu 14.04. To make life easier, I have created a PHP tool help you create guests on your KVM host.
The tool requires PHP, and you will need git in order to fetch the tool so go ahead and install them.
sudo apt-get update
sudo apt-get install php5-cli git -y
Now we are going to fetch the tool and use the Ubuntu 14.04 branch.
git clone https://github.com/programster/KVM-Command-Generator.git
git checkout ubuntu14.04-1.1.1
Using The Tool
Simply call the script and answer all the questions.
After having answered all the questions, copy the command it outputs and execute it.
Watch the guest get set up in text-mode in front of your eyes.
Voila! You know have a guest instance. The username and password are both
ubuntu for Ubuntu VMs, and
root for Debian. You may want to change this.
- If you use the KVM script to deploy an Ubuntu guest, the default username and password are both ubuntu. Please change this after installation.
- The KVM script will deploy guests as minimally as possible. You will need to install the
acpipackage in the guests for the virsh commands on the host to be able to shutdown/reboot guests.
If you see the following message:
Error in network device parameters: Virtual network 'default' has not been started.
Then run the following command:
sudo virsh net-start default
KVM and Virtualbox appear to not work simultaneously on the same host. If you are running Virtualbox whilst you try to create an instance, you may see the following:
ioctl(KVM_CREATE_VM) failed: 16 Device or resource busy
failed to initialize KVM: Device or resource busy
First published: 16th August 2018