Find the answer to your Linux question:
Results 1 to 3 of 3
I'm trying to create a VM here with virsh. So far I've managed to create the XML file and got it to work properly, however running it is the problem. ...
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    11

    KVM fail?

    I'm trying to create a VM here with virsh. So far I've managed to create the XML file and got it to work properly, however running it is the problem.

    These are the errors I get.

    Code:
    error: Failed to start domain Cent-OS
    error: internal error process exited while connecting to monitor: open /dev/kvm: No such file or directory
    Could not initialize KVM, will disable KVM support
    qemu: could not open disk image /media/55D123D9E79ABF54/VM/Cent-OS-5.5.img: Permission denied
    I've tried setting SElinux to permissive mode. Still no go.

    Fedora 14 X64
    hypervisor qemu
    XML:

    Code:
    <domain type='kvm'>
     <name>Cent-OS</name>
     <uuid>85badf15-244d-4719-a2da-8c3de0641356</uuid>
     <memory>1024000</memory>
     <currentMemory>1024000</currentMemory>
     <vcpu>1</vcpu>
     <os>
       <type arch='x86_64' machine='pc'>hvm</type>
       <boot dev='cdrom'/>
     </os>
     <features>
       <acpi/>
       <apic/>
       <pae/>
     </features>
     <clock offset='localtime'/>
     <on_poweroff>destroy</on_poweroff>
     <on_reboot>destroy</on_reboot>
     <on_crash>destroy</on_crash>
     <devices>
       <emulator>/usr/libexec/qemu-kvm</emulator>
       <disk type='file' device='disk'>
         <source file='/media/55D123D9E79ABF54/VM/Cent-OS-5.5.img'/>
         <target dev='hda' bus='ide'/>
       </disk>
       <disk type='file' device='cdrom'>
         <source file='/media/500GB/Downloads/CentOS-5.5-x86_64-LiveCD.iso.iso'/>
         <target dev='hdb' bus='ide'/>
         <readonly/>
       </disk>
       <interface type='bridge'>
         <source bridge='br0'/>
         <mac address="52:54:00:4B:38:FD"/>
       </interface>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
     </devices>
    </domain>
    Last edited by slimg00dy; 11-13-2010 at 02:31 AM.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    So, you're trying to open a VM image that is on an external disc? Is that a read-only media, such as CD/DVD? Also, the fact that you are getting a permissions error means that you are trying to open it either as the wrong user, or because it is read-only and kvm/qemu is trying to open it read+write.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jul 2010
    Posts
    11
    Quote Originally Posted by Rubberman View Post
    So, you're trying to open a VM image that is on an external disc? Is that a read-only media, such as CD/DVD? Also, the fact that you are getting a permissions error means that you are trying to open it either as the wrong user, or because it is read-only and kvm/qemu is trying to open it read+write.
    /media/55D123D9E79ABF54/VM/Cent-OS-5.5.img
    Is the disk image. Its located on another disk, so its not in the default directory. Not enough space.

    /media/500GB/Downloads/CentOS-5.5-x86_64-LiveCD.iso.iso
    is the ISO image I'm trying to install the OS with. Its also located in another disk.
    That's why Its written like
    Code:
    <disk type='file' device='cdrom'>
         <source file='/media/500GB/Downloads/CentOS-5.5-x86_64-LiveCD.iso.iso'/>
    I'll try it without the readonly flag.
    *********************************
    Still no go.

    Code:
    virsh # define /media/55D123D9E79ABF54/VM/Centos.xml 
    Domain Cent-OS defined from /media/55D123D9E79ABF54/VM/Centos.xml
    
    virsh # start Cent-OS
    error: Failed to start domain Cent-OS
    error: internal error process exited while connecting to monitor: open /dev/kvm: No such file or directory
    Could not initialize KVM, will disable KVM support
    qemu: could not open disk image /media/55D123D9E79ABF54/VM/Cent-OS-5.5.img: Permission denied
    
    
    virsh #
    *********************
    I've tried changing owner ship of the image file to qemu and group as well.

    Still no go.
    Last edited by slimg00dy; 11-13-2010 at 04:53 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...