[Users] Starting VM Error
Gianluca Cecchi
gianluca.cecchi at gmail.com
Sun Sep 15 10:57:13 UTC 2013
On Sun, Sep 15, 2013 at 11:54 AM, Dan Kenigsberg wrote:
> Would you be kind to try starting a VM from virsh, where the VM image is
> out of ovirt's repor?
>
> I am asking you to have a VM image somewhere on your local disk, chown
> it to vdsm:kvm mode 0660, create a libvirt domxml for it (something
> simple, no spice or encryption), and try to start it up.
>
> Would this fail to start with the same permission issue, and the issue
> is again solved by `chown vdsm:qemu` ? If so, please copy libvir-list
> with your reply.
>
> Dan.
It seems it doesn't solve for me...
see below
[root at tekkaman ~]# saslpasswd2 -a libvirt virshuser
[root at tekkaman ~]# qemu-img create -f qcow2
/var/lib/libvirt/images/testvm.img 4G
Formatting '/var/lib/libvirt/images/testvm.img', fmt=qcow2
size=4294967296 encryption=off cluster_size=65536 lazy_refcounts=off
[root at tekkaman ~]# chown vdsm.kvm /var/lib/libvirt/images/testvm.img
[root at tekkaman ~]# chmod 0660 /var/lib/libvirt/images/testvm.img
[root at tekkaman ~]# virsh define /tmp/testvm2.xml
Please enter your authentication name: virshuser
Please enter your password:
Domain testvm2 defined from /tmp/testvm2.xml
[root at tekkaman ~]# ll /etc/libvirt/qemu
total 8
drwx------. 3 root root 4096 Aug 2 01:41 networks
-rw-------. 1 root root 2367 Sep 15 12:48 testvm2.xml
[root at tekkaman ~]# virsh start testvm2
Please enter your authentication name: virshuser
Please enter your password:
error: Failed to start domain testvm2
error: internal error Process exited while reading console log output:
char device redirected to /dev/pts/2
((null):19320): Spice-Warning **: reds.c:3247:reds_init_ssl: Could not
use private key file
qemu-kvm: failed to initialize spice server
[root at tekkaman ~]# ll /var/lib/libvirt/images/
total 136
-rw-rw----. 1 vdsm kvm 197120 Sep 15 12:24 testvm.img
[root at tekkaman ~]# chgrp qemu /var/lib/libvirt/images/testvm.img
[root at tekkaman ~]# ll /var/lib/libvirt/images/
total 136
-rw-rw----. 1 vdsm qemu 197120 Sep 15 12:24 testvm.img
[root at tekkaman ~]# virsh start testvm2
Please enter your authentication name: virshuser
Please enter your password:
error: Failed to start domain testvm2
error: internal error Process exited while reading console log output:
char device redirected to /dev/pts/2
((null):19434): Spice-Warning **: reds.c:3247:reds_init_ssl: Could not
use private key file
qemu-kvm: failed to initialize spice server
[root at tekkaman ~]# virsh list --all
Please enter your authentication name: virshuser
Please enter your password:
Id Name State
----------------------------------------------------
- testvm2 shut off
In attach the generated testvm2.xml in /etc/libvirt/qemu.
The diff between it and the one used to define domain here:
[root at tekkaman ~]# diff /tmp/testvm2.xml /etc/libvirt/qemu/testvm2.xml
0a1,7
> <!--
> WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
> OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
> virsh edit testvm2
> or other application using the libvirt API.
> -->
>
3,5c10,13
< <memory>1048576</memory>
< <currentMemory>1048576</currentMemory>
< <vcpu>1</vcpu>
---
> <uuid>91d6012b-043f-2ea0-fcf8-dfa4fcda5b62</uuid>
> <memory unit='KiB'>1048576</memory>
> <currentMemory unit='KiB'>1048576</currentMemory>
> <vcpu placement='static'>1</vcpu>
32c40
< <address type='drive' controller='0' bus='1' unit='0'/>
---
> <address type='drive' controller='0' bus='1' target='0' unit='0'/>
39a48,50
> <controller type='usb' index='0'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
> </controller>
50a62,65
> <video>
> <model type='cirrus' vram='9216' heads='1'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
> </video>
Gianluca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt_testvm2.xml
Type: text/xml
Size: 2366 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20130915/db1f3045/attachment-0001.xml>
More information about the Users
mailing list