<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    I've configured SELinux in Permissive mode in the frontend and in
    both hosts (nfs server has no selinux capabilities). Then, I've
    created a new VM but it fails again, with a different output:<br>
    <br>
    <font face="Helvetica, Arial, sans-serif"><small>[oneadmin@frontend
        root]$ tail -f /var/log/one/16.log <br>
        Thu Aug 23 13:47:56 2012 [DiM][I]: New VM state is ACTIVE.<br>
        Thu Aug 23 13:47:57 2012 [LCM][I]: New VM state is PROLOG.<br>
        Thu Aug 23 13:47:57 2012 [VM][I]: Virtual Machine has no context<br>
        Thu Aug 23 13:47:57 2012 [TM][I]: ln: Linking
        ../../100/07e46220fd4ecd3f8400861bf8f0d5b4 in
        Host2:/var/lib/one//datastores/0/16/disk.0<br>
        Thu Aug 23 13:47:57 2012 [TM][I]: ExitCode: 0<br>
        Thu Aug 23 13:48:31 2012 [TM][I]: clone: Cloning
        ../../100/e1b27fe18ab33781415b0b5d5b423c1c in
        Host2:/var/lib/one//datastores/0/16/disk.1<br>
        Thu Aug 23 13:48:31 2012 [TM][I]: ExitCode: 0<br>
        Thu Aug 23 13:48:31 2012 [LCM][I]: New VM state is BOOT<br>
        Thu Aug 23 13:48:31 2012 [VMM][I]: Generating deployment file:
        /var/lib/one/16/deployment.0<br>
        Thu Aug 23 13:48:31 2012 [VMM][I]: ExitCode: 0<br>
        Thu Aug 23 13:48:31 2012 [VMM][I]: Successfully execute network
        driver operation: pre.<br>
        Thu Aug 23 13:48:32 2012 [VMM][I]: Command execution fail: cat
        << EOT | /var/tmp/one/vmm/kvm/deploy
        /var/lib/one//datastores/0/16/deployment.0 Host2 16 Host2<br>
        Thu Aug 23 13:48:32 2012 [VMM][I]: error: Failed to create
        domain from /var/lib/one//datastores/0/16/deployment.0<br>
        Thu Aug 23 13:48:32 2012 [VMM][I]: error: internal error process
        exited while connecting to monitor: kvm: -device
        lsi,id=scsi0,bus=pci.0,addr=0x4: Parameter 'driver' expects a
        driver name<br>
        Thu Aug 23 13:48:32 2012 [VMM][I]: Try with argument '?' for a
        list.<br>
        Thu Aug 23 13:48:32 2012 [VMM][I]: <br>
        Thu Aug 23 13:48:32 2012 [VMM][E]: Could not create domain from
        /var/lib/one//datastores/0/16/deployment.0<br>
        Thu Aug 23 13:48:32 2012 [VMM][I]: ExitCode: 255<br>
        Thu Aug 23 13:48:32 2012 [VMM][I]: Failed to execute
        virtualization driver operation: deploy.<br>
        Thu Aug 23 13:48:32 2012 [VMM][E]: Error deploying virtual
        machine: Could not create domain from
        /var/lib/one//datastores/0/16/deployment.0<br>
        Thu Aug 23 13:48:33 2012 [DiM][I]: New VM state is FAILED</small><small></small></font><br>
    <br>
    <br>
    This is the content of /var/log/libvirt/qemu/one-16.log:<font
      face="Helvetica, Arial, sans-serif"><small><br>
        [root@host2 qemu]# cat one-16.log <br>
        2012-08-23 11:48:32.342+0000: starting up<br>
        LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none
        /usr/bin/kvm -S -M rhel6.3.0 -enable-kvm -m 512 -smp
        1,sockets=1,cores=1,threads=1 -name one-16 -uuid
        d587ae4e-a070-b1f3-759d-bc2527925cfd -nodefconfig -nodefaults
        -chardev
        socket,id=charmonitor,path=/var/lib/libvirt/qemu/one-16.monitor,server,nowait
        -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
        -no-shutdown -device
        piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device
        lsi,id=scsi0,bus=pci.0,addr=0x4 -drive
        file=/var/lib/one//datastores/0/16/disk.0,if=none,id=drive-scsi0-0-0,format=raw
        -device
        scsi-disk,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0
        -drive
        file=/var/lib/one//datastores/0/16/disk.1,if=none,media=cdrom,id=drive-scsi0-0-1,readonly=on,format=raw
        -device
        scsi-disk,bus=scsi0.0,scsi-id=1,drive=drive-scsi0-0-1,id=scsi0-0-1,bootindex=1
        -netdev tap,fd=21,id=hostnet0 -device
        rtl8139,netdev=hostnet0,id=net0,mac=02:00:c0:a8:b4:9a,bus=pci.0,addr=0x3
        -vnc 0.0.0.0:16 -vga cirrus -device
        virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5<br>
        kvm: -device lsi,id=scsi0,bus=pci.0,addr=0x4: Parameter 'driver'
        expects a driver name<br>
        Try with argument '?' for a list.<br>
        2012-08-23 11:48:32.655+0000: shutting down<br>
      </small></font><br>
    <br>
    I'm very confused now. Any idea?<br>
    <br>
    <br>
    Thank you,<br>
    <br>
    Carlos.<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 08/23/2012 12:09 PM, Carlos Jiménez
      wrote:<br>
    </div>
    <blockquote cite="mid:5036015F.8010109@eneotecnologia.com"
      type="cite">
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      Hello,<br>
      <br>
      Thank you André for your reply.<br>
      I checked oneadmin user/group ownership in /var/lib/one directory
      and its contents (datastore included). All directories and files
      were correctly owned.<br>
      <font face="Helvetica, Arial, sans-serif"><small>[root@host1 10]#
          ls -la<br>
          drwxrwxr-x. 2 oneadmin oneadmin      4096 Aug 23 10:38 .<br>
          drwxr-xr-x. 4 oneadmin oneadmin      4096 Aug 23 10:38 ..<br>
          lrwxrwxrwx. 1 oneadmin oneadmin        42 Aug 23 10:38 disk.0
          -> ../../100/07e46220fd4ecd3f8400861bf8f0d5b4<br>
          -rw-rw----. 1 oneadmin oneadmin 130252800 Aug 23 10:53 disk.1<br>
        </small></font><br>
      After your e-mail I've checked NFS Server and added the
      no_root_squash option to the directory I'm exporting via nfs. This
      is the result:<br>
      <font face="Helvetica, Arial, sans-serif"><small>/var/lib/one
          192.168.180.0/255.255.255.0(rw,no_root_squash,sync)</small></font><br>
      <br>
      After reloading nfs changes, I've tried to create a new VM and I
      get the same results: PROLOG and then FAILED status. This is the
      output of the log:<br>
      <font face="Helvetica, Arial, sans-serif"><small>Thu Aug 23
          10:59:05 2012 [DiM][I]: New VM state is ACTIVE.<br>
          Thu Aug 23 10:59:05 2012 [LCM][I]: New VM state is PROLOG.<br>
          Thu Aug 23 10:59:05 2012 [VM][I]: Virtual Machine has no
          context<br>
          Thu Aug 23 10:59:18 2012 [TM][I]: ln: Linking
          ../../100/07e46220fd4ecd3f8400861bf8f0d5b4 in
          Host2:/var/lib/one//datastores/0/12/disk.0<br>
          Thu Aug 23 10:59:18 2012 [TM][I]: ExitCode: 0<br>
          Thu Aug 23 11:00:38 2012 [TM][I]: clone: Cloning
          ../../100/e1b27fe18ab33781415b0b5d5b423c1c in
          Host2:/var/lib/one//datastores/0/12/disk.1<br>
          Thu Aug 23 11:00:38 2012 [TM][I]: ExitCode: 0<br>
          Thu Aug 23 11:00:39 2012 [LCM][I]: New VM state is BOOT<br>
          Thu Aug 23 11:00:39 2012 [VMM][I]: Generating deployment file:
          /var/lib/one/12/deployment.0<br>
          Thu Aug 23 11:00:39 2012 [VMM][I]: ExitCode: 0<br>
          Thu Aug 23 11:00:39 2012 [VMM][I]: Successfully execute
          network driver operation: pre.<br>
          Thu Aug 23 11:00:40 2012 [VMM][I]: Command execution fail: cat
          << EOT | /var/tmp/one/vmm/kvm/deploy
          /var/lib/one//datastores/0/12/deployment.0 Host2 12 Host2<br>
          Thu Aug 23 11:00:40 2012 [VMM][I]: error: Failed to create
          domain from /var/lib/one//datastores/0/12/deployment.0<br>
          Thu Aug 23 11:00:40 2012 [VMM][I]: error: internal error
          process exited while connecting to monitor: kvm: -drive
          file=/var/lib/one//datastores/0/12/disk.0,if=none,id=drive-scsi0-0-0,format=raw:

          could not open disk image
          /var/lib/one//datastores/0/12/disk.0: Permission denied<br>
          Thu Aug 23 11:00:40 2012 [VMM][I]: <br>
          Thu Aug 23 11:00:40 2012 [VMM][E]: Could not create domain
          from /var/lib/one//datastores/0/12/deployment.0<br>
          Thu Aug 23 11:00:40 2012 [VMM][I]: ExitCode: 255<br>
          Thu Aug 23 11:00:40 2012 [VMM][I]: Failed to execute
          virtualization driver operation: deploy.<br>
          Thu Aug 23 11:00:40 2012 [VMM][E]: Error deploying virtual
          machine: Could not create domain from
          /var/lib/one//datastores/0/12/deployment.0<br>
          Thu Aug 23 11:00:41 2012 [DiM][I]: New VM state is FAILED</small></font><br>
      <br>
      I've even modified user and group used by libvirt in
      /etc/libvirt/qemu.conf:<br>
      <font face="Helvetica, Arial, sans-serif"><small>user = "oneadmin"<br>
          group = "oneadmin"</small></font><br>
      <br>
      and restarted the libvirt daemon. However, the result is the same
      as previously.<br>
      <br>
      Does anybody have any other idea? Could it be a problem with
      user/group/other permissions?<br>
      <br>
      <br>
      Thank you,<br>
      <br>
      Carlos.<br>
      <br>
      <br>
      <br>
      <div class="moz-cite-prefix">On 08/22/2012 03:59 PM, André
        Monteiro wrote:<br>
      </div>
      <blockquote
