CentOS 7 Virtual machine boot appears Permission denied

Source: Internet
Author: User

Os:centos 7


Using Virt-manager to add virtual machines under CentOS 7, after a successful configuration, when you start the virtual machine, a prompt appears:

QEMU-KVM:-drive file=/var/lib/libvirt/images/aloeccnode_v2.1.qcow2,if=none,id=drive-ide0-0-0,format=qcow2:could Not open disk image/var/lib/libvirt/images/aloeccnode_v2.1.qcow2:could not open file:permission denied


Causes the virtual machine to fail to create successfully.


To view the image file permissions:

[Email protected] log]# ll/var/lib/libvirt/images/
Total 30410756
-rw-r--r--. 1 qemu qemu 31132352512 16:02 aloeccnode_v2.1.qcow2

Discovery file Permissions Qemu is accessible.


To view LIBVIRTD log information:

2015-08-13 03:03:54.679+0000:starting up

Lc_all=c Path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin Qemu_audio_drv=spice/usr/libexec/qemu-kvm-name Aloeccnode-s-machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off-cpu haswell-m 8192-realtime mlock=off-smp 4,sockets=4,co Res=1,threads=1-uuid 078f6d2d-0cde-4e7c-956c-179bfd62993a-no-user-config-nodefaults-chardev socket,id= Charmonitor,path=/var/lib/libvirt/qemu/aloeccnode.monitor,server,nowait-mon Chardev=charmonitor,id=monitor,mode =CONTROL-RTC Base=utc,driftfix=slew-global Kvm-pit.lost_tick_policy=discard-no-hpet-no-reboot-global PIIX4_ Pm.disable_s3=1-global piix4_pm.disable_s4=1-boot Strict=on-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7- Device Ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5-device Ich9-usb-uhci2, Masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0, Addr=0x5.0x2-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6-drive file=/var/lib/liBvirt/images/aloeccnode_v2.1.qcow2,if=none,id=drive-ide0-0-0,format=qcow2-device ide-hd,bus=ide.0,unit=0,drive= Drive-ide0-0-0,id=ide0-0-0,bootindex=2-drive file=/var/lib/libvirt/images/aloeccnode_v2.1.qcow2,if=none,id= Drive-ide0-0-1,readonly=on,format=qcow2-device Ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1, Bootindex=1-netdev Tap,fd=23,id=hostnet0-device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:9d:e0:20,bus=pci.0, Addr=0x3-chardev Pty,id=charserial0-device Isa-serial,chardev=charserial0,id=serial0-chardev spicevmc,id= Charchannel0,name=vdagent-device Virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name =com.redhat.spice.0-spice PORT=5900,ADDR=127.0.0.1,DISABLE-TICKETING,SEAMLESS-MIGRATION=ON-VGA Qxl-global Qxl-vga.ram_size=67108864-global Qxl-vga.vram_size=67108864-global Qxl-vga.vgamem_mb=16-device intel-hda,id= Sound0,bus=pci.0,addr=0x4-device Hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0-chardev Spicevmc,id=charredir0, Name=usbRedir-device Usb-redir,chardev=charredir0,id=redir0-chardev Spicevmc,id=charredir1,name=usbredir-device Usb-redir , Chardev=charredir1,id=redir1-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7-msg Timestamp=on
Char Device redirected TO/DEV/PTS/3 (label charserial0)

2015-08-13t03:03:54.712819z QEMU-KVM:-drive file=/var/lib/libvirt/images/aloeccnode_v2.1.qcow2,if=none,id= Drive-ide0-0-0,format=qcow2:could not open disk image/var/lib/libvirt/images/aloeccnode_v2.1.qcow2:could not open File:permission denied


The SELinux control permission is caused by the network query discovery.


Turn off system SELinux and set it to disable.

# Setenforce 0

# sed-i '/^selinux/s/enforcing/disabled/'/etc/selinux/config


Restart the LIBVIRTD service.


Start the virtual machine again to start successfully.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

CentOS 7 Virtual machine boot appears Permission denied

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.