[one-users] failed to create domain

cloud.b.lab cloud.b.lab at zoho.com
Sat Apr 28 00:41:47 PDT 2012


Hi Beh, Sorry for the late reply as I was on vacation.The below issue is happening becuase user "oneadmin" does not have rights to run the qemu process as a system instance. Wed Apr 25 00:05:55 2012 [VMM][I]: error: internal error process exited while connecting to monitor: kvm: -drive file=/srv/cloud/one/var//d atastores/0/51/disk.0,if=none,id=drive-ide0-0-0,format=raw: could not open disk image /srv/cloud/one/var//datastores/0/51/disk.0: Permissio n denied   Resolution:   On the Node / VM HOST: 1) First check the file /var/log/libvirt/qemu/<VM-ID>.log and see if you can get any extra information. for example, for VM-ID one-21, I give sudo cat  /var/log/libvirt/qemu/one-21.log      2) add oneadmin ownership to qemu , by editing the file /etc/libvirt/qemu.conf and make below changes  in "Red"   sudo nano /etc/libvirt/qemu.conf   # The user ID for QEMU processes run by the system instance.user = "oneadmin" # The group ID for QEMU processes run by the system instance.group = "cloud"# Whether libvirt should dynamically change file ownership# to match the configured user/group above. Defaults to 1.# Set to 0 to disable file ownership changes.dynamic_ownership = 0 3) restart libvirt-bin and libvirt-d sudo /etc/init.d/libvirt-bin restart   libvirt daemon doesn't run automatically as a service on UBuntu11.10. I have to start it manually with    sudo libvirtd -d     4. Just check if everything is fine with,virsh -c qemu:///system list     Now resumit the VM, it should run.   I tested it with a simple, ttylinux.img oneadmin at onehost:~/images$ onevm list    ID USER     GROUP    NAME         STAT CPU     MEM        HOSTNAME        TIME    21 oneadmin oneadmin ttylinux     runn   4     64M            node    0d 00:06    22 oneadmin oneadmin ttylinux     runn   0      0K            node    0d 00:00 From Node machine: oneadmin at onehost:/home/localadmin$ virshWelcome to virsh, the virtualization interactive terminal. Type:  'help' for help with commands       'quit' to quit virsh # list Id Name                 State----------------------------------  1 one-21               running  2 one-22               running virsh # My vnet template: NAME    = "myvlan"TYPE    = FIXED # We have to bind this network to ''virbr1'' for Internet AccessBRIDGE  = br0 LEASES  = [IP=192.168.1.10]LEASES  = [IP=192.168.1.20]LEASES  = [IP=192.168.1.30]LEASES  = [IP=192.168.1.40] # Custom Attributes to be used in ContextGATEWAY = 192.168.1.1DNS     = 192.168.1.1   My image template: NAME = ttylinuxPATH = "/var/images/ttylinux.img"TYPE = OS   My VM template: NAME   = ttylinuxCPU    = 1MEMORY = 64 DISK   = [ IMAGE_ID = 1 ]# OS image, mapped to hda.NIC    = [ NETWORK_ID = 0 ]             Some additional hints: 1. Before running a VM, as oneadmin user, try to source ~/etc/oned.conf , in the Node machine 2. Check if KVM is fine with      sudo modprobe kvm_intel       sudo /usr/sbin/kvm-ok3. Add oneadmin to libvirtd and qemu. As oneadmin user provide the below commands Adding user '<username>' to group 'kvm' ...    sudo adduser `id -un` kvm Adding user '<username>' to group 'libvirtd'....    sudo adduser `id -un` libvirtd 4. changed to libvirtd.conf and libvirt-bin  /etc/libvirt/libvirtd.conf : Uncomment “listen_tcp = 1”. Security configuration is left to the admin's choice, file is full of useful comments to achieve a correct configuration. /etc/default/libvirt-bin : add -l option to libvirtd_opts    5. restart libvirt-bin and libvirtd       Regards,  Anil   ---- On Wed, 25 Apr 2012 07:48:55 -0700 Teik Hooi Beh <thbeh at thbeh.com> wrote ----  Hi,  I did try as mentioned in http://opennebula.org/documentation:rel3.4:kvmg#kvm_configuration but VM is going into never ending pending state  and no logs were reported.  I will redeploy again. Has anyone published an installation guidelines on Ubuntu 11.10 other than from  http://cloudblab.wordpress.com/  Regards Beh   On Wed, Apr 25, 2012 at 3:59 PM, Michael Kutzner <michael.kutzner at virtion.net> wrote:  Hi,  did you check qemu conf as described here: http://opennebula.org/documentation:rel3.4:kvmg#kvm_configuration (had a similar error at the beginning ... )   Best, Michael   Am 25.04.2012 um 02:02 schrieb Teik Hooi Beh:   Hi,  I manage to solve the previous issue by changing "dynamic_ownership = 0". But now I have a new error which is also due to permission denied error:-   Wed Apr 25 00:05:11 2012 [DiM][I]: New VM state is ACTIVE. Wed Apr 25 00:05:11 2012 [LCM][I]: New VM state is PROLOG. Wed Apr 25 00:05:17 2012 [TM][I]: clone: Cloning ../../1/cfb778816ca91644bf82a8222a38f5ae in node01:/srv/cloud/one/var//datastores/0/51/dis k.0 Wed Apr 25 00:05:17 2012 [TM][I]: ExitCode: 0 Wed Apr 25 00:05:18 2012 [TM][I]: context: Generating context block device at node01:/srv/cloud/one/var//datastores/0/51/disk.1 Wed Apr 25 00:05:18 2012 [TM][I]: ExitCode: 0 Wed Apr 25 00:05:18 2012 [LCM][I]: New VM state is BOOT Wed Apr 25 00:05:18 2012 [VMM][I]: Generating deployment file: /srv/cloud/one/var/51/deployment.0 Wed Apr 25 00:05:24 2012 [VMM][I]: ExitCode: 0 Wed Apr 25 00:05:24 2012 [VMM][I]: Successfully execute network driver operation: pre. Wed Apr 25 00:05:55 2012 [VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy /srv/cloud/one/var//datastores/0/51/dep loyment.0 node01 51 node01 Wed Apr 25 00:05:55 2012 [VMM][I]: error: Failed to create domain from /srv/cloud/one/var//datastores/0/51/deployment.0 Wed Apr 25 00:05:55 2012 [VMM][I]: error: internal error process exited while connecting to monitor: kvm: -drive file=/srv/cloud/one/var//d atastores/0/51/disk.0,if=none,id=drive-ide0-0-0,format=raw: could not open disk image /srv/cloud/one/var//datastores/0/51/disk.0: Permissio n denied Wed Apr 25 00:05:55 2012 [VMM][I]:  Wed Apr 25 00:05:55 2012 [VMM][E]: Could not create domain from /srv/cloud/one/var//datastores/0/51/deployment.0 Wed Apr 25 00:05:55 2012 [VMM][I]: ExitCode: 255 Wed Apr 25 00:05:55 2012 [VMM][I]: Failed to execute virtualization driver operation: deploy. Wed Apr 25 00:05:55 2012 [VMM][E]: Error deploying virtual machine: Could not create domain from /srv/cloud/one/var//datastores/0/51/deploy ment.0 Wed Apr 25 00:05:55 2012 [DiM][I]: New VM state is FAILED  I know it is something to relating to libvirt or qemu but just couldn't pin point the fault.  Regards Beh  2012/4/24 Carlos Martín Sánchez <cmartin at opennebula.org> Hi,  Are you using the shared TM driver [1] in your system datastore? If so, please check that the datastore directory is properly exported, and that files created in the front-end have the correct permissions so the oneadmin account in the host can see them.  Regards  [1] http://opennebula.org/documentation:rel3.4:system_ds--Carlos Martín, MScProject EngineerOpenNebula - The Open-source Solution for Data Center Virtualization http://www.OpenNebula.org/ | cmartin at opennebula.org | @OpenNebula    On Sun, Apr 22, 2012 at 6:43 AM, Teik Hooi Beh <thbeh at thbeh.com> wrote:   Hi,  I have just started with opennebula and have manage to setup a test lab with 2 servers (following the guide from http://cloudblab.wordpress.com/) minus the window image deployment. I have tried to test with ttylinux  using instruction VM sample with Context & Network 3.4 from open nebula web site.   Image was properly registered with rdy state but when I tried to deploy the VM i got the following message:   Sun Apr 22 12:32:52 2012 [DiM][I]: New VM state is ACTIVE. Sun Apr 22 12:32:52 2012 [LCM][I]: New VM state is PROLOG. Sun Apr 22 12:32:53 2012 [TM][I]: clone: Cloning ../../1/cfb778816ca91644bf82a8222a38f5ae in node01:/srv/cloud/one/var//datastores/0/26/disk.0 Sun Apr 22 12:32:53 2012 [TM][I]: ExitCode: 0 Sun Apr 22 12:32:54 2012 [TM][I]: context: Generating context block device at node01:/srv/cloud/one/var//datastores/0/26/disk.1 Sun Apr 22 12:32:54 2012 [TM][I]: ExitCode: 0 Sun Apr 22 12:32:54 2012 [LCM][I]: New VM state is BOOT Sun Apr 22 12:32:54 2012 [VMM][I]: Generating deployment file: /srv/cloud/one/var/26/deployment.0 Sun Apr 22 12:32:54 2012 [VMM][I]: ExitCode: 0 Sun Apr 22 12:32:54 2012 [VMM][I]: Successfully execute network driver operation: pre. Sun Apr 22 12:32:56 2012 [VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy /srv/cloud/one/var//datastores/0/26/deployment.0 node01 26 node01 Sun Apr 22 12:32:56 2012 [VMM][I]: error: Failed to create domain from /srv/cloud/one/var//datastores/0/26/deployment.0 Sun Apr 22 12:32:56 2012 [VMM][I]: error: unable to open disk path /srv/cloud/one/var//datastores/0/26/disk.0: Permission denied Sun Apr 22 12:32:56 2012 [VMM][E]: Could not create domain from /srv/cloud/one/var//datastores/0/26/deployment.0 Sun Apr 22 12:32:56 2012 [VMM][I]: ExitCode: 255 Sun Apr 22 12:32:56 2012 [VMM][I]: Failed to execute virtualization driver operation: deploy. Sun Apr 22 12:32:56 2012 [VMM][E]: Error deploying virtual machine: Could not create domain from /srv/cloud/one/var//datastores/0/26/deployment.0 Sun Apr 22 12:32:56 2012 [DiM][I]: New VM state is FAILED  As I am new, i am not sure where to start debugging to find out what is wrong. Any advice?  Thanks Beh_______________________________________________Users mailing listUsers at lists.opennebula.orghttp://lists.opennebula.org/listinfo.cgi/users-opennebula.org_______________________________________________Users mailing listUsers at lists.opennebula.orghttp://lists.opennebula.org/listinfo.cgi/users-opennebula.org       _______________________________________________ Users mailing list Users at lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120428/5a49fbcc/attachment-0003.htm>


More information about the Users mailing list