oVirt VM (CentOS) template & clone

简介:

Using Templates

Now that you know how to create a virtual machine, you can save its settings into a template. This template will retain the original virtual machine's configurations, including virtual disk and network interface settings, operating systems and applications. You can use this template to rapidly create replicas of the original virtual machine.

Create a Fedora Template

To make a Fedora virtual machine template, use the virtual machine you created in Section 4.1.1, “Create a Fedora Virtual Machine” as a basis. Before it can be used, it has to be sealed. This ensures that machine-specific settings are not propagated through the template.

To prepare a Fedora virtual machine for use as a template

连接到一个已经存在的虚拟机, 需要配置一下, 然后关机才能作为模板使用. 例如touch一个重新配置文件, 删除ssh host key.

1. Connect to the Fedora virtual machine to be used as a template. Flag the system for re-configuration by running the following command as root:

   # touch /.unconfigured

2. Remove ssh host keys. Run:

   # rm -rf /etc/ssh/ssh_host_*

3. Shut down the virtual machine. Run:

   # poweroff

4. The virtual machine has now been sealed, and is ready to be used as a template for Linux virtual machines.

关闭虚拟机后, 创建模板

To create a template from a Fedora virtual machine

1. In the administration portal, click the Virtual Machines tab. Select the sealed Red Hat Enterprise Linux 6 virtual machine. Ensure that it has a status of Down.

2. Click Make Template. The New Virtual Machine Template displays.

oVirt VM (CentOS) template  clone - 德哥@Digoal - PostgreSQL research
 
Figure 15. Make new virtual machine template
Enter information into the following fields:
  • Name: Name of the new template
  • Description: Description of the new template
  • Host Cluster: The Host Cluster for the virtual machines using this template.
  • Make Private: If you tick this checkbox, the template will only be available to the template's creator and the administrative user. Nobody else can use this template unless they are given permissions by the existing permitted users.

3. Click OK. The virtual machine displays a status of "Image Locked" while the template is being created. The template is created and added to the Templates tab. During this time, the action buttons for the template remain disabled. Once created, the action buttons are enabled and the template is ready for use.

Clone a Red Hat Enterprise Linux Virtual Machine

In the previous section, you created a Fedora template complete with pre-configured storage, networking and operating system settings. Now, you will use this template to deploy a pre-installed virtual machine.

To clone a Fedora virtual machine from a template

新建虚拟机, 选择基于模板.

1. Navigate to the Tree pane and click Expand All. Click the VMs icon under the Default cluster. On the Virtual Machines tab, click New Server.

oVirt VM (CentOS) template  clone - 德哥@Digoal - PostgreSQL research
 
Figure 16. Create virtual machine based on Linux template


  • On the General tab, select the existing Linux template from the Based on Template list.
  • Enter a suitable Name and appropriate Description, then accept the default values inherited from the template in the rest of the fields. You can change them if needed.
  • Click the Resource Allocation tab. On the Provisioning field, click the drop down menu and select the Clone option.
  • 注意使用Clone选项.
oVirt VM (CentOS) template  clone - 德哥@Digoal - PostgreSQL research
 
Figure 17. Set the provisioning to Clone

2. Retain all other default settings and click OK to create the virtual machine. The virtual machine displays in the Virtual Machines list.


[参考]
相关文章
|
2月前
|
Linux 网络安全 数据安全/隐私保护
如何在 VM 虚拟机中安装 CentOS Linux 9 操作系统保姆级教程(附链接)
如何在 VM 虚拟机中安装 CentOS Linux 9 操作系统保姆级教程(附链接)
|
5月前
|
Unix Linux 虚拟化
Linux介绍和vm17pro安装 和Centos以及vm简单操作
Linux介绍和vm17pro安装 和Centos以及vm简单操作
124 0
|
16天前
|
存储 Unix Linux
|
2月前
|
关系型数据库 MySQL Linux
【VMware安装+centos 7Linux系统+MySQL安装】——在Linux系统中安装MySQL步骤,以及遇见的各种问题(如:vm两个虚拟网卡消失、vm网络适配器有感叹号等等)
【VMware安装+centos 7Linux系统+MySQL安装】——在Linux系统中安装MySQL步骤,以及遇见的各种问题(如:vm两个虚拟网卡消失、vm网络适配器有感叹号等等)
197 0
|
5月前
|
Linux 网络安全 数据安全/隐私保护
vm 永久有效 centos7 快速安装镜像,免去图形装机步骤
vm 永久有效 centos7 快速安装镜像,免去图形装机步骤
105 0
|
Ubuntu Unix Linux
Linux:1.linux文学常识+2.安装VM和Centos+3.linux三大分区+4.网络连接三模式+5.虚拟机的克隆+6.安装vmtools+7.llinux目录结构
Linux:1.linux文学常识+2.安装VM和Centos+3.linux三大分区+4.网络连接三模式+5.虚拟机的克隆+6.安装vmtools+7.llinux目录结构
119 0
Linux:1.linux文学常识+2.安装VM和Centos+3.linux三大分区+4.网络连接三模式+5.虚拟机的克隆+6.安装vmtools+7.llinux目录结构
|
Linux
vm安装centOS报错:anaconda: Fatal IO error 104
vm安装centOS报错:anaconda: Fatal IO error 104
263 0
vm安装centOS报错:anaconda: Fatal IO error 104
|
存储 网络协议 安全
CentOS7的配置(vm安装centos)
通过本章内容你可以学习到Linux的搭建 有了这个环境之后就可以愉快的学习了 下面我们开始一起行动吧
684 2
CentOS7的配置(vm安装centos)
|
存储 IDE Linux
VM安装CentOS教程
VM安装CentOS教程
330 0
VM安装CentOS教程
|
网络协议 Linux 虚拟化
Mac VM CentOS7配置静态IP
Mac VM CentOS7配置静态IP
221 0

热门文章

最新文章