cite="mid:CAG+nK=oPzrxXqK4NemfKff0WOCifZ9YfAc9jKzjskrgVY-A_tg@mail.gmail.com"
        type="cite">
        <div>Hello,</div>
        <div> </div>
        <div>It's definetly a problem with permissions, check the path
          of the datastore and verify owner/group! It should be
          oneadmin/oneadmin</div>
        <div><br clear="all">
          <br>
          --<br>
          André Monteiro<br>
          <br>
          <br>
          <br>
          <br>
        </div>
        <div class="gmail_quote">On Wed, Aug 22, 2012 at 2:02 PM, Carlos
          Jiménez <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:cjimenez@eneotecnologia.com" target="_blank">cjimenez@eneotecnologia.com</a>></span>
          wrote:<br>
          <blockquote style="margin:0px 0px 0px
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"
            class="gmail_quote">
            <div bgcolor="#FFFFFF" text="#000000"> Hi guys,<br>
              <br>
              I have a computer with OpenNebula 3.6 and CentOS 6.2
              acting as a frontend and two hosts computers with CentOS
              6.2 and qemu-kvm. A fourth computer running Debian is
              acting as NFS Server to share /var/lib/one directory among
              all the computers.<br>
              I've configured a cluster with both hosts and a new
              datastore (ID 100).<br>
              <br>
              I've created two images, one for OS and the other for the
              CD and a new template with both images. This is the output
              of "onetemplate show 3" command:<br>
              <small><small>TEMPLATE 3
                  INFORMATION                                                         
                  <br>
                  ID             : 3                   <br>
                  NAME           : Template2           <br>
                  USER           : oneadmin            <br>
                  GROUP          : oneadmin            <br>
                  REGISTER TIME  : 08/22 13:21:49      <br>
                  <br>
                  PERMISSIONS                                                                    


                  <br>
                  OWNER          : um-                 <br>
                  GROUP          : ---                 <br>
                  OTHER          : ---                 <br>
                  <br>
                  TEMPLATE
                  CONTENTS                                                              
                  <br>
                  CPU="0.5"<br>
                  DISK=[<br>
                    IMAGE="Centos OS",<br>
                    IMAGE_UNAME="oneadmin" ]<br>
                  DISK=[<br>
                    IMAGE="Centos CD",<br>
                    IMAGE_UNAME="oneadmin" ]<br>
                  GRAPHICS=[<br>
                    LISTEN="0.0.0.0",<br>
                    TYPE="vnc" ]<br>
                  MEMORY="512"<br>
                  NAME="Template2"<br>
                  NIC=[<br>
                    NETWORK="vnet2",<br>
                    NETWORK_UNAME="oneadmin" ]<br>
                  OS=[<br>
                    ARCH="x86_64",<br>
                    BOOT="cdrom" ]<br>
                  RAW=[<br>
                    TYPE="kvm" ]<br>
                  TEMPLATE_ID="3"</small></small><br>
              <br>
              Once I instantiate the template, after a while with the
              status of PROLOG, it changes to FAILED.<br>
              <br>
              This is the log:<br>
              <pre>Wed Aug 22 14:24:39 2012 [DiM][I]: New VM state is ACTIVE.
