User Tools

Site Tools


UPC virtualized testbed

This testbed is deployed in the UPC lab with the Confine distribution installed inside KVM 1) virtual machines using the Proxmox Virtual Environment 2).

The nodes can be used in the Community-lab like other research devices.


There are deployed 10 virtual machines with the following specifications:

  • CPU: Core(TM) i7-3770 CPU @ 3,40GHz (one core/thread assigned)
  • Memory: 512 MB RAM
  • Storage: 10 GB disk
  • Network: 1 bridged virtual ethernet Interface (no wireless)

How to install

Here is explained how to install the Confine distribution in a KVM virtual machine using Proxmox Virtual Environment.

Set up a new VM

This example explains how to create the UPC-lab104-VM01 RD node.

1. Add the node in the Community-lab. Don't forget to set the architecture (i686), the group (DSG) and the tinc client island (UPCCloud).

2. Create a virtual machine (KVM) in the PVE web manager with the following configuration:

root@cloud2:~# cat /etc/pve/nodes/cloud2/qemu-server/101.conf
bootdisk: ide0
cores: 1
ide0: local:101/vm-101-disk-1.raw,format=raw,size=10G
ide2: none,media=cdrom
memory: 512
name: UPC-lab104-VM01
net0: e1000=62:44:00:CB:1A:BA,bridge=vmbr0
onboot: 1
ostype: other
sockets: 1

3. Build and download the firmware into the server's storage dir (optional to save the untouched images):

 root@cloud2:~# cd /var/lib/vz/
 root@cloud2:/var/lib/vz# mkdir confine
 root@cloud2:/var/lib/vz# cd confine
 root@cloud2:/var/lib/vz/confine# wget --user community-lab-user --ask-password --auth-no-challenge --no-check-certificate \

4. Uncompress the image file:

gunzip communitylab-firmware-UPC-lab104-VM01-i686.img.gz

5. Copy the image in the storage dir of the VM, resize and replace it:

  • Copy (or move if don't want to preserve original image):
root@cloud2:/var/lib/vz/confine# cp communitylab-firmware-UPC-lab104-VM01-i686.img /var/lib/vz/images/101/
root@cloud2:/var/lib/vz/confine# cd /var/lib/vz/images/101/
  • See the size of VM and firmware images, resize adding the difference between VM and firmware images sizes:
roor@cloud2:/var/lib/vz/images/101# ls -l
total 295720
-rw-r--r-- 1 root root   302514176 Oct 14 17:12 communitylab-firmware-UPC-lab104-VM01-i686.img
-rw-r--r-- 1 root root 10737418240 Oct 14 17:08 vm-101-disk-1.raw
roor@cloud2:/var/lib/vz/images/101# qemu-img resize communitylab-firmware-UPC-lab104-VM01-i686.img +$((10737418240-302514176)) 
  • Check if the firmware image has the correct size:
roor@cloud2:/var/lib/vz/images/101# ls -l
total 10496016
-rw-r--r-- 1 root root 10737418240 Oct 14 17:30 communitylab-firmware-UPC-lab104-VM04-i686.img
-rw-r--r-- 1 root root 10737418240 Oct 14 17:08 vm-204-disk-1.raw
  • Replace the VM image with the new resized firmware image:
roor@cloud2:/var/lib/vz/images/101# mv communitylab-firmware-UPC-lab104-VM01-i686.img vm-101-disk-1.raw

6. Now you can return to the PVE web manager and start your new virtual machine.

7. If all worked right you will be able to access to the node. At this point you maybe don't know the IPv4 address but IPv6, so you can check your node accessing over tinc management VPN.

8. After that, don't forget to execute inside the node the confine.disk-parted command to partition the whole disk and prepare it to set the Research Device to PRODUCTION.

testbeds/upc_virt.txt · Last modified: 2014/02/19 15:38 by ivilata