[one-users] Opennebula 3.8.3 - Sunstone is not working correctly

Johannes Thome johannes.thome at electrica.cujae.edu.cu
Mon Feb 4 08:30:54 PST 2013


Hello, I installed Opennebula 3.8.3 with sunstone on a 64 bit computer 
with ubuntu 12.04
i have only one pc so i have only the front-end. Hopefully it works if 
i try to run the VM's on my computer.

Please check somebody if i missed something in my installation or 
configuration and why i got this error in Sunstone:

MESSAGE 	Error executing image transfer script: Error copying 
chivas-Aspire-5755G:/var/lib/one/datastores/1/e709ae07335f01fdb1d23730860d07d6 
to Host01:/var/lib/one//datastores/0/0/disk.0

----------------------------------------------------------------------------------

How I installed Opennebula 3.8.3 with KVM:

Programs which are useful for the installation process:

Mc

# apt-get install mc

Synaptic:

# apt-get install synaptic

Download open nebula version 3.8.3 Tarbell for Ubuntu 12.04 from the 
internet:
http://downloads.opennebula.org/
or use the downloaded file you should receive with this Documentation.
Also you receive some Gems you have to use them because the normal 
installation of the gems fails.
I am going to explain later how to install a Gem manually.

Unzip with mc „Ubuntu-12.04-opennebula-3.8.3.tar.gz“ to: 
/home/user/Desktop/install

Change the permissions of all files:

# cd /home/user/Desktop/install

# chmod -R 755 * (to chance the permission of all files in that folder)

The order of packages installation:

opennebula-common: provides the user and common files
libopennebula-ruby: all ruby libraries
opennebula-node: prepares a node as an opennebula-node
opennebula-sunstone: OpenNebula Sunstone Web Interface
opennebula-tools: Command Line interface
opennebula: OpenNebula Daemon

If any of this packages gives you an error use the following command to 
fix the issue:

# apt-get install -f

opennebula-common: provides the user and common files

# dpkg -i opennebula-common_3.8.3-1_all.deb
libopennebula-ruby: all ruby libraries

# dpkg -i ruby-opennebula_3.8.3-1_all.deb
opennebula-node: prepares a node as an opennebula-node

# dpkg -i opennebula-node_3.8.3-1_all.deb
opennebula-sunstone: OpenNebula Sunstone Web Interface

# dpkg -i opennebula-sunstone_3.8.3-1_all.deb

opennebula-tools: Command Line interface

# dpkg -i opennebula-tools_3.8.3-1_all.deb
opennebula: OpenNebula Daemon

# dpkg -i opennebula_3.8.3-1_amd64.deb


After the basic installation it is necessary to install the Gems for 
ruby.
There for open mc in the terminal and go to the folder 
/usr/share/opennebula/ and run the install_gems script.

It will fail in the second part of the script but it is necessary to 
run it because the first part of the skript is also important.

Start mc from the console to install the gems manually.

# mc

unzip the gems and copy the content of each of them to 
/var/lib/gems/1.8/gems/:

amazon-ec2-0.9.17.gem
curb-0.8.3.gem
daemons-1.1.9.gem
eventmachine-1.0.0.gem
json-1.7.6.gem
mysql-2.9.0.gem
net-ldap-0.3.1.gem
nokogiri-1.5.6.gem
rack-1.5.0.gem
rack-protection-1.3.2.gem
rake-10.0.3.gem
rubygems-update-1.8.24.gem
sequel-3.43.0.gem
sinatra-1.3.4.gem
sqlite3-1.3.7.gem
thin-1.5.0.gem
tilt-1.3.3.gem
uuidtools-2.1.3.gem
xml-simple-1.1.2.gem

and chance their permissions.

----------------------------------------------------------------------------------------------

after that i configured Open nebula for KVM like this:

# apt-get install qemu-utils qemu-kvm


KVM Configuration


Modify /etc/libvirt/qemu.conf


Qemu should be configured to not change file ownership. Modify 
/etc/libvirt/qemu.conf to

include dynamic_ownership = 0. To be able to use the images copied by 
OpenNebula, change also

the user and group under which the libvirtd is run to ”oneadmin”:


# grep -vE ’^($|#)’ /etc/libvirt/qemu.conf

user = "oneadmin"

