Site Tools


opennebula

This is an old revision of the document!


Frontend

Para frontend se usa una maquina virtual.

Preparación del host

Bridge para la VM

victor@cerebro:~/bin/qemu$ cat /etc/netplan/01-netcfg.yaml 
network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      dhcp4: no
  bridges:
    br0:
      addresses: [192.168.1.10/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [208.67.222.222, 208.67.220.220]
      interfaces:
        - enp2s0

Creacion VM

victor@cerebro:~/bin/qemu$ cat start_openNebula_frontend_bridge.sh 
#!/bin/bash
exec qemu-system-x86_64 -enable-kvm \
        -cpu host \
        -drive file=DISKS/OpenNebula_Frontend_amd64.qcow2,if=virtio \
        -device e1000,netdev=net0,mac=DE:AD:BE:EF:00:FA \
        -netdev tap,id=net0,script=/home/victor/bin/qemu/SCRIPTS/kvm-ifup,downscript=/home/victor/bin/qemu/SCRIPTS/kvm-ifdown \
        -m 2G \
        -smp 2 \
        -nographic \
        -serial mon:stdio \
        -name "Open Nebula Frontend" \
        #$@
cat kvm-ifup 
#!/bin/sh
set -x

switch=br0

if [ -n "$1" ];then
        # tunctl -u `whoami` -t $1 (use ip tuntap instead!)
        ip tuntap add $1 mode tap user `whoami`
        ip link set $1 up
        sleep 0.5s
        # brctl addif $switch $1 (use ip link instead!)
        ip link set $1 master $switch
        exit 0
else
        echo "Error: no interface specified"
        exit 1
fi
cat kvm-ifdown 
#!/bin/sh 
# 
# Script called by kvm on tap interface deletion 
# 
basename $0 -ifdown|sed -e 's/^[^-]*-\?//'
KVM_BR=`basename $0 -ifdown|sed -e 's/^[^-]*-\?//'` 
KVM_BRIDGE=${KVM_BR:-$KVM_BRIDGE} 
echo "$0:" 
echo "Removing $1 from bridge $KVM_BRIDGE" 
ip link set "$1" down 
brctl delif "$KVM_BRIDGE" "$1"

Backend

Storage

opennebula.1642185652.txt.gz · Last modified: by victor