[one-users] Xen4 issues with nic-attach and ebtables vnm driver

2014-08-01 Thread Jorge Calás Lozano
Hello,

We are testing opennebula 4.6 with xen4 drivers on debian 7 servers, it
looks really great. We created our own storage drivers to match our
current setup, we did it using ruby and they are working great so far.

We are now testing the network drivers as well as adding/removing
nics/ips to a running vm.

In our current setup we add ip aliases to the vm's eth0 nic and add some
ebtables rules on the hypervisor host. How is this supposed to be done
in opennebula?

We tried the onevm nic-attach command and it hot-plugged the nic
correctly, but it is lost from the vm once it is rebooted.

The vm template keeps the nic, but xen is not aware of it, the
deployment file is not changed.

If we re-deploy (undeploy  resume)  the deployment file is correctly
updated and xen is aware of the interface, but it needs a downtime we
can not always afford.

Is this a bug? is there something I'm missing? Does anyone have a
similar issue/solution?

Another issue we have found is with the  ebtables VNM driver, it just
won't add any rule. Firewall rules are correctly implemented but not the
ebtables ones.

On the logs we found the following message:

[VMM][D]: Message received: LOG E 10 A different toolstack (xl) have been 
selected!


We found that NicXen class on OpenNebulaNic.rb doesn't use the new xl
command but xm from xen3, we changed the code to use xl command but we
still get the same message and no rules are added.

I guess there other piece of code still using xm but I couldn't find it.

Do you have any advice on where to look?

Thanks in advance,


Jorge
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


[one-users] FrontEnd can't copy (cp) image to Node1

2014-08-01 Thread Gérald Litzistorf

Hi,

I am new user
My objectives  context :
Scenario = http://wiki.centos.org/Cloud/OpenNebula/QuickStart
Vbox
FrontEnd + Node1
ssh passwordless auth ok

I can't log from Chrome with username oneadmin
-- I create and use toto (in the same group)

Error (see attached file)
FrontEnd can't copy image to Node1
I can copy manually with scp !!!

Help me to configure correctly my datastore and driver

Thanks / Gerald - www.tdeig.ch



Lab_OpenNebula.pdf
Description: Adobe PDF document
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] Quota for vCPU

2014-08-01 Thread Carlos Martín Sánchez
Hi,

On Fri, Aug 1, 2014 at 8:34 AM, Ondrej Hamada ondrej.ham...@acision.com
wrote:

  Some sort of vCPU quota might be good idea in case the users are allowed
 to create their own templates. They are able to rise the count of vCPU sky
 high if their app goes too slow. In KVM the vCPU presents the number of
 threads the virtual machine could use. Setting too many vCPUs for several
 VMs on a same host might kill the hypervisor because of the context
 switching.

 Ondra


True. Maybe it's too restrictive, but you can disable VCPU for end users
with the vm restricted attributes [1] and set a default in the driver [2].

Regards

[1]
http://docs.opennebula.org/4.6/administration/references/oned_conf.html#restricted-attributes-configuration
[2]
http://docs.opennebula.org/4.6/administration/virtualization/kvmg.html#default-attributes

--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org http://www.opennebula.org/ | cmar...@opennebula.org |
@OpenNebula http://twitter.com/opennebula cmar...@opennebula.org





 On 07/28/2014 12:16 PM, Carlos Martín Sánchez wrote:

 Hi,

   On Tue, Jul 22, 2014 at 12:04 PM, Mateusz Skała 
 mateusz.sk...@budikom.net wrote:

 Hi,
 It is possible to set up quota for vCPU? I see only quota for CPU.


  No, it's not possible, but it does not matter because the vCPU is
 virtual. It does not mater if a user defines 1 or 10 vCPU, the amount of
 physical host cpu assigned to the VM is determined by the CPU attribute.

  Regards.
 --
 Carlos Martín, MSc
 Project Engineer
 OpenNebula - Flexible Enterprise Cloud Made Simple
 www.OpenNebula.org http://www.opennebula.org/ | cmar...@opennebula.org
  | @OpenNebula http://twitter.com/opennebula



 ___
 Users mailing 
 listUsers@lists.opennebula.orghttp://lists.opennebula.org/listinfo.cgi/users-opennebula.org


 --

 This e-mail and any attachment is for authorised use by the intended
 recipient(s) only. It may contain proprietary material, confidential
 information and/or be subject to legal privilege. It should not be copied,
 disclosed to, retained or used by, any other party. If you are not an
 intended recipient then please promptly delete this e-mail and any
 attachment and all copies and inform the sender. Thank you for
 understanding.

 ___
 Users mailing list
 Users@lists.opennebula.org
 http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] balancing VM placement