group = "cloud" (because i don't have a group named oneadmin)

dynamic_ownership = 0


The user with access to these remotes hosts on behalf of OpenNebula 
(typically <oneadmin>) has

to pertain to the <libvirtd> and <kvm> groups in order to use the 
deaemon and be able to launch

Vms.

If apparmor is active (by default in Ubuntu it is), you should add 
/var/lib/one to the end of

/etc/apparmor.d/libvirt-qemu
  (if not exits create this file)

owner /var/lib/one/** rw,


/etc/libvirt/libvirtd.conf : Uncomment ”listen tcp = 1”. Security 
configuration is left to the

admin’s choice, file is full of useful comments to achieve a correct 
configuration. As a tip, if you

don’t want to use TLS for connections set listen_tls = 0.


/etc/default/libvirt-bin : add -l option to libvirtd_opts


check because set is by default:

OpenNebula needs to know if it is going to use the KVM Driver. To 
achieve this, uncomment these

drivers in /etc/one/oned.conf (they were like in the description)

-------------------------------------------------------------------------------------------------

I restarted opennebula and sunstone and started to try out if it is 
working or not

i created a host:

Host information - Host01
id 	0
Name 	Host01
Cluster 	-
State 	ERROR
IM MAD 	im_kvm
VM MAD 	vmm_kvm
VN MAD 	dummy
Host shares
Total Mem 	0K
Used Mem (real) 	0K
Used Mem (allocated) 	0K
Total CPU 	0
Used CPU (real) 	0
Used CPU (allocated) 	0
Running VMs 	0

Host template
ERROR

MESSAGE 	Error monitoring host 0 : MONITOR FAILURE 0 -
TIMESTAMP 	Wed Jan 30 14:32:48 2013
------------------------------------------------------------------------
a fixed network:

Virtual Network 0 information
ID 	0
Name 	Network
Cluster 	-
Owner 	oneadmin
Group 	oneadmin
Bridge 	vbr1
VLAN 	no
Physical device 	--
VLAN ID 	--
Permissions
      Owner 	um-
      Group 	---
      Other 	---
-----------------------------------------------------------------
a ttylinux image:

Image "ttylinux - kvm" information
ID 	0
Name 	ttylinux - kvm
Datastore 	default
Owner 	oneadmin
Group 	oneadmin
Type 	OS
Register time 	10:57:57 01/30/2013
Persistent 	no
Source 	/var/lib/one/datastores/1/e709ae07335f01fdb1d23730860d07d6
Path 	/home/chivas/Desktop/ttylinux.img
Filesystem type 	--
Size (Mb) 	40
State 	USED
Running #VMS 	1
Permissions
      Owner 	um-
      Group 	---
      Other 	---

Image template
DEV_PREFIX 	hd
DRIVER 	raw
----------------------------------------------------------------------------------
and a template for the virtual machine:

Template
NAME 	Template01
OS

BOOT 	hd
ARCH 	x86_64

DISK

IMAGE_UNAME 	oneadmin
IMAGE 	ttylinux - kvm

VCPU 	1
CPU 	0.5
RAW

TYPE 	kvm

NIC

NETWORK_UNAME 	oneadmin
NETWORK 	Network

MEMORY 	2048
GRAPHICS

TYPE 	vnc
LISTEN 	0.0.0.0

INPUT

TYPE 	mouse
BUS 	usb

TEMPLATE_ID 	0
---------------------------------------------------------------------------
i built my VM and tryed to deploy the host... he was on error first i 
enabled him again.


Virtual Machine information - one-0
ID 	0
Name 	one-0
Owner 	oneadmin
Group 	oneadmin
State 	FAILED
LCM State 	LCM_INIT
Host 	--
Start time 	11:05:07 01/30/2013
Deploy ID 	-
Permissions
      Owner 	um-
      Group 	---
      Other 	---
**********************************************
VM template
NAME 	one-0
OS

BOOT 	hd
ARCH 	x86_64

ERROR

MESSAGE 	Error executing image transfer script: Error copying 
chivas-Aspire-5755G:/var/lib/one/datastores/1/e709ae07335f01fdb1d23730860d07d6 
to Host01:/var/lib/one//datastores/0/0/disk.0
TIMESTAMP 	Wed Jan 30 12:35:11 2013

DISK

READONLY 	NO
TARGET 	hda
IMAGE_ID 	0
DEV_PREFIX 	hd
DATASTORE 	default
TM_MAD 	shared
TYPE 	FILE
SOURCE 	/var/lib/one/datastores/1/e709ae07335f01fdb1d23730860d07d6
IMAGE_UNAME 	oneadmin
DRIVER 	raw
DISK_ID 	0
SAVE 	NO
IMAGE 	ttylinux - kvm
DATASTORE_ID 	1
CLONE 	YES

VMID 	0
VCPU 	1
CPU 	0.5
RAW

TYPE 	kvm

NIC

NETWORK_ID 	0
NETWORK_UNAME 	oneadmin
BRIDGE 	vbr1
NETWORK 	Network
IP 	192.168.2.100
VLAN 	NO
MAC 	02:00:c0:a8:02:64

MEMORY 	2048
GRAPHICS

PORT 	5900
TYPE 	vnc
LISTEN 	0.0.0.0

INPUT

TYPE 	mouse
BUS 	usb

TEMPLATE_ID 	0

so the error is:

MESSAGE 	Error executing image transfer script: Error copying 
chivas-Aspire-5755G:/var/lib/one/datastores/1/e709ae07335f01fdb1d23730860d07d6 
to Host01:/var/lib/one//datastores/0/0/disk.0

what can i do to fix it?

Thanks for the help and greetings

Johannes Thomé



48 Aniversario del Instituto Superior Politecnico Jose Antonio Echeverria, Cujae
Una obra de la Revolucion Cubana | 2 de diciembre de 1964 | http://cujae.edu.cu



Consulte la enciclopedia colaborativa cubana. http://www.ecured.cu


More information about the Users mailing list