← Back to team overview

sslug-teknik team mailing list archive

Re: KVM med base image

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2010-12-21 11:07, Kenni Lund wrote:
> Kører du med selinux slået til? Hvis ja, hvad får du hvis du kører:
Det tror jeg ikke. Jeg har ikke aktivt slået det til, men er det måske
default på Ubuntu Desktop ?.
I informations viewet på virt-viewer er 'Model' sat til 'None' under
'Security'.

> ls -lZ /var/lib/libvirt/images
$ ls -lZ /var/lib/libvirt/images/
total 1453024
- -rw------- 1 root root ?     262144 2010-12-21 12:35 NewServer.img
- -r-------- 1 root root ? 1249968128 2010-11-18 13:58 UbuntuServerBase.img
- -r-------- 1 root root ?  238026752 2010-12-21 12:31
UbuntuWebServerBase.img
>
> og bliver problemet løst ved?:
> restorecon -R /var/lib/libvirt/images
Næ :-(


Jeg har så også prøvet følgende:
robert-desktop:~ $ ls -l /var/lib/libvirt/images/
total 1453024
- -rwxrwxrwx 1 root root     262144 2010-12-21 12:35 NewServer.img
- -rwxrwxrwx 1 root root 1249968128 2010-11-18 13:58 UbuntuServerBase.img
- -rwxrwxrwx 1 root root  238026752 2010-12-21 12:31 UbuntuWebServerBase.img
robert-desktop:~ $ virsh start NewServer
error: Failed to start domain NewServer
error: internal error process exited while connecting to monitor: char
device redirected to /dev/pts/54
qemu: could not open disk image /var/lib/libvirt/images/NewServer.img:
Permission denied


robert-desktop:~ $ ls -l /var/lib/libvirt/images/
total 1453024
- -rwxrwxrwx 1 root         root     262144 2010-12-21 12:35 NewServer.img
- -rwxrwxrwx 1 root         root 1249968128 2010-11-18 13:58
UbuntuServerBase.img
- -rwxrwxrwx 1 libvirt-qemu kvm   238026752 2010-12-21 12:31
UbuntuWebServerBase.img
robert-desktop:~ $ sudo cat /var/log/libvirt/qemu/NewServer.log
LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 512 -smp
1,sockets=1,cores=1,threads=1 -name NewServer -uuid
a3f058d3-4df2-603c-715b-04ae705a8683 -nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/NewServer.monitor,server,nowait
- -mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive
file=/var/lib/libvirt/images/NewServer.img,if=none,id=drive-virtio-disk0,boot=on,format=qcow2
- -device
virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0
- -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw
- -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0
- -device
virtio-net-pci,vlan=0,id=net0,mac=52:54:00:5c:5d:99,bus=pci.0,addr=0x3
- -net tap,fd=40,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device
isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -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/54
qemu: could not open disk image /var/lib/libvirt/images/NewServer.img:
Permission denied


Lidt mærkeligt. By the way, UbuntuWebServerBase.img har
UbuntuServerBase.img som base, og NewServer.img har
UbuntuWebServerBase.img som base.
Min VM som har UbuntuWebServerBase.img som disk starter fint op.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0QlQIACgkQzDMeisFqGZYo0gCguGVqWRyHTb+vxV8cWwfC5p7B
FxQAnArTgUxdjpMig2EaKxkhUrvcVkuW
=i5dL
-----END PGP SIGNATURE-----



Follow ups

References