Thursday, May 2, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 44504  / 2 Years ago, wed, october 5, 2022, 8:00:31

I am trying to migrate a KVM guest from one Ubuntu 14.04 host to another by following the steps outlined here.


I now have the "state" file, xml configuration, and qcow2 img file in a single folder on the new host, and made sure to update the xml configuration to point to the new location of the qcow2 image file.


When I try to run virsh create [guest-id].xml I get the following error message:


error: internal error: process exited while connecting to monitor: 
qemu-system-x86_64: -drive file=/media/stuart/storage2/kvm/dns.technostu.com/dns.technostu.com.img,if=none,id=drive-virtio-disk0,format=raw:
could not open disk image /media/stuart/storage2/kvm/dns.technostu.com/dns.technostu.com.img:
Could not open '/media/stuart/storage2/kvm/dns.technostu.com/dns.technostu.com.img': Permission denied

Debugging and Attempted workarounds



  • I have already added myself to the libvirtd group and re-logged in.



  • I made sure the filepaths were correct



  • I changed the ownership of the .img file to myself, but after running the command with and without sudo, the ownership of the file keeps changing to root:root with permissions -rwxr-xr-x



  • I tried running


    sudo apt-get install apparmor-profiles apparmor-utils
    sudo aa-complain /usr/lib/libvirt/virt-aa-helper

    From this post, but that hasn't worked.



  • I tried changing the emulator in the xml file as specified here.




What do I need to do in order to "import" the guest on the new host on Ubuntu 14.04?


More From » virtualization

 Answers
2

Turning the computer off and on again (I hadn't rebooted since installing kvm) changed the error message to:



error: internal error: process exited while connecting to monitor: qemu-system-x86_64


When Googling that error, I found this post which recommended adding the following to



user = "root"
group = "root"


to the /etc/libvirt/qemu.conf file. Be sure to include the quotes.



After another reboot, I was able to run virsh create [guest-id].xml successfully.


[#21889] Thursday, October 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
barted

Total Points: 424
Total Questions: 103
Total Answers: 101

Location: Djibouti
Member since Sun, Feb 27, 2022
2 Years ago
barted questions
;