At 2013-09-24 09:01:45,bigclouds bigclouds@163.com wrote:
my code is attached 1. modify hooks.py in function _runHooksDir , add 'scriptenv['M_vmName'] = vmconf.get('vmName', "")' for script needs vmname 2.modify vdsm service which call hooks.pyc from hooks.pyc to hooks.py , for u modify it above. 3.cp 40_guestname to /usr/.../.../hooks/before_vm_start/ 4. yum install libguestfs-winsupport-1.0-7.el6.x86_64 libguestfs-tools-c-1.16.34-2.el6.x86_64 python-libguestfs-1.16.34-2.el6.x86_64 libguestfs-1.16.34-2.el6.x86_64 libguestfs-tools-1.16.34-2.el6.x86_64 5.restart vdsm service 6.u need create a vm of a pool
thanks.
At 2013-09-23 16:51:40,"Dan Kenigsberg" danken@redhat.com wrote:
On Sun, Sep 22, 2013 at 05:57:25PM +0800, bigclouds wrote:
hi, Dan i am happy to contribute my code until it is tested.
Could you at least share the offending domxml?
i am not sure if it is related to selinux because no matter i enable or disable selinux (SELINUX=disabled mode) the error remain.
i define a xml recording to vdsm.log infos, and 'virsh start myvm', the same error occurs i copy the comand line which is recorded in libvirtd.log or myvm.log when start a vm, and lauch it directly, it starts without error.
do u notice the confision, u can start it throught command line, but fail throught libvirt. i have checked almost every place like perm,ownner ship, lv active, backing file.....etc
i am going to cry. (._.)
No need for that ;-)
Which libvirt version do you use? which storage (nfs/block)? Could it be another case of the the libvirt regression about supplementarry groups? If so, https://rhn.redhat.com/errata/RHSA-2013-1272.html is out and a libvirt upgrade is most welcome.
-----error log- testname-1.log--- 2013-09-22 00:50:15.430+0000: starting up LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=spice /usr/libexec/qemu-kvm -name testname-1 -S -M rhel6.4.0 -cpu Nehalem -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -uuid 24f7e975-9aa5-4a14-b0f0-590add14c8b5 -smbios type=1,manufacturer=mcVdi,product=mcVdi Node,version=6-4.el6.centos.10,serial=25F59E10-794D-11E1-8835-3440B587CE3F_34:40:b5:87:ce:3f,uuid=24f7e975-9aa5-4a14-b0f0-590add14c8b5 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/testname-1.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/rhev/data-center/7828f2ae-955e-4e4b-a4bb-43807629dc52/d028d521-d4a9-4dd7-a0fe-3e9b60e7c4e4/images/ac025dc1-4e25-4b71-8c56-88dcb61b9f09/c04b1d4f-abeb-4e64-8932-2f325a0a5af4,if=none,id=drive-ide0-0-0,format=qcow2,serial=ac025dc1-4e25-4b71-8c56-88dcb61b9f09,cache=none,werror=stop,rerror=stop,aio=native -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw,serial= -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=31,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=00:1a:4a:a8:05:b9,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channels/testname-1.com.redhat.rhevm.vdsm,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev socket,id=charchannel1,path=/var/lib/libvirt/qemu/channels/testname-1.org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel2,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=3,chardev=charchannel2,id=channel2,name=com.redhat.spice.0 -chardev pty,id=charconsole0 -device virtconsole,chardev=charconsole0,id=console0 -spice port=5904,tls-port=5905,addr=192.168.5.100,x509-dir=/etc/pki/vdsm/libvirt-spice,tls-channel=main,tls-channel=display,tls-channel=inputs,tls-channel=cursor,tls-channel=playback,tls-channel=record,tls-channel=smartcard,tls-channel=usbredir,seamless-migration=on -k en-us -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -device AC97,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 char device redirected to /dev/pts/4 qemu-kvm: -drive file=/rhev/data-center/7828f2ae-955e-4e4b-a4bb-43807629dc52/d028d521-d4a9-4dd7-a0fe-3e9b60e7c4e4/images/ac025dc1-4e25-4b71-8c56-88dcb61b9f09/c04b1d4f-abeb-4e64-8932-2f325a0a5af4,if=none,id=drive-ide0-0-0,format=qcow2,serial=ac025dc1-4e25-4b71-8c56-88dcb61b9f09,cache=none,werror=stop,rerror=stop,aio=native: could not open disk image /rhev/data-center/7828f2ae-955e-4e4b-a4bb-43807629dc52/d028d521-d4a9-4dd7-a0fe-3e9b60e7c4e4/images/ac025dc1-4e25-4b71-8c56-88dcb61b9f09/c04b1d4f-abeb-4e64-8932-2f325a0a5af4: Operation not permitted
vdsm-devel@lists.stg.fedorahosted.org