0

So recently I'm working on Opnestack live-migration

I followed this guide to setup my environment and in one of the configuration step I need to modify both /etc/init/libvirt-bin.conf and /etc/default/libvirt-bin file but I couldn't find these 2 files in my system.

I've tried apt-get install libvirt-bin and it said it is already the newest version.
I also tried service libvirt-bin start but nothing happened.

Just wondering did I miss something here or the tutorial is a little too old(Oct. 2013) and libvirt has changed a lot ?(though I don't think so)

Thanks for the help .

8
  • You can look at dpkg -L libvirt-bin to see the list of files that should have been installed. And you can test if the service has been started through service libvirt-bin status. This might give more information. Did you install from a ppa instead of the default ubuntu repositories? What is the version of your Ubuntu?
    – ridgy
    Jul 5, 2017 at 14:02
  • dpkg result : imgur.com/1QMqzNP It seemed it didn't install successfully compared to another computer with libvirt-bin running on it. I didn't change anything about ppa so I assume I installed from default ubuntu repo and my ubuntu version is 16.04
    – Chris Hung
    Jul 6, 2017 at 1:56
  • So it's best to uninstall, clear the cache and install again: sudo apt-get remove libvirt-bin, which will probably remove some other packages as well, then sudo apt-get clean and after that sudo apt install libvirt-binas well as the other packages removed in step 1.
    – ridgy
    Jul 6, 2017 at 8:03
  • What I do not understand: Your package content as shown in your image differs heavily from the official list at packages.ubuntu.com/en/xenial/amd64/libvirt-bin/filelist. Try to find out from which source you got the package.
    – ridgy
    Jul 6, 2017 at 8:39
  • It seemed I have the latest version of libvirt-bin(2.5.0-3ubuntu5.2~cloud0) installed with my apt-get install libvirt-bin and in this version libvirt-bin becomes a virtual package. (ref : launchpad.net/ubuntu/+source/libvirt). So I should either downgrade my libvirt-bin(though there might be lots of package dependencies problem) or find out whether there's another way to setup the environment.
    – Chris Hung
    Jul 6, 2017 at 15:39

2 Answers 2

1

A little late to the party ... but ... libvirt has actually changed quite a bit. Especially between Ubuntu 12.04 and 16.04. I had a similar problem after manually upgrading libvirt, I couldn't find libvirt-bin.conf to add -l flag for listening to tcp.

It turns out that the configuration file path is now at /etc/default/libvirtd instead of /etc/default/libvirt-bin. Finally, you can invoke systemctl restart libvirtd or service libvirtd restart to restart libvirt

0
  1. Use config file /etc/default/libvirtd and enable -l

#options passed to libvirtd, add "-l" to listen on tcp

libvirtd_opts=" -l "

  1. Modify /etc/libvirt/libvirtd.conf.

    listen_tls = 0

    listen_tcp = 1

  2. Restart Libvirtd Libvirt is listening on port 16509

$ netstat -lntp | grep libvirtd

tcp 0 0 0.0.0.0:16509 0.0.0.0:* LISTEN 38482/libvirtd
tcp6 0 0 :::16509 :::* LISTEN 38482/libvirtd

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .