Hello there, people from OpenNebula:
I humbly require your assistance with a new error I encountered while instantiating one of my VMs. The error in cuestion is the following as it appears in the log:
Mon Apr 20 22:34:57 2015 [Z0][TM][D]: Message received: LOG I 21 Command execution fail: /var/lib/one/remotes/tm/ssh/context /var/lib/one/vms/21/context.sh /var/lib/one/vms/21/token.txt 172.18.10.8:/var/lib/one//datastores/100/21/disk.2 21 100
Mon Apr 20 22:34:57 2015 [Z0][TM][D]: Message received: LOG I 21 context: Generating context block device at 172.18.10.8:/var/lib/one//datastores/100/21/disk.2
Mon Apr 20 22:34:57 2015 [Z0][TM][D]: Message received: LOG E 21 context: Command “mkdir -p /var/lib/one/datastores/.isofiles/21” failed: mkdir: cannot create directory `/var/lib/one/datastores/.isofiles’: Permission denied
Mon Apr 20 22:34:57 2015 [Z0][TM][D]: Message received: LOG E 21 Could not create tmp dir to make context dev
Mon Apr 20 22:34:57 2015 [Z0][TM][D]: Message received: LOG I 21 ExitCode: 255
Mon Apr 20 22:34:57 2015 [Z0][TM][D]: Message received: TRANSFER FAILURE 21 Could not create tmp dir to make context dev
A bit of context, I preapared my images for working with OpenNebula by installing the context package so they can be prepared for it, however when I instantiate the template I get the error above, the coniguration of the template which I’m most concerned about it is the following:
DISK = [ type = swap,
size = 1024 ]
CONTEXT = [
TOKEN = “YES”]
I don’t get any trouble with the images found in the marketplace but I did with the ones I installed the context .deb file. I used the one found in http://docs.opennebula.org/4.12/user/virtual_machine_setup/bcont.html was it okay? Should I do something else? For what I can tell the error tells me that it couldn’t make a directory in the host. I have checked and the owner of the directories is the oneadmin so I’m guessing is not just that. Any thoughts in how to tackle this new problem?
Thanks again in advance for your answer ASAP
Does the oneadmin user own the /var/lib/one/datastores directory
and have permissions to write it? That would be the first thing I would check.
If you make it so oneadmin user can write, that should be able to fix it.
Thanks for the reply; yup! As I put at the end of my post I checked for this, and got the following results in the host.
:~$ ls -lh /var/lib/one/
drwxrwxr-x 3 oneadmin oneadmin 4,0K abr 7 15:28 datastores
drwxrwxr-x 2 oneadmin oneadmin 4,0K abr 15 17:39 test_fs
:~$ ls -lh /var/lib/one/datastores/
drwxrwxr-x 4 oneadmin oneadmin 4,0K abr 20 22:33 100
:~$ ls -lh /var/lib/one/datastores/100/
drwxrwxr-x 2 oneadmin oneadmin 4,0K abr 17 15:49 11
drwxrwxr-x 2 oneadmin oneadmin 4,0K abr 20 22:34 21
And I also checked my front-end of OpenNebula (just in case…)
opennebula:~$ ls -lh /var/lib/one/datastores/
drwxr-xr-x 2 oneadmin oneadmin 4.0K Mar 10 08:14 0
drwxr-xr-x 2 oneadmin oneadmin 4.0K Mar 10 08:14 1
drwxr-xr-x 5 oneadmin oneadmin 4.0K Apr 20 22:10 101
drwxr-xr-x 2 oneadmin oneadmin 4.0K Mar 30 15:27 2
drwx------ 2 root root 16K Apr 20 17:00 lost+found
I’m thinking is something else, I will create a new template without the swap disk as it seems it is the one responsible of the error while waiting for any other ideas to check. Thanks again for the reply
Could you send the output of the following commands in the front end?
ls -la /var/lib/one
ls -la /var/lib/one/datastores
Well… I performed the sudo chown command in all of the different folders (both in host and in frontend) and restarted the frontend (to make sure all the configurations take place) and at last I succeded; probably a missing configuration?
So yeah, I tried to instantiate now and it seems just fine (I had to declare my template with CONTEXT = NETWORK = “YES” to get an actual network interface but besides that everything seems dandy). I have a question though… Does this means my images work correctly with OpenNebula or should I look for something else?
The problem you had could be an old directory with wrong permissions (
The test you’ve made means that the OpenNebula context part is working. Now you have to make sure that the contextualization packages are installed in the VM images so they are able to configure the network. You can get them here: