How to Configure and run a VM with WebVirtMgr on NethServer
On Nethserver GUI
1) Install VMM Package
Install through the software center the Virtual Machines Manager package.
2) Configure VVM Package
After the installation process you can configure the Virtual Machine packacge's through the menu. Enable both the Console and the Virtual machine manager, and set a password.
3) Add bridge interface(s)
Add a bridge interface. Go in Network section on the menu. Click on 'New Interface button' and create a new bridge interface.
On WebVirtMgr GUI
4) Access WebVirtMgr Page
Go on the WebVirtMgr Page <IP>:8000 and click on “localhost” to see the active istances.
5) Add Storage
Go to Storage section. Create two storage. One for the VMs disk like this:
One storage for iso file:
Create the folder
mkdir /var/lib/libvirt/iso
Result:
6) Upload your ISO
Click on the green iso link and upload the iso of the OSs you want to install.
7) Create new istances
Go to Instances and click “new istances” In this page you can choose to use a predefined cpu,memeroy and hardisk size or use a custom template. Chose the one that fits your needs. NB: if you want to add more Network interface or more hardisk you have to choose the custom template.
If you want to add a disk to an existing VM you can edit the XML configuration file ( Settings→XML )
Add under the <devices> section:
<disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/sdb'/> <target dev='sdb' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='5'/> </disk>
NB: Replace sdb with the correct drive!
If you want to add a NIC to an existing VM you can edit the XML configuration file ( Settings→XML )
Add the new bridge interface on Nethserver gui and WebVirtMgr and add under the <devices> section:
<interface type='bridge'> <mac address='52:54:00:12:34:56'/> <source bridge='br1'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </interface>
NB: Replace MAC, slot e interface name!
8) Select the media to install
Now on the VM page go to: Settings→Media and choose the iso to use for OS install and click connect.
If you want to install a Microsoft Windows OS you need also the virio drivers.
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
9) Start the VM
Add a password to protect the vnc connection.
Edit the config xml (Settings→XML) adding passwd='your_password' in the “<graphics type” section.
Example:
<graphics type='vnc' port='5902' autoport='yes' listen='0.0.0.0' keymap='it' passwd='your pssword'>
Go to power and press “start!”
10) Web Console
You can access the VM with the webconsole (Access→Console click “Console” button)
You can use any VNC client (like Vinagre on linux) instead the webconsole. See on witch port the vnc server is running by finding it in the xml config(Settings→xml).
example:
<graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0' keymap='it'>
You can connect to <your_NS_IP>::5900