Hi Vladimir,<br><br>I think your problem is that you have to define your requirement as one string.<br>Try <br>REQUIREMENTS = "HOSTNAME = \"virtual1\" & HYPERVISOR != \"kvm\""<br>instead of<br>
REQUIREMENTS = "HOSTNAME = \"virtual1\"" & "HYPERVISOR != \"kvm\""<br clear="all"><br>Regards,<br>Carlos<br><br>Carlos Martín, Cloud Technology Engineer/Researcher<br>DSA Research Group: web <a href="http://dsa-research.org">http://dsa-research.org</a> and blog <a href="http://blog.dsa-research.org">http://blog.dsa-research.org</a><br>
OpenNebula Open Source Toolkit for Cloud Computing: <a href="http://www.OpenNebula.org">http://www.OpenNebula.org</a><br>
<br><br><div class="gmail_quote">2010/5/20 Vladimir Kozhukalov <span dir="ltr"><<a href="mailto:kozhukalov@gmail.com">kozhukalov@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have a problem with defining REQUIREMENTS attribute. Ihave one KVM node and a VM template. I try to define in the template<br><br>REQUIREMENTS = "HOSTNAME = \"virtual1\"" & "HYPERVISOR = \"kvm\""<br>

<br>onevm create myvm.template works fine and my VM is correctly deployed and startted on my node, but when I define my REQUIREMENTS attribute in the following manner<br><br>REQUIREMENTS = "HOSTNAME = \"virtual1\"" & "HYPERVISOR != \"kvm\""<br>

<br>I am waiting that my KVM node is not matching this definition (HYPERVISOR != \"kvm\"), and absolutly surprising for me  that VM  was again successfully deployed and started on my KVM node. When I try to know how my REQUIREMENTS definition had been parsed  I see the following <br>

<br>oneadmin@cloud1:/srv/cloud/images$ onevm show 48<br>VIRTUAL MACHINE 48 INFORMATION                                                  <br>ID             : 48                  <br>NAME           : service4            <br>

STATE          : ACTIVE              <br>LCM_STATE      : RUNNING             <br>START TIME     : 05/20 17:48:15      <br>END TIME       : -                   <br>DEPLOY ID:     : one-48              <br><br>VIRTUAL MACHINE TEMPLATE                                                        <br>

CONTEXT=[<br>  FILES=/srv/cloud/images/machines/test_ssh/init.sh,<br>  GATEWAY=a.b.c.d,<br>  HOSTNAME=service4,<br>  IP=a.b.c.d,<br>  NETMASK=255.255.255.0,<br>  TARGET=hdc ]<br>CPU=0.5<br>DISK=[<br>  BUS=ide,<br>  READONLY=no,<br>

  SOURCE=/srv/cloud/images/disks/debian-amd64.qcow2,<br>  TARGET=hda,<br>  TYPE=block ]<br>FEATURES=[<br>  ACPI=no,<br>  PAE=no ]<br>GRAPHICS=[<br>  LISTEN=127.0.0.1,<br>  PORT=5903,<br>  TYPE=vnc ]<br>HYPERVISOR="kvm""<br>

MEMORY=512<br>NAME=service4<br>NIC=[<br>  BRIDGE=br288,<br>  IP=a.b.c.d,<br>  MAC=00:03:00:00:00:00,<br>  MODEL=rtl8139,<br>  NETWORK=vlan288,<br>  VNID=2 ]<br>OS=[<br>  BOOT=hd ]<br>REQUIREMENTS=HOSTNAME = "virtual1"<br>

VMID=48<br>oneadmin@cloud1:/srv/cloud/images$ <br><br><br><br><br><br> oneadmin@cloud1:/srv/cloud/images/$ onehost show 0<br>HOST 0 INFORMATION                                                              <br>ID                    : 0                   <br>

NAME                  : virtual1            <br>STATE                 : MONITORED           <br>IM_MAD                : im_kvm              <br>VM_MAD                : vmm_kvm             <br>TM_MAD                : tm_nfs              <br>

<br>HOST SHARES                                                                     <br>MAX MEM               : 8196940             <br>USED MEM (REAL)       : 7950416             <br>USED MEM (ALLOCATED)  : 2097152             <br>

MAX CPU               : 400                 <br>USED CPU (REAL)       : 14                  <br>USED CPU (ALLOCATED)  : 200                 <br>RUNNING VMS           : 4                   <br><br>MONITORING INFORMATION                                                          <br>

ARCH=x86_64<br>CPUSPEED=2593<br>FREECPU=386.0<br>FREEMEMORY=7317328<br>HOSTNAME=virtual1<br>HYPERVISOR=kvm<br>MODELNAME=Dual-Core AMD Opteron(tm) Processor 2218<br>NETRX=0<br>NETTX=0<br>TOTALCPU=400<br>TOTALMEMORY=8196940<br>

USEDCPU=14.0<br>USEDMEMORY=7950416<br>oneadmin@cloud1:/srv/cloud/images/$<br><br><br clear="all"><br>-- <br>Best regards,<br><font color="#888888">Kozhukalov Vladimir<br>
</font><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br>