Bug #1051
ISO files not created in correct place, resulting in VM creation failure
Status: | Closed | Start date: | 01/06/2012 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | Javi Fontan | % Done: | 0% | |
Category: | Drivers - Auth | |||
Target version: | Release 3.2 | |||
Resolution: | worksforme | Pull request: | ||
Affected Versions: | OpenNebula 3.0 |
Description
My ISO file is created at wrong place, and VM creation files.
I have modified the VM location (/local/one_images/cloud/vm), not using default one (/var/lib/one). VM uses the correct location, but ISO is still created in default one.
It results in error:
could not open disk image /local/one_images/cloud/vm/6/images/disk.0: No such file or directory.
Either newly created disk should be created in my location (shared), or it should be copied after its created (which is not done)
I used deb package (OpenNebula 3.1.80)
See logs below:
Fri Jan 6 16:38:57 2012 [TM][D]: Message received: LOG I 6 tm_context.sh: Executed "mkdir -p /var/lib/one/6/images/isofiles".
Fri Jan 6 16:38:57 2012 [TM][D]: Message received: LOG I 6 tm_context.sh: Executed "cp -R /var/lib/one/6/context.sh /var/lib/one/6/images/isofiles".
Fri Jan 6 16:38:57 2012 [TM][D]: Message received: LOG I 6 tm_context.sh: Executed "cp -R /home/genouest/admin/oneadmin/keys/0.pub /var/lib/one/6/images/isofiles".
Fri Jan 6 16:38:57 2012 [TM][D]: Message received: LOG I 6 tm_context.sh: Executed "cp -R /home/genouest/admin/oneadmin/keys/init.sh /var/lib/one/6/images/isofiles".
Fri Jan 6 16:38:57 2012 [TM][D]: Message received: LOG I 6 tm_context.sh: Executed "genisoimage -o /var/lib/one/6/images/disk.0 -J -R /var/lib/one/6/images/isofiles".
Fri Jan 6 16:38:57 2012 [TM][D]: Message received: LOG I 6 tm_context.sh: Executed "rm -rf /var/lib/one/6/images/isofiles".
Fri Jan 6 16:38:57 2012 [TM][D]: Message received: LOG I 6 ExitCode: 0
Fri Jan 6 16:38:57 2012 [TM][D]: Message received: TRANSFER SUCCESS 6 -
Fri Jan 6 16:38:57 2012 [InM][I]: ExitCode: 0
Fri Jan 6 16:38:57 2012 [VMM][D]: Message received: LOG I 6 ExitCode: 0
Fri Jan 6 16:38:57 2012 [VMM][D]: Message received: LOG I 6 Successfully execute network driver operation: pre.
Fri Jan 6 16:39:00 2012 [VMM][D]: Message received: LOG I 6 Command execution fail: cat << EOT | /opt/one/vmm/kvm/deploy /local/one_images/cloud/vm/6/images/deployment.0 genokvm4 6 genokvm4
Fri Jan 6 16:39:00 2012 [VMM][D]: Message received: LOG I 6 error: Failed to create domain from /local/one_images/cloud/vm/6/images/deployment.0
Fri Jan 6 16:39:00 2012 [VMM][D]: Message received: LOG I 6 error: internal error process exited while connecting to monitor: qemu: could not open disk image /local/one_images/cloud/vm/6/images/disk.0: No such file or directory
Fri Jan 6 16:39:00 2012 [VMM][D]: Message received: LOG I 6
Fri Jan 6 16:39:00 2012 [VMM][D]: Message received: LOG E 6 Could not create domain from /local/one_images/cloud/vm/6/images/deployment.0
Fri Jan 6 16:39:00 2012 [VMM][D]: Message received: LOG I 6 ExitCode: 255
Fri Jan 6 16:39:00 2012 [VMM][D]: Message received: LOG I 6 Failed to execute virtualization driver operation: deploy.
Fri Jan 6 16:39:00 2012 [VMM][D]: Message received: DEPLOY FAILURE 6 Could not create domain from /local/one_images/cloud/vm/6/images/deployment.0
My config:
AUTH_MAD=ARGUMENTS=--authn ssh,ldap,server_cipher,EXECUTABLE=one_auth_mad
DB=BACKEND=mysql,DB_NAME=one,PASSWD=oneadmin,SERVER=localhost,USER=oneadmin
DEBUG_LEVEL=3
DEFAULT_DEVICE_PREFIX=hd
DEFAULT_IMAGE_TYPE=OS
HM_MAD=EXECUTABLE=one_hm
HOST_MONITORING_INTERVAL=600
HOST_PER_INTERVAL=15
IMAGE_MAD=ARGUMENTS=fs -t 15,EXECUTABLE=one_image
IM_MAD=ARGUMENTS=-r 0 -t 15 kvm,EXECUTABLE=one_im_ssh,NAME=im_kvm
MAC_PREFIX=00:04
MANAGER_TIMER=15
NETWORK_SIZE=254
PORT=2633
SCRIPTS_REMOTE_DIR=/opt/one
SESSION_EXPIRATION_TIME=900
TM_MAD=ARGUMENTS=tm_shared/tm_shared.conf,EXECUTABLE=one_tm,NAME=tm_shared
VM_DIR=/local/one_images/cloud/vm
VM_HOOK=ARGUMENTS=-rf /var/lib/one/$VMID ,COMMAND=/bin/rm,NAME=delete_vmdir,ON=done,REMOTE=no
VM_MAD=ARGUMENTS=-t 15 -r 0 kvm,DEFAULT=vmm_exec/vmm_exec_kvm.conf,EXECUTABLE=one_vmm_exec,NAME=vmm_kvm,TYPE=kvm
VM_PER_INTERVAL=5
VM_POLLING_INTERVAL=600
VNC_BASE_PORT=5900
History
#1 Updated by olivier sallou over 9 years ago
Image file is also copied in wrong place (/var/lib/one/vmid).
deployement file is in correct location but image files are copied in wrong location
#2 Updated by olivier sallou over 9 years ago
seems all files in tm_commands/shared are impacted by issue in DST_PATH resolution (not using get_vmdir though called before)
#3 Updated by Ruben S. Montero over 9 years ago
- Category set to Drivers - Auth
- Assignee set to Javi Fontan
- Target version set to Release 3.2
#4 Updated by Javi Fontan over 9 years ago
You are using shared driver so it should not be copying any file to the node. Are you mounting /var/lib/one from the fronted in /local/one_images/cloud/vm at the nodes?
#5 Updated by olivier sallou over 9 years ago
No,
I do not share /var/lib/one
I have a shared directory named /local/one_images/cloud/vm where I expect to have all my VMs.
I set in config file oned.conf:
VM_DIR=/local/one_images/cloud/vm
This directory is correctly used to put the deployment file:
root@genokvm4:/etc/one# ls /local/one_images/cloud/vm/9/images/
deployment.0
In /usr/lib/one/tm_commands/shared/tm_context.sh (and other shared scripts), there is a call to get_vmdir, but the variable VMDIR is never used in those scripts.
#6 Updated by Javi Fontan over 9 years ago
VM_DIR is set only for the nodes, frontend always store the files in /var/lib/one. If you need to export other directory you can symlink in the frontend /var/lib/one to the desired directory.
get_vmdir function is only used in non shared drivers (like ssh) so it knows where to transfer the images.
#7 Updated by olivier sallou over 9 years ago
too bad not using VMDIR for shared too...
Symlinking may cause issues with package upgrades as it will not be consistent with package definition.
I will however do the symlink
#8 Updated by olivier sallou over 9 years ago
one comment though.
VM are created under /var/lib/one/vmid
would be nice to get something like /var/lib/one/vm/vmid
/var/lib/one contains other dirs, and they get mixed with created vms, it does not ease to read dir content, and force us to move and symlink the whole /var/lib/one directory instead of one of its sub directories
#9 Updated by Javi Fontan over 9 years ago
- Status changed from New to Closed
- Resolution set to worksforme
You can open a Feature request to change this in a future release, we will take this into account when planning.
#10 Updated by Uli Horn over 9 years ago
- File 82.log added
I have a similar problem as far as I can see. I am using Ubuntu 11.10 as the host operating system for the front-end and the slaves and Opennebula 3.0.0 with Sunstone server. I use a shared file system i.e. /var/lib/one is nfs shared with the slave machines. I am using the shared tm. Every thing works fine as long as I do not make the image persistent. But if the image is persistent the new vm fails on boot-up. I have included the log file which shows some irregularities in the path in lines 14,15,16. I don't know if this causes the error in line 17.
Presently if I do not tick persistent (for images) then a directory in /var/lib/one is created with the vm id as directory name containing deployment.0 in its and the directory images and transfer.0.prolog. The directory images contains again deployment.0 and the image file disk.0
I would like to have a vm which will maintain changes to the images on reboot - is the persistent option the correct parameter for this?