<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://air.imag.fr/index.php?action=history&amp;feed=atom&amp;title=Libvirt</id>
	<title>Libvirt - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://air.imag.fr/index.php?action=history&amp;feed=atom&amp;title=Libvirt"/>
	<link rel="alternate" type="text/html" href="https://air.imag.fr/index.php?title=Libvirt&amp;action=history"/>
	<updated>2026-06-01T21:33:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://air.imag.fr/index.php?title=Libvirt&amp;diff=10966&amp;oldid=prev</id>
		<title>Donsez: Created page with &quot;==Description== http://libvirt.org/  &#039;&#039;A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes)&#039;&#039;  ==Installation==   &#039;&#039;Packages in…&quot;</title>
		<link rel="alternate" type="text/html" href="https://air.imag.fr/index.php?title=Libvirt&amp;diff=10966&amp;oldid=prev"/>
		<updated>2013-04-11T08:53:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Description== http://libvirt.org/  &amp;#039;&amp;#039;A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes)&amp;#039;&amp;#039;  ==Installation==   &amp;#039;&amp;#039;Packages in…&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Description==&lt;br /&gt;
http://libvirt.org/&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes)&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Packages installation&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;apt-get install libvirt-bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Creating an XML file configuration to import an existing container in libvirt&amp;#039;&amp;#039;&lt;br /&gt;
: /!\ Notice that libvirt can not install am OS in a container. Therefore, an LXC container with an OS must have been set up previously (that was the we saw before). Then, the file system directory will be given to libvirt when importing the VM. /!\&lt;br /&gt;
&lt;br /&gt;
: In order to create a libvirt container, an XML file describing the VM we want to import must be filled. There is a sample of such an XML file that belong to VM &amp;quot;ubuntu1&amp;quot; we have just created :&lt;br /&gt;
:&lt;br /&gt;
:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
&amp;lt;domain type=&amp;#039;lxc&amp;#039;&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;ubuntu1&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;memory&amp;gt;332768&amp;lt;/memory&amp;gt;&lt;br /&gt;
  &amp;lt;os&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;exe&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;init&amp;gt;/sbin/init&amp;lt;/init&amp;gt;&lt;br /&gt;
  &amp;lt;/os&amp;gt;&lt;br /&gt;
  &amp;lt;vcpu&amp;gt;1&amp;lt;/vcpu&amp;gt;&lt;br /&gt;
  &amp;lt;clock offset=&amp;#039;utc&amp;#039;/&amp;gt;&lt;br /&gt;
  &amp;lt;on_poweroff&amp;gt;destroy&amp;lt;/on_poweroff&amp;gt;&lt;br /&gt;
  &amp;lt;on_reboot&amp;gt;restart&amp;lt;/on_reboot&amp;gt;&lt;br /&gt;
  &amp;lt;on_crash&amp;gt;destroy&amp;lt;/on_crash&amp;gt;&lt;br /&gt;
  &amp;lt;devices&amp;gt;&lt;br /&gt;
    &amp;lt;emulator&amp;gt;/usr/lib/libvirt/libvirt_lxc&amp;lt;/emulator&amp;gt;&lt;br /&gt;
    &amp;lt;filesystem type=&amp;#039;mount&amp;#039;&amp;gt;&lt;br /&gt;
      &amp;lt;source dir=&amp;#039;/var/lib/lxc/ubuntu1/rootfs&amp;#039;/&amp;gt;&lt;br /&gt;
      &amp;lt;target dir=&amp;#039;/&amp;#039;/&amp;gt;&lt;br /&gt;
    &amp;lt;/filesystem&amp;gt;&lt;br /&gt;
    &amp;lt;interface type=&amp;#039;network&amp;#039;&amp;gt;&lt;br /&gt;
      &amp;lt;source network=&amp;#039;default&amp;#039;/&amp;gt;&lt;br /&gt;
    &amp;lt;/interface&amp;gt;&lt;br /&gt;
    &amp;lt;console type=&amp;#039;pty&amp;#039; /&amp;gt;&lt;br /&gt;
  &amp;lt;/devices&amp;gt;&lt;br /&gt;
&amp;lt;/domain&amp;gt;&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Setting the container as a libvirt one&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;virsh --connect lxc:/// define ubuntu1.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Booting the container&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;virsh -c lxc:/// start ubuntu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Connecting to the container localy&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;virsh -c lxc:/// console ubuntu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Connecting to the container remotly&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;virsh -c lxc+{IPDEST}:/// console ubuntu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Shutting the container &amp;#039;&amp;#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;virsh -c lxc:/// destroy ubuntu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Deleting the container&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;virsh -c lxc:/// undefine ubuntu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Problemes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Using Ubuntu as a host,when connecting to a libvirt VM running Debian, the guest appliance waits for the user to log in through two interfaces at a time (tty1 and console), so it is not possible to get identified.&lt;br /&gt;
&lt;br /&gt;
* Using Debian Wheeze as a host, when connecting to a libvirt VM, the console does not offer the user the possibility to log in. However, when using directly LXC there is no issue.&lt;/div&gt;</summary>
		<author><name>Donsez</name></author>
	</entry>
</feed>