官术网_书友最值得收藏!

How it works...

In step 1, we installed the package on Ubuntu. The postinstall script started the libvirt daemon after the package was successfully installed. We verified that in step 2. 

In step 3, we examined the main configuration file for the service-side daemon - libvirtd. The process runs on the host OS and manages tasks for the virtual machines, such as configuration, life cycle management, migration, storage, and networking, as we are going to see later in this chapter. The userspace tools provided by the package we installed communicate with the daemon by sending requests on a local Unix domain socket. The default options we saw in step 3 are sufficient for the recipes in this chapter, but the configuration file is rather large. We encourage you to go through it and get familiar with the rest of the available configuration options. The file is very well documented.

In step 4, we disabled the security driver for QEMU. By default on RHEL/CentOS systems, QEMU is configured to use SELinux. Ubuntu distributions use AppArmor. For simplicity, we disable that functionality in this step; however, in production, you should take advantage of the extra security that a mandatory access control system such as SELinux provides.

Any change to the libvirt configuration file requires a restart. We restart the libvirt service in step 5.

There are few important configuration files that we need to be familiar, which are listed in step 6:

  •  libvirt.conf is the client-side configuration file for the virsh command that we are going to use in this recipe. We can specify URI aliases in it. The defaults should be sufficient.
  •  libvirtd.conf is the server-side configuration file, as we saw in step 3. It provides various security options, request limits, and logging controls. For the purpose of this book, the defaults are sufficient. 
  •  qemu.conf is the main configuration file for the QEMU driver that libvirt uses. We can configure options such as the VNC server address, the security driver that we saw in step 4 and the user and group for the QEMU process.
  • Once we create a QEMU/KVM virtual machine, the /etc/libvirt/qemu/ directory will contain the XML configuration definition for that instance, as we are going to see in the following recipes. 
  • Finally, the /etc/libvirt/qemu/networks/ directory contains configuration files for the networking. We are going to explore those in more detail later in this chapter.
主站蜘蛛池模板: 正阳县| 衡阳市| 万州区| 平乡县| 长沙市| 远安县| 永泰县| 修武县| 和林格尔县| 宁远县| 瑞昌市| 启东市| 中卫市| 赣州市| 金昌市| 开化县| 岑溪市| 石景山区| 汝阳县| 乌海市| 琼海市| 涞源县| 高唐县| 南召县| 喀喇| 平湖市| 来凤县| 石阡县| 西乌珠穆沁旗| 中卫市| 平乐县| 年辖:市辖区| 清涧县| 石渠县| 桑日县| 马山县| 陕西省| 大化| 南陵县| 定安县| 诸城市|