2014-08-01 Thread Carlos Martín Sánchez
Hi,

On Thu, Jul 31, 2014 at 7:47 PM, Mark Devlin mdev...@intelius.com wrote:

 Greetings,

 Is there a way, using 4.4 or newer, for the scheduler to place VMs based
 on their names?


No, but you can set a specific SCHED_REQUIREMENTS and _RANK in the Template
[1]


  Basically I want to spread a type of VM across as many hosts as possible,
 as long as the hosts have available resources for it.

 For example, if I have four hosts that have VMs and one that's empty, I
 don't want the five (web1-web5) VMs I'm about about to instantiate to all
 end up on that empty host.  I want one on each host.  However, if I start
 three more (web6-web8), it should place based on available resources.

 Hopefully that makes sense.  Thank you

 -Mark


That's how the scheduler works by default [2]. The policy is Striping, and
MAX_HOST is set to 1. The striping policy will try to send the VMs to the
host with less running VMs, but because of max_host = 1, only one VM will
be sent to the empty host in that scheduling cycle.

If you change the default policy, use SCHED_RANK = - RUNNING_VMS in your
Template.

Regards


[1]
http://docs.opennebula.org/4.6/user/references/template.html#placement-section
[2] http://docs.opennebula.org/4.6/administration/references/schg.html
--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org http://www.opennebula.org/ | cmar...@opennebula.org |
@OpenNebula http://twitter.com/opennebula cmar...@opennebula.org
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] VM is always using a single CPU

2014-08-01 Thread Olivier Sallou

On 08/01/2014 03:44 PM, Steffen Claus wrote:
 Did you configure the value for vCPU as well?
It was not set at all.
Adding it indeed add some core to the VM, but this is a little
misleading

But should CPU be equal to VCPU for full CPU usage? (I want to really
use 2 cores = CPU = 2, VCPU = 2)

Thanks

 

 Hi,
 I have an issue with CPUs, all my VMs have a single CPU whatever
 is set in my sunstone template.

 Executed command is:
 /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 2048 -smp
 1,sockets=1,cores=1,threads=1 


 while in my template in sunstone I see :
 CPU   2

 I expect to have here 2 CPUs.

 The generated deployment file is below:

 domain type='kvm'
 xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'
 nameone-984/name
 cputune
 shares2048/shares
 /cputune
 memory2097152/memory
 os
 type arch='x86_64'hvm/type
 boot dev='hd'/
 /os
 devices
 emulator/usr/bin/kvm/emulator
 disk type='file' device='disk'
 source file='/var/lib/one//datastores/0/984/disk.0'/
 target dev='vda'/
 driver name='qemu' type='raw' cache='none'/
 /disk
 disk type='file' device='cdrom'
 source file='/var/lib/one//datastores/0/984/disk.1'/
 target dev='hda'/
 readonly/
 driver name='qemu' type='raw'/
 /disk
 interface type='bridge'
 source bridge='br0'/
 mac address='00:04:c0:a8:02:40'/
 /interface
 graphics type='vnc' listen='0.0.0.0' port='6884'
 keymap='fr'/
 /devices
 features
 acpi/
 /features
 /domain



 Could you explain what is wrong ?

 I am using OpenNebula 4.2  (expecting an upgrade soon...)

 Thanks

 Olivier

 -- 


 gpg key id: 4096R/326D8438  (keyring.debian.org)
 Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438


 ___
 Users mailing list
 Users@lists.opennebula.org
 http://lists.opennebula.org/listinfo.cgi/users-opennebula.org




 -- 
 Steffen Claus

 Fraunhofer-Institut für Algorithmen und Wissenschaftliches Rechnen (SCAI)
 Schloss Birlinghoven
 D-53754 Sankt Augustin
 Tel: +49 2241 14-2511
 steffen.cl...@scai.fraunhofer.de
 http://www.scai.fraunhofer.de

-- 
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95

gpg key id: 4096R/326D8438  (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438

___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] FrontEnd can't copy (cp) image to Node1

2014-08-01 Thread Carlos Martín Sánchez
Hi,

OpenNebula is not trying to scp the image from the frontend to node1,
because you are using the shared TM driver for the datastores. The file is
assumed to be already present in node1, but it can't be found.

You need to make sure /var/lib/one/datastores/ is correctly shared (e.g.
nfs), or change the TM drivers to ssh. You will need passwordless ssh for
this.

You can read more in the storage guides:
http://docs.opennebula.org/4.6/administration/storage/sm.html

Regards

--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | cmar...@opennebula.org | @OpenNebula
http://twitter.com/opennebula cmar...@opennebula.org


On Fri, Aug 1, 2014 at 4:16 PM, Gérald Litzistorf 
gerald.litzist...@hesge.ch wrote:

 Hi,

 I am new user
 My objectives  context :
 Scenario = http://wiki.centos.org/Cloud/OpenNebula/QuickStart
 Vbox
 FrontEnd + Node1
 ssh passwordless auth ok

 I can't log from Chrome with username oneadmin
 -- I create and use toto (in the same group)

 Error (see attached file)
 FrontEnd can't copy image to Node1
 I can copy manually with scp !!!

 Help me to configure correctly my datastore and driver

 Thanks / Gerald - www.tdeig.ch


 ___
 Users mailing list
 Users@lists.opennebula.org
 http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


[one-users] Fencing and/or STONITH in case of an host error (ft/host_error.rb)

2014-08-01 Thread Sebastian Mangelkramer
Hi,

in my OpenNebula environments i used a combination of Pacemaker and Corosync
for monitoring the VMM host of a cluster, where proper checking of
libvirt was crucial, to perform fencing and/or STONITH actions in case of
a host failure. OpenNebula / oned triggers a failover of the VMs with the 
HOST_HOOK on ERROR (ft/host_error.rb).

Since several troubles with Corosync/Pacemaker (e.g. monitoring timeout of 
fencing device (IPMI/ILO-Module))
i decided to implement fencing / STONITH in the host_error.rb-Hook which 
triggers the failover (--delete --recreate).

I think this is the right place for adding those functions?

Therefore i added some attributes to the host templates (ILO_IP, ILO_USER, 
ILO_PASS - we use HP Servers with iLO-modules):

MONITORING INFORMATION  
ARCH=x86_64
CPUSPEED=1999
CPUSPEED=1999
HOSTNAME=lab-cloud-staging-node-03
HYPERVISOR=kvm
HYPERVISOR=kvm
ILO_IP=IP.IP.IP.IP
ILO_PASS=USERNAME
ILO_USER=PASSWORD
MODELNAME=Intel(R) Xeon(R) CPU   E5335  @ 2.00GHz
...

To access these attributes i changed the configuration of the hook in oned.conf:

HOST_HOOK = [
name  = error,
on= ERROR,
command   = /var/lib/one/remotes/hooks/ft/host_error.rb,
arguments = $ID $TEMPLATE -d -r,
remote= no ]





In the next step i modified the host_error.rb-Hook to trigger the 
STONITH-action in case of an host error.
For that i included rubyipmi, base64 and nokogiri gem in the hook and 
added some (primitive, i`m not a programmer :) lines of code:

start
# ILO/BMC IP Base = $TEMPLATE
if !(host_template=ARGV[1])
exit -1
end


host_template_decoded=Base64.decode64(host_template)
xml=Nokogiri::Slop(host_template_decoded)

ilo_ip=xml.HOST.TEMPLATE.ILO_IP.content
ilo_user=xml.HOST.TEMPLATE.ILO_USER.content
ilo_pass=xml.HOST.TEMPLATE.ILO_PASS.content

# Method UID LED activate
def uidled(ilo_ip, ilo_pass, ilo_user)
conn = Rubyipmi.connect(ilo_user, ilo_pass, ilo_ip, ipmitool)
# 86400 Sekunden = 1 Tag
value = conn.chassis.identify(true, 86400)
puts value
sleep (2)
end

# Methode Hard-Reset by iLO/BMC
def stonith(ilo_ip, ilo_pass, ilo_user)
conn = Rubyipmi.connect(ilo_user, ilo_pass, ilo_ip, ipmitool)
value = conn.chassis.power.cycle
puts value
sleep (10)
end

# trigger uidled and stonith
uidled(ilo_ip, ilo_pass, ilo_user)
stonith(ilo_ip, ilo_pass, ilo_user)

/stop

Is this the right way to trigger fencing actions with OpenNebula, or are 
there better ways to implement fencing/STONITH - how do you implement it?
Perhaps virtual machine disk locking (e.g. SANLOCK) could be a solution for 
some environments?

I think there is (currently) a lack of a proper fencing mechanism in 
OpenNebula, isn`t it?


Best regards,

Sebastian.





___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] balancing VM placement

2014-08-01 Thread Mark Devlin
We're using the (mostly) default scheduler settings.  policy=1, MAX_HOST=1, 
etc.  My question came about because we had an empty host and instantiated a 
number of VMs, and they all landed on the empty host.  I have no doubt we have 
something funky in our setup.  I'll have to experiment with the scheduler more.

Thanks for the quick reply, Carlos.



On Aug 1, 2014, at 7:47 AM, Carlos Martín Sánchez 
cmar...@opennebula.orgmailto:cmar...@opennebula.org wrote:

Hi,

On Thu, Jul 31, 2014 at 7:47 PM, Mark Devlin 
mdev...@intelius.commailto:mdev...@intelius.com wrote:
Greetings,

Is there a way, using 4.4 or newer, for the scheduler to place VMs based on 
their names?

No, but you can set a specific SCHED_REQUIREMENTS and _RANK in the Template [1]

 Basically I want to spread a type of VM across as many hosts as possible, as 
long as the hosts have available resources for it.

For example, if I have four hosts that have VMs and one that's empty, I don't 
want the five (web1-web5) VMs I'm about about to instantiate to all end up on 
that empty host.  I want one on each host.  However, if I start three more 
(web6-web8), it should place based on available resources.

Hopefully that makes sense.  Thank you

-Mark

That's how the scheduler works by default [2]. The policy is Striping, and 
MAX_HOST is set to 1. The striping policy will try to send the VMs to the host 
with less running VMs, but because of max_host = 1, only one VM will be sent to 
the empty host in that scheduling cycle.

If you change the default policy, use SCHED_RANK = - RUNNING_VMS in your 
Template.

Regards


[1] 
http://docs.opennebula.org/4.6/user/references/template.html#placement-section
[2] http://docs.opennebula.org/4.6/administration/references/schg.html
--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.orghttp://www.opennebula.org/ | 
cmar...@opennebula.orgmailto:cmar...@opennebula.org | 
@OpenNebulahttp://twitter.com/opennebulamailto:cmar...@opennebula.org





___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] VM is always using a single CPU

2014-08-01 Thread Ondrej Hamada

Hi Olivier,
as far as I know, the CPU attribute in One is used by scheduler only in order 
to decide how much CPU is consumed on hosts. It has no effect on VM unless you 
are using cgroups.
The vCPU sets how many threads could be used by the VM. The number of vCPU in 
Nebula determines the number of sockets in '-smp' option of KVM.

Ad setting number of CPU:
Let's look on following example: my hypervisor has two quad-core CPUs with 
hyperthreadig giving me 16 threads in total. In such case Nebula presents the 
CPU value of 1600 for the hypervisor. Now I decide that I do not want to run 
more than 20 VMs on such hyperviso, so 1600/20=80. But because Nebula divides 
these values by 100, you get 80/100 = 0.8. So if you want to run no more than 
20 VMs on 16 threads, you shoud set the CPU value of the templates to 0.8.

Ondra

On 08/01/2014 05:07 PM, Olivier Sallou wrote:

On 08/01/2014 03:44 PM, Steffen Claus wrote:
Did you configure the value for vCPU as well?
It was not set at all.
Adding it indeed add some core to the VM, but this is a little misleading

But should CPU be equal to VCPU for full CPU usage? (I want to really use 2 cores 
= CPU = 2, VCPU = 2)

Thanks


Hi,
I have an issue with CPUs, all my VMs have a single CPU whatever is set in my 
sunstone template.

Executed command is:
/usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 2048 -smp 
1,sockets=1,cores=1,threads=1 


while in my template in sunstone I see :
CPU 2
I expect to have here 2 CPUs.

The generated deployment file is below:

domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'
   nameone-984/name
   cputune
   shares2048/shares
   /cputune
   memory2097152/memory
   os
   type arch='x86_64'hvm/type
   boot dev='hd'/
   /os
   devices
   emulator/usr/bin/kvm/emulator
   disk type='file' device='disk'
   source file='/var/lib/one//datastores/0/984/disk.0'/
   target dev='vda'/
   driver name='qemu' type='raw' cache='none'/
   /disk
   disk type='file' device='cdrom'
   source file='/var/lib/one//datastores/0/984/disk.1'/
   target dev='hda'/
   readonly/
   driver name='qemu' type='raw'/
   /disk
   interface type='bridge'
   source bridge='br0'/
   mac address='00:04:c0:a8:02:40'/
   /interface
   graphics type='vnc' listen='0.0.0.0' port='6884' keymap='fr'/
   /devices
   features
   acpi/
   /features
/domain



Could you explain what is wrong ?

I am using OpenNebula 4.2  (expecting an upgrade soon...)

Thanks

Olivier

--


gpg key id: 4096R/326D8438  (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438



___
Users mailing list
Users@lists.opennebula.orgmailto:Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



--
Steffen Claus

Fraunhofer-Institut für Algorithmen und Wissenschaftliches Rechnen (SCAI)
Schloss Birlinghoven
D-53754 Sankt Augustin
Tel: +49 2241 14-2511
steffen.cl...@scai.fraunhofer.demailto:steffen.cl...@scai.fraunhofer.de
http://www.scai.fraunhofer.de


--
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95

gpg key id: 4096R/326D8438  (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438





___
Users mailing list
Users@lists.opennebula.orgmailto:Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you for understanding.
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org