Modified kvm does not work the same after installing libvirt
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General 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.
Modified kvm does not work the same after installing libvirt
Hi all,
I have a modified KVM-QEMU which launches a script at a given point within its running. It worked well, until I installed libvirt and virtual machine manager, after which the script did not launch.
I can't figure out why installing libvirt would make a change to KVM-QEMU. Surely libvirt would not interfere with the way the code flows within KVM, because that is the only explanation for why the script is never launched after I install libvirt? Any thoughts please?
Does installing libvirt do that? When I installed libvirt via apt-get I only told it to install libvirt and VMM. I wanted to utilise some of the libvirt features but I'm going to have to forget about them for the moment.
As for the installation of kvm-qemu, i installed it at /usr/local/kvm
I start virtual machines at the command line by using an example command like the following:
Using the modified VM from command line works in the way I expect.
VMM does not provide details of how it launches KVM, only that it links to qemu:///system.
However I just launched from the location you mentioned (which I didn't know existed), and it didn't work like the modified KVM. What are my options? If I installed a modified KVM why would it have a link to the unmodified KVM in /usr/bin?
What happened: You have two copies of KVM-QEMU installed: the one you modified in /usr/local/bin, and the one Debian installed in /usr/bin. VMM is starting Debian's version and not your modified binary.
You have a couple options:
1. Start VMM with a $PATH variable that tells VMM to look in /usr/local for KVM before it looks in /usr:
Code:
PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin" (insert command to start VMM here)
This would be the preferred solution, but you could also do:
2. Put your modified kvm in /usr/bin:
Unfortunately neither of those have worked, although it did seem to me like you had the right solution - for which I thank you. I tried both attempts, but the modified KVM definitely did not start.
I'm surprised because even after confirming that changing the binaries was working properly (tested by launching KVM from /usr/bin/kvm with the command line), using with VMM did not. I found within VMM that it does indeed use the binary at /usr/bin/kvm which makes it extra confusing.
Not sure how it continues to operate the old one if it now points to the modified KVM. I'd appreciate any more suggestions you might have.
It looks like there is also a copy of kvm in /usr/bin/X11, maybe it's running that one. Handy tip: You can use the "whereis" command to find where a program or file is located. Typing "whereis kvm" will show all the files (or directories) name "kvm" are. Out of curiosity, what does your modified KVM do? Your original post says it calls a script, care to elaborate?
You could try contacting the people in charge of Virtual Machine Manager, they'd know better that I would what's happening and how to get VMM to run the correct binary.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.