博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
oVirt VM (CentOS) template & clone
阅读量:6955 次
发布时间:2019-06-27

本文共 3356 字,大约阅读时间需要 11 分钟。

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.


[参考]
1. 

转载地址:http://twxil.baihongyu.com/

你可能感兴趣的文章
.NET设计模式(8):适配器模式(Adapter Pattern)(转)
查看>>
x10I pC套件 官方网站下载
查看>>
VI 命令简介
查看>>
当git上只做文件大小写重命名的修改时,如何躲坑
查看>>
基础算法之排序--快速排序
查看>>
1702-03组
查看>>
MyEclipse导入ant项目——Java编程思想
查看>>
@芥末的糖 ---------- MVC,MVP,MVVM的联系和区别
查看>>
个人作业数组续
查看>>
写给大二的同学,请看完这篇文章
查看>>
音频增益响度分析 ReplayGain 附完整C代码示例
查看>>
Netty系列之Netty线程模型
查看>>
uva10129 PlayOnWords(并查集,欧拉回路)
查看>>
删除centos 7 系统自带的 openjdk
查看>>
angular2 学习笔记 ( ngModule 模块 )
查看>>
Visio2010绘制上下文数据流图
查看>>
Vim 入门教程
查看>>
11、SpringBoot-CRUD-thymeleaf公共页面元素抽取
查看>>
10、NIO--DategramChannel
查看>>
夜,思考——我想要的到底是什么?
查看>>