I'm trying to setup LXC on Amazon Linux based ec2-instance. Libvirt is missing on amzn1 if I install with "yum install libvirt". However to compile them seems non trivial work. but before that, have I missed anything?

Anyone can share the steps to install libvirt on Amazon Linux AMI?

  • Why use Amazon Linux? If you're seriously going to do LXC, I wouldn't consider a distribution that doesn't even include the tools! – Michael Hampton Nov 27 '13 at 16:38
  • Why not use a CentOS AMI instead? – sciurus Nov 27 '13 at 18:52
  • Thanks for your good comments, later on I encountered other problem on installing the dependencies. though looks solvable but tiring. I chose Amazon AMI simply there's much optimisation for AWS done on it by Amazon (?) and we've been using it for some time, however I'll consider back to a Centos ami. – Jason Hsu Nov 28 '13 at 2:55

Haven't found reasonable answer, so here's some script for compiling and installing as I tested.

wget http://libvirt.org/sources/libvirt-1.1.4.tar.gz; 
tar zxvf libvirt-1.1.4.tar.gz;
sudo yum install -y libxml2-devel, device-mapper-devel, python-devel, libnl-devel;
cd libvirt-1.1.4;
./configure; make; sudo make install;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.