Wed Aug 22 14:24:40 2012 [LCM][I]: New VM state is PROLOG.
Wed Aug 22 14:24:40 2012 [VM][I]: Virtual Machine has no context
Wed Aug 22 14:24:40 2012 [TM][I]: ln: Linking ../../100/07e46220fd4ecd3f8400861bf8f0d5b4 in Host2:/var/lib/one//datastores/0/10/disk.0
Wed Aug 22 14:24:40 2012 [TM][I]: ExitCode: 0
Wed Aug 22 14:25:13 2012 [TM][I]: clone: Cloning ../../100/e1b27fe18ab33781415b0b5d5b423c1c in Host2:/var/lib/one//datastores/0/10/disk.1
Wed Aug 22 14:25:13 2012 [TM][I]: ExitCode: 0
Wed Aug 22 14:25:14 2012 [LCM][I]: New VM state is BOOT
Wed Aug 22 14:25:14 2012 [VMM][I]: Generating deployment file: /var/lib/one/10/deployment.0
Wed Aug 22 14:25:14 2012 [VMM][I]: ExitCode: 0
Wed Aug 22 14:25:14 2012 [VMM][I]: Successfully execute network driver operation: pre.
Wed Aug 22 14:25:15 2012 [VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy /var/lib/one//datastores/0/10/deployment.0 Host2 10 Host2
Wed Aug 22 14:25:15 2012 [VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/10/deployment.0
Wed Aug 22 14:25:15 2012 [VMM][I]: error: failed to open file '/var/lib/one//datastores/0/10/disk.1': Permission denied
<span>Wed Aug 22 14:25:15 2012 [VMM][E]: Could not create domain from /var/lib/one//datastores/0/10/deployment.0</span>
Wed Aug 22 14:25:15 2012 [VMM][I]: ExitCode: 255
Wed Aug 22 14:25:15 2012 [VMM][I]: Failed to execute virtualization driver operation: deploy.
<span>Wed Aug 22 14:25:15 2012 [VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/0/10/deployment.0</span>
Wed Aug 22 14:25:16 2012 [DiM][I]: New VM state is FAILED</pre>
              <br>
              I suppose there are several problems: VM has no context
              and another issues with deployment.0 and disk.1 files.<br>
              In the contextualization part, I suppose it is due to the
              lack of "CONTEXT" section so I'll work on it, but could
              you help me with the other errors?<br>
              <br>
              <br>
              Thank you,<br>
              <br>
              Carlos.<br>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
            <a moz-do-not-send="true"
              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>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>