[SOLVED] QEMU/KVM/virt-manager installed but I can't make virtualization work.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Btw. If you are really desperate, I do have a working QEMU-Libvirt-Virt-Manager build for Slackware 15.0.. The same one from that instruction link. If you provide somewhere I can upload that, I could in theory do that.
However, you shouldn't accept random software from strangers. I could have put a virus in there (I haven't), or I could have put rm -rf / in a doinst.sh file (I didn't) in there too, or anything in between. It's a very bad idea, and I advice against it, but it's possible. But it's also not guaranteed to work on your system, unless it's a clean Slackware 15.0, and it's rather an old build by now.
I dunno, but I think this is back to the point where we started, about setting the right authentication with libvirt etc.. Just take it all step by step.. I don't think the problem is related to QEMU, so that's probably the least thing you need to look at.
To ease your mind, you could try again to run qemu/kvm WITHOUT libvirt/manager, just to check.. It's fully possible to run VM's with only kvm/qemu actually, it's just kind of complicated to get up and run (super long commands). But you could do simplified test runs. Even back to the simplest example of just running a Kernel image in kvm/qemu.. It can tell you a a few things..
I tried this (even though I don't have a kernel at that location) and got:
Code:
ioctl(KVM_CREATE_VM) failed: 16 Device or resource busy
qemu-system-x86_64: failed to initialize kvm: Device or resource busy
I also tried to invoke QEMU against the ISO file and qcow2 file I had already used and got the same message. This would explain the complaint from virt-manager.
It probably wasn't going to work anyway, but lsof /dev/kvm produced no output.
I ran a command without -enable-kvm and specified a cpu of qemu64-v1 and was able to boot from the ISO and install ReactOS on the .qcow2 file, which I could then boot from.
It seems that QEMU is OK, and I have somehow messed up KVM, and possibly something that virt-manager depends on for video. I'll be experimenting with command line parameters to see what I can accomplish until I can sort out the KVM and video mode problems.
To quote a smoldering Marvin the Martian "Back to the old drawing board..."
I figured out the KVM problem. Apparently only one hypervisor can be running at a time, and as I usually have a VM or two lurking about, the system was not happy.
Also, it seems that the video problem is something specific to the interaction of ReactOS to the settings in virt-manager, I am in the process of test installing a recent Linux Mint, and it seems to be working.
ReactOS will work fine if I invoke QEMU from the command line. This is on the same .qcow2 file.
I'll tinker some more, but progress has been made.
For long I used my own virtual machine manager, it used scripts and called QEMU command-lines only. I find using VIRT-MANAGER more efficient and it results in somewhat faster and more efficient guests. The only way I have MIXED hypervisors has been nesting, not trying to run two on the same machine at the same time. (I had vmware on a host, and different hypervisors or container systems under different guests a few times, but that was with enterprise equipment and resources and I do NOT recommend it for most people.)
Once you get your projects running under QEMU (with or without a manager), I recommend you discard VB totally. I love VB if I must run a Microsoft based host, but it is inefficient compared to the FOSS options available running a Linux node.
For long I used my own virtual machine manager, it used scripts and called QEMU command-lines only. I find using VIRT-MANAGER more efficient and it results in somewhat faster and more efficient guests. The only way I have MIXED hypervisors has been nesting, not trying to run two on the same machine at the same time. (I had vmware on a host, and different hypervisors or container systems under different guests a few times, but that was with enterprise equipment and resources and I do NOT recommend it for most people.)
Nesting might be fun to tinker with when I get everything sorted out on just running stuff. That would come under the heading of "Can I make this work?"
Quote:
Once you get your projects running under QEMU (with or without a manager), I recommend you discard VB totally. I love VB if I must run a Microsoft based host, but it is inefficient compared to the FOSS options available running a Linux node.
I prefer to go with FOSS software when I can. My first post stated that I was trying to move from VB to QEMU/KVM. I would probably have saved a lot of time if I'd realized that hypervisors won't run in parallel. I tend to have a VM or two lurking in the background, and that was very likely the cause of some of my early problems.
Thanks to everyone in the thread for helping me get this far. I may come back with more questions if I can't sort out bridged networking and the video mode problem with ReactOS.
For giggles, I installed Windows XP. It sees the virtual network card in the hardware list but can't connect to anything.
I recommend installing virtio-win drivers into the Windows XP install.
I can vouch for the virtio-win-0.1-74 version on Windows XP from here.
Later versions target later Windows versions and so may fail in Windows XP. I have never bothered to determine the last supported version on Windows XP.
Older Windows (just before that) will take the "pcnet" device, but you have to connect it to something. I'm imagine XP supports it as well. That's my go-to choice for x86 Microsoft and compatible products.
Now I'm getting somewhere. I'm not exactly sure where, but I'm on the way.
Where should be: to get libvirt and virt-manager fixed/up and running. I think you can bypass virt-manager by using virsh and running QEMU/KVM with all the libvirt stuff. That would probably be good first step. Then get virt-manager working after that.
If you really want to delve deep into it all, you could try to get everything up and running by manually installing it, ditching the package stuff. That would make things more comfortable in the future, even if you later use a package to get it installed. Btw, that other program I forgot the other day is called "virt viewer" and is lightweight alternative to virt-manager.
I recommend installing virtio-win drivers into the Windows XP install.
I can vouch for the virtio-win-0.1-74 version on Windows XP from here.
Later versions target later Windows versions and so may fail in Windows XP. I have never bothered to determine the last supported version on Windows XP.
I got the ISO file. I then ran into a problem. I would have thought that I would be able to mount the disc by changing the file entry for the CD-ROM drive, when I try to commit the change I get:
Error building device XML: Could not define storage pool: operation failed: pool 'clutter' already exists with uuid 29a7c7da-9953-4e64-8b97-3689885e2dd1
This is when I click the CD-ROM 1 entry, Browse, Browse Local, I select the ISO image, and when I switch to the console it asks if I want to apply the changes, I click Apply ad that's when the error pops up.
I've been looking for a quick solution, but haven't found anything useful. I have a command template that I can modify to invoke the machine from a command line with the CD-ROM mounted, though I may have to figure out the parameter for the network card. I can fall back to that if I can't figure out what's bothering virt-manager. I'll want to figure that out as switching around ISO images is something I do at times for various reasons.
Error building device XML: Could not define storage pool: operation failed: pool 'clutter' already exists with uuid 29a7c7da-9953-4e64-8b97-3689885e2dd1
That seems like a problem with libvirt, it builds the device xml's. Or rather specifically virtnodedevd and virtstoraged.
I've had no luck searching on the error message. I'll see if I can dig up anything on the daemons you've listed.
Thanks.
From what I gather from the message:
- There might be a duplicate
or
-There could be some access issues (iso already in use? device already made in libvirt? can it be accessed?)
Don't know too much about libnodedevd and libstoraged, but as far as I know they are part of libvirtd and responsible for setting up devices and storage and most likely reside in /usr/local/sbin, and they have manual entries.
From what I gather from the message:
- There might be a duplicate
or
-There could be some access issues (iso already in use? device already made in libvirt? can it be accessed?)
Don't know too much about libnodedevd and libstoraged, but as far as I know they are part of libvirtd and responsible for setting up devices and storage and most likely reside in /usr/local/sbin, and they have manual entries.
I figured out the problem. Having used the ISO for Windows XP from a certain directory, all ISOs that I want to access have to be in that directory. I'll need to run some tests to see if this is across all VMs or is on a per-VM basis. If it's per-VM, I can take care to define a pool directory for each VM by creating the directory and placing the install ISO there. Further ISOs can be put there as needed. If it's global, this will be messy.
Now I have the driver ISO connected,l but I can't seem to get things installed correctly. I might be doing something wrong, it's been a bit since I used XP for anything.
Maybe it's something about Windows XP as far as the ISO image thing goes. I installed an Ubuntu system as a test, and the connecting the ISO to the virtual CD-ROM worked exactly as I expected it should. I'll run some more tests. I was able to change to several ISOs I have lurking about in various directories with no problem.
I was able to get the virtual network card running in XP, but it seems that I can only do DNS resolves, actually connecting to anything doesn't seem to work. I can ping things and get an address, but no actual pings. I can ping the NAT gateway, but that's all. Attempting to use IE gets nothing, which is not surprising given the ping situation. Maybe I'll delete the XP VM and try again.
The Ubuntu system glommed onto the NATed network with no problem. I'll keep digging for bridged networking information.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.