User Tools

Site Tools


testbeds:upc_virt

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.

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)
NameIPv4IPv6MAC
UPC-lab104-VM0110.139.40.21fdf5:5351:1dfd:a2::262:44:00:CB:1A:BA
UPC-lab104-VM0210.139.40.20fdf5:5351:1dfd:a3::2E6:5D:95:E2:1D:2E
UPC-lab104-VM0310.139.40.19fdf5:5351:1dfd:a4::24A:09:C7:E5:B6:C8
UPC-lab104-VM0410.139.40.31fdf5:5351:1dfd:a5::2C2:6D:C3:DD:6B:53
UPC-lab104-VM0510.139.40.35fdf5:5351:1dfd:a6::29A:B7:84:5E:F2:B2
UPC-lab104-VM0610.139.40.42fdf5:5351:1dfd:a7::2BA:BC:74:7B:F0:9F
UPC-lab104-VM0710.139.40.47fdf5:5351:1dfd:a8::256:09:19:49:E6:4B
UPC-lab104-VM0810.139.40.51fdf5:5351:1dfd:a9::24E:AE:9B:81:D0:23
UPC-lab104-VM0910.139.40.52fdf5:5351:1dfd:aa::282:B7:1D:D4:37:4A
UPC-lab104-VM1010.139.40.53fdf5:5351:1dfd:ab::26A:77:A4:0E:4B:03

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 \
 https://controller.community-lab.net/private/firmware/build/image/162/communitylab-firmware-UPC-lab104-VM01-i686.img.gz

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