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

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.
主站蜘蛛池模板: 定边县| 临湘市| 谢通门县| 栾川县| 松滋市| 游戏| 宜川县| 安平县| 栖霞市| 云阳县| 游戏| 保靖县| 台东县| 平邑县| 长沙市| 和龙市| 永宁县| 三都| 宣化县| 潮州市| 沁水县| 宜州市| 文化| 重庆市| 嘉荫县| 高州市| 黎城县| 青阳县| 江安县| 延安市| 丰顺县| 盈江县| 吉木萨尔县| 安多县| 平原县| 宿松县| 彭泽县| 郎溪县| 阜宁县| 临邑县| 都昌县|