[one-users] Changes in 3.0 template network syntax
Steven Timm
timm at fnal.gov
Wed Sep 14 07:39:44 PDT 2011
It appears that there have been several changes in the
syntax of the NETWORK section in OpenNebula 3.0 which
make templates for version 2.0 no longer work.
Below is my template as modified for OpenNebula 3.
I was previously using NETWORK = "FermiCloudTest" (the name of the
network) and it now appears I have to change the NIC section
to say NETWORK_ID = 1 (the number of this network).
but NOT change the contextualization section, which still
requires the name of the network. Anyway, this template is now
syntactically correct but when I try to launch it
I get the error:
bash-3.2$ onevm create test-kvm-3.one
[VirtualMachineAllocate] User [1] : Not authorized to perform USE NET [1].
-----------------------------------------------------------
So two questions--why did they change the syntax? It is easier
for users to remember the name of the network than the ID of the
network particularly since users now can't do onevnet list, and
it renders all of our existing templates (dozens of them) broken
and we will have to change them.
And second, why can not the user pick the network they want.. is
there some ACL that has to be set now? If so, where?
Steve Timm
-------------------------
NAME = test-kvm
VCPU = 1
MEMORY = 2048
#OS = [
# kernel = /vmlinuz,
# initrd = /initrd.img,
# root = sda1,
# kernel_cmd = "ro xencons=tty console=tty1"]
DISK = [
source = /cloud/images/OpenNebula/images/current-image.img,
save = yes,
target = vda,
readonly = no ]
DISK = [
type = swap,
size = 5120,
target = vdb ]
DISK = [
type = fs,
size = 4096,
format = ext3,
save = yes,
target = vdc,
bus = virtio ]
NIC = [ NETWORK_ID = 1 , model = virtio ]
FEATURES=[ acpi="yes" ]
GRAPHICS = [
type = "vnc",
listen = "127.0.0.1",
port = "-1",
autoport = "yes",
keymap="en-us" ]
CONTEXT = [
ip_public = "$NIC[IP, NETWORK=\"FermiCloudTest\"]",
netmask = "255.255.254.0",
gateway = "131.225.154.1",
ns = "131.225.8.120",
files = "/cloud/images/OpenNebula/templates/init.sh /home/timm/OpenNebula/k5login /home/timm/OpenNebula/link_certs.sh",
target = "hdc",
root_pubkey = "id_dsa.pub",
username = "opennebula",
user_pubkey = "id_dsa.pub"
]
REQUIREMENTS = "HYPERVISOR=\"kvm\""
RANK = "- RUNNING_VMS"
------------------------------------------------------
[root at fgitb317 var]# onevnet show 1
VIRTUAL NETWORK 1 INFORMATION
ID : 1
USER : oneadmin
GROUP : oneadmin
PUBLIC : Yes
USED LEASES : 0
VIRTUAL NETWORK TEMPLATE
BRIDGE=br1
LEASES=[ IP=131.225.154.169, MAC=54:52:00:02:b5:00 ]
LEASES=[ IP=131.225.154.170, MAC=54:52:00:02:b5:01 ]
LEASES=[ IP=131.225.154.171, MAC=54:52:00:02:b5:02 ]
LEASES=[ IP=131.225.154.168, MAC=54:52:00:02:b5:03 ]
NAME=FermiCloudTest
TYPE=FIXED
LEASES INFORMATION
LEASE=[ IP=131.225.154.168, MAC=54:52:00:02:b5:03, USED=0, VID=-1 ]
LEASE=[ IP=131.225.154.169, MAC=54:52:00:02:b5:00, USED=0, VID=-1 ]
LEASE=[ IP=131.225.154.170, MAC=54:52:00:02:b5:01, USED=0, VID=-1 ]
LEASE=[ IP=131.225.154.171, MAC=54:52:00:02:b5:02, USED=0, VID=-1 ]
--
------------------------------------------------------------------
Steven C. Timm, Ph.D (630) 840-8525
timm at fnal.gov http://home.fnal.gov/~timm/
Fermilab Computing Division, Scientific Computing Facilities,
Grid Facilities Department, FermiGrid Services Group, Group Leader.
Lead of FermiCloud project.
More information about the Users
mailing list