Apache CloudStack Administration RTD - en to zh translation catalogue (279 entries)

en: Working with Virtual Machines
zh: 使用虚拟机

en: About Working with Virtual Machines
zh: 关于虚拟机的使用

en: CloudStack provides administrators with complete control over the lifecycle of all guest VMs executing in the cloud. CloudStack provides several guest management operations for end users and administrators. VMs may be stopped, started, rebooted, and destroyed.
zh: CloudStack在云中为管理员提供了完整的管理所有来宾VMs整个生命周期的功能。CloudStack为终端用户和管理员提供了许多来宾虚机管理操作。VMs能被关机、开机、重启和销毁。

en: Guest VMs have a name and group. VM names and groups are opaque to CloudStack and are available for end users to organize their VMs. Each VM can have three names for use in different contexts. Only two of these names can be controlled by the user:
zh: 来宾VMs有名称和组。VM的名称和组对于CloudStack是不透明的，对终端用户整理他们的VMs可用。每个VM可以有三个用于不同环境的名称。其中有两个名字受用户控制：

en: Instance name – a unique, immutable ID that is generated by CloudStack and can not be modified by the user. This name conforms to the requirements in IETF RFC 1123.
zh: 实例名称 – 一个唯一的，不可变的由CloudStack生成的ID，此ID不能被用户修改。此名称符合 IETF RFC 1123中的要求。

en: Display name – the name displayed in the CloudStack web UI. Can be set by the user. Defaults to instance name.
zh: 显示名称 – 在CloudStack UI中显示的名称。可以由用户设置。默认跟实例名称一致。

en: Name – host name that the DHCP server assigns to the VM. Can be set by the user. Defaults to instance name
zh: 名称 – 由DHCP服务器分配给VM的主机名。可以由用户设置。默认跟实例名称一致。

en: You can append the display name of a guest VM to its internal name. For more information, see `“Appending a Display Name to the Guest VM’s Internal Name” <#appending-a-display-name-to-the-guest-vms-internal-name>`_.
zh: 你能把来宾VM的显示名附加到它的内部名称上。更多信息，请参考 `“将显示名附加到VM的内部名称” <#appending-a-display-name-to-the-guest-vms-internal-name>`_.

en: Guest VMs can be configured to be Highly Available (HA). An HA-enabled VM is monitored by the system. If the system detects that the VM is down, it will attempt to restart the VM, possibly on a different host. For more information, see HA-Enabled Virtual Machines on
zh: 来宾VMs可以配置成高可用（HA）。启用了HA的VM由系统监控。如果系统检测到此VM宕机，它可能将尝试在不同的主机上重启VM。更多信息，请参考在虚拟机上启用HA

en: Each new VM is allocated one public IP address. When the VM is started, CloudStack automatically creates a static NAT between this public IP address and the private IP address of the VM.
zh: 每个新VM都有一个公共网络IP地址。当VM启动后，CloudStack为此VM的公共网络IP地址与内网IP地址自动创建一个静态NAT。

en: If elastic IP is in use (with the NetScaler load balancer), the IP address initially allocated to the new VM is not marked as elastic. The user must replace the automatically configured IP with a specifically acquired elastic IP, and set up the static NAT mapping between this new IP and the guest VM’s private IP. The VM’s original IP address is then released and returned to the pool of available public IPs. Optionally, you can also decide not to allocate a public IP to a VM in an EIP-enabled Basic zone. For more information on Elastic IP, see `“About Elastic IP” <networking2.html#about-elastic-ip>`_.
zh: 如果使用了弹性IP（与Netscaler负载均衡同时使用），初始分配给新VM的IP地址并没有标记为弹性的。用户必须将自动配置IP改为获得一个弹性IP，并在新IP与来宾VM的内网IP之间设置静态NAT映射。VM的原始IP地址随后会被释放到可用公共网络IPs池中。同样，你也可以在启用了EIP的基础zone中不为VM分配公网IP。关于弹性IP的更多信息，请参考`“关于弹性IP” <networking2.html#about-elastic-ip>`_。

en: CloudStack cannot distinguish a guest VM that was shut down by the user (such as with the “shutdown” command in Linux) from a VM that shut down unexpectedly. If an HA-enabled VM is shut down from inside the VM, CloudStack will restart it. To shut down an HA-enabled VM, you must go through the CloudStack UI or API.
zh: CloudStack不能区分是VM突然关机还是用户对来宾VM进行的关机操作（像Linux中的“shutdown”命令）。如果从启用了HA功能的VM系统中执行了关机操作，CloudStack会重启它。要对启用了HA功能的VM进行关机操作，你必须通过CloudStack UI或者API。

en: Best Practices for Virtual Machines
zh: 虚拟机的最佳实践

en: For VMs to work as expected and provide excellent service, follow these guidelines.
zh: 为了让VMs能够按照预期的工作并提供最好的服务，请按照下面的指导进行操作。

en: Monitor VMs for Max Capacity
zh: 监视VMs的最大容量

en: The CloudStack administrator should monitor the total number of VM instances in each cluster, and disable allocation to the cluster if the total is approaching the maximum that the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of one or more hosts failing, which would increase the VM load on the other hosts as the VMs are automatically redeployed. Consult the documentation for your chosen hypervisor to find the maximum permitted number of VMs per host, then use CloudStack global configuration settings to set this as the default limit. Monitor the VM activity in each cluster at all times. Keep the total number of VMs below a safe level that allows for the occasional host failure. For example, if there are N hosts in the cluster, and you want to allow for one host in the cluster to be down at any given time, the total number of VM instances you can permit in the cluster is at most (N-1) \* (per-host-limit). Once a cluster reaches this number of VMs, use the CloudStack UI to disable allocation of more VMs to the cluster.
zh: 管理员应该监视每个集群中的虚拟机实例的总数，如果总量快达到hypervisor允许的最大虚拟机数量时，不再向此群集分配虚拟机。并且，要注意为主机预留一定的计算能力，以防止群集中有主机发生故障,因为发生故障的主机上的虚拟机需要重新部署在这些预留主机上。请咨询您所选择hypervisor的文档，了解此hypervisor能支持的最大虚拟机数量，并将此数值设置在CloudStack的全局设置里。监控每个群集里虚拟机的活跃程序，并将活跃虚拟机保持在一个安全线内。这样，CloudStack就能允许偶尔的主机故障。举个示例：如果集群里有N个主机，而你只能让其中任一主机的停机时间不超过特定时间。那么，你能在此集群部署的最多虚拟主机数量值为：(N-1) \* (每主机最大虚拟量数量限值)。一旦群集中的虚拟机达到此数量，必须在CloudStack的用户界面中禁止向此群集分配新的虚拟机。

en: Install Required Tools and Drivers
zh: 安装需要的工具和驱动

en: Be sure the following are installed on each VM:
zh: 确认在每个VM上都安装了下列软件和驱动：

en: For XenServer, install PV drivers and Xen tools on each VM. This will enable live migration and clean guest shutdown. Xen tools are required in order for dynamic CPU and RAM scaling to work.
zh: 对于XenServer，在每个VM上安装PV驱动和Xen tools。这将启用动态迁移和干净的来宾虚机关机。安装Xen tools也是为了使动态的CPU和RAM扩展能够工作。

en: For vSphere, install VMware Tools on each VM. This will enable console view to work properly. VMware Tools are required in order for dynamic CPU and RAM scaling to work.
zh: 对于vSphere，在每台VM上安装VMware Tools。这是为了能让控制台查看正常工作。安装VMware Tools也是为了使动态的CPU和RAM扩展能够工作。

en: To be sure that Xen tools or VMware Tools is installed, use one of the following techniques:
zh: 使用下面其中一个方法确认已经安装了Xen tools或VMware Tools：

en: Create each VM from a template that already has the tools installed; or,
zh: 从已经安装了tools的模板创建的每个VM；或者，

en: When registering a new template, the administrator or user can indicate whether tools are installed on the template. This can be done through the UI or using the updateTemplate API; or,
zh: 当注册一个新的模板时，管理员或者用户可以标示出哪个在模板上安装了tools。这可以通过UI或者使用updateTemplate API来做；或者，

en: If a user deploys a virtual machine with a template that does not have Xen tools or VMware Tools, and later installs the tools on the VM, then the user can inform CloudStack using the updateVirtualMachine API. After installing the tools and updating the virtual machine, stop and start the VM.
zh: 如果用户通过一个没有安装Xen tools或者VMware Tools的模板部署虚机，然后在VM上安装了tools，之后用户可以使用updateVirtualMachine API告知CloudStack。在安装tools和更新虚拟机之后，请重启虚拟机。

en: VM Lifecycle
zh: 虚拟机的生命周期

en: Virtual machines can be in the following states:
zh: 虚拟机可能处于下列状态：

en: Once a virtual machine is destroyed, it cannot be recovered. All the resources used by the virtual machine will be reclaimed by the system. This includes the virtual machine’s IP address.
zh: 一旦一个虚拟机被销毁，那么它就不能被恢复。该虚拟机使用的所有资源被系统回收。其中包括虚拟机的IP地址。

en: A stop will attempt to gracefully shut down the operating system, which typically involves terminating all the running applications. If the operation system cannot be stopped, it will be forcefully terminated. This has the same effect as pulling the power cord to a physical machine.
zh: 停止操作是比较稳妥的关闭操作系统的方式，因为这样做能正常的关闭所有正在运行的应用程序。如果操作系统不能被停止，才要强制关闭它。这么做跟拔掉物理机器的电源线是一个效果。

en: A reboot is a stop followed by a start.
zh: 重启是关机再开机的过程。

en: CloudStack preserves the state of the virtual machine hard disk until the machine is destroyed.
zh: CloudStack会保存虚机硬盘的状态直到它被销毁。

en: A running virtual machine may fail because of hardware or network issues. A failed virtual machine is in the down state.
zh: 正在运行的虚机可能会因为硬件或者网络故障而出现问题。出现问题的虚机是down状态。

en: The system places the virtual machine into the down state if it does not receive the heartbeat from the hypervisor for three minutes.
zh: 如果系统在三分钟内收不到hypervisor的心跳信号，那么它就会将虚机切换至down状态。

en: The user can manually restart the virtual machine from the down state.
zh: 用户能够手动从down状态下重启虚机。

en: The system will start the virtual machine from the down state automatically if the virtual machine is marked as HA-enabled.
zh: 如果虚机被标记上启用了HA，那么系统会自动地重启down状态中的虚机。

en: Creating VMs
zh: 创建VMs

en: Virtual machines are usually created from a template. Users can also create blank virtual machines. A blank virtual machine is a virtual machine without an OS template. Users can attach an ISO file and install the OS from the CD/DVD-ROM.
zh: 虚拟机通常是从模板创建的。用户也能创建空白虚拟机。空白虚拟机就是一个重新安装的操作系统。用户可以通过CD/DVD-ROM加载ISO文件安装。

en: You can create a VM without starting it. You can determine whether the VM needs to be started as part of the VM deployment. A request parameter, startVM, in the deployVm API provides this feature. For more information, see the Developer's Guide.
zh: 你可以创建一个VM，但不要启动它。你来决定此VM是否需要作为VM部署的一部分而启动。在deployVm API里面提供了一个startVM参数，提供了这个功能。更多信息，请参考开发者指导。

en: To create a VM from a template:
zh: 从模板创建一个VM。

en: Log in to the CloudStack UI as an administrator or user.
zh: 用管理员或用户账号登录CloudStack UI。

en: In the left navigation bar, click Instances.
zh: 在左侧导航栏，点击实例

en: Click Add Instance.
zh: 点击添加实例。

en: Select a zone.
zh: 选择一个区域。

en: Select a template, then follow the steps in the wizard. For more information about how the templates came to be in this list, see `*Working with Templates* <templates.html>`_.
zh: 选择一个模板，然后按照向导中的步骤操作。更多关于如何上传模板的更多信息，请参考`*使用模板* <templates.html>`_。

en: Be sure that the hardware you have allows starting the selected service offering.
zh: 确认​你​的​硬​件​设​备​满足​运​行​所​选​的​服​务条件。

en: Click Submit and your VM will be created and started.
zh: 点击提交，你的VM就会被创建并启动。

en: For security reason, the internal name of the VM is visible only to the root admin.
zh: 出于安全原因，VM的内部名称仅root管理员可见。

en: To create a VM from an ISO:
zh: 从ISO创建虚拟机：

en: (XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown.
zh: (XenServer)XXenServer上运行的Windows VMs需要安装PV驱动，它可能在模板中或在创建完VM后添加。PV驱动对于基本的管理功能是必要的，比如挂载额外的卷和ISO镜像、在线迁移和正常关机。

en: Select ISO Boot, and follow the steps in the wizard.
zh: 选择ISO启动，然后按照向导中的步骤进行操作。

en: Accessing VMs
zh: 访问VMs

en: Any user can access their own virtual machines. The administrator can access all VMs running in the cloud.
zh: 任​何​用​户​都可​以​访​问​他​们​自​己​的​虚​拟​机​。​管​理​员​能​够​访​问​在​云​中​运​行​的​所​有​虚​拟​机​。

en: To access a VM through the CloudStack UI:
zh: 通过CloudStack UI访问VM：

en: Log in to the CloudStack UI as a user or admin.
zh: 使用用户或管理员登录到CloudStack用户界面。

en: Click Instances, then click the name of a running VM.
zh: 点击实例，然后点击运行VM的名字。

en: Click the View Console button |console-icon.png|.
zh: 点击查看控制台按钮 |console-icon.png|。

en: To access a VM directly over the network:
zh: 通过网络直接访问VM：

en: The VM must have some port open to incoming traffic. For example, in a basic zone, a new VM might be assigned to a security group which allows incoming traffic. This depends on what security group you picked when creating the VM. In other cases, you can open a port by setting up a port forwarding policy. See `“IP Forwarding and Firewalling” <networking2.html#ip-forwarding-and-firewalling>`_.
zh: VM必须开通相关端口以便外部访问。比如，在基础zone中，新的VM可能被关联到一个允许流量进入的安全组。但这取决于你在创建VM的时候选择的安全组。在其他情况下，你可以通过设置端口转发策略来打开一个端口。请参考 `“IP转发及防火墙” <networking2.html#ip-forwarding-and-firewalling>`_。

en: If a port is open but you can not access the VM using ssh, it’s possible that ssh is not already enabled on the VM. This will depend on whether ssh is enabled in the template you picked when creating the VM. Access the VM through the CloudStack UI and enable ssh on the machine using the commands for the VM’s operating system.
zh: 如果打开端口后，你仍然不能使用SSH访问VM，那么可能是VM中没有启用SSH。这取决于当你创建VM的时候选的模板是否启用了SSH。通过CloudStack UI访问VM，然后使用VM操作系统中的命令行启用SSH。

en: If the network has an external firewall device, you will need to create a firewall rule to allow access. See `“IP Forwarding and Firewalling” <networking2.html#ip-forwarding-and-firewalling>`_.
zh: 如果网络中有外部防火墙设备，你需要创建一个防火墙策略来允许访问。请参考`“IP转发及防火墙” <networking2.html#ip-forwarding-and-firewalling>`_。

en: Stopping and Starting VMs
zh: 停止和启动VMs

en: Once a VM instance is created, you can stop, restart, or delete it as needed. In the CloudStack UI, click Instances, select the VM, and use the Stop, Start, Reboot, and Destroy buttons.
zh: 一旦VM实例被创建，你可以根据需要停止、重启或删除它。在CloudStack UI里，点击实例，选择VM，然后使用停止、启动、重启和销毁按钮。

en: Assigning VMs to Hosts
zh: 将VMs指定到主机

en: At any point in time, each virtual machine instance is running on a single host. How does CloudStack determine which host to place a VM on? There are several ways:
zh: 在任何时刻，每个虚拟机实例都运行在一台主机上。CloudStack如何决定在哪个主机上放置VM呢？通常是这几种方式：

en: Automatic default host allocation. CloudStack can automatically pick the most appropriate host to run each virtual machine.
zh: 自动分配默认主机。CloudStack可以自动的选取最合适的主机来运行每个虚机。

en: Instance type preferences. CloudStack administrators can specify that certain hosts should have a preference for particular types of guest instances. For example, an administrator could state that a host should have a preference to run Windows guests. The default host allocator will attempt to place guests of that OS type on such hosts first. If no such host is available, the allocator will place the instance wherever there is sufficient physical capacity.
zh: 实例类型偏好设置。CloudStack管理员可以指定专门为某些特殊来宾实例做过优化的主机。比如，管理员指定为Windows来宾实例做过优化的主机。默认主机分配器会尝试将此类来宾实例运行到这些主机上。如果这些主机不够用，分配器会把实例运行在容量充足的物理机上。

en: Vertical and horizontal allocation. Vertical allocation consumes all the resources of a given host before allocating any guests on a second host. This reduces power consumption in the cloud. Horizontal allocation places a guest on each host in a round-robin fashion. This may yield better performance to the guests in some cases.
zh: 纵向和横向定位。纵向定位是指，在消耗完当前主机提供的所有资源的时候会将所有来宾虚机定位到第二台主机上。这会云中的节省电力成本。横向定位在每个主机上使用轮询的方式放置来宾虚机。在某些情况下这样会给来宾虚机带来更好的性能。

en: End user preferences. Users can not control exactly which host will run a given VM instance, but they can specify a zone for the VM. CloudStack is then restricted to allocating the VM only to one of the hosts in that zone.
zh: 最终用户偏好设置。用户不能控制VM实例运行在哪台主机上，但是他们能为VM指定区域。这样CloudStack就只能将VM分配到该区域中的主机上。

en: Host tags. The administrator can assign tags to hosts. These tags can be used to specify which host a VM should use. The CloudStack administrator decides whether to define host tags, then create a service offering using those tags and offer it to the user.
zh: 主机标签。管理员可以给主机分配标签。这些标签是用来指定VM该使用哪台主机的。CloudStack管理员自己决定如何定义主机标签，然后使用这些标签创建一个服务方案来提供给用户。

en: Affinity groups. By defining affinity groups and assigning VMs to them, the user or administrator can influence (but not dictate) which VMs should run on separate hosts. This feature is to let users specify that certain VMs won't be on the same host.
zh: 关联性组。依靠定义关联性组并把VMs分配给它们，用户或管理员可以影响(但不是指令)VMs运行在不同的主机上。这个功能是让用户可以规定某些VMs不会运行在同一台主机上。

en: CloudStack also provides a pluggable interface for adding new allocators. These custom allocators can provide any policy the administrator desires.
zh: CloudStack为添加新的分配器提供了一个插件似的接口。这些自定义的分配器可以提供任何管理员想要的策略。

en: Affinity Groups
zh: 关联性组

en: By defining affinity groups and assigning VMs to them, the user or administrator can influence (but not dictate) which VMs should run on separate hosts. This feature is to let users specify that VMs with the same “host anti-affinity” type won’t be on the same host. This serves to increase fault tolerance. If a host fails, another VM offering the same service (for example, hosting the user's website) is still up and running on another host.
zh: 依靠定义关联性组并把VMs分配给它们，用户或管理员可以影响(但不是指令)VMs运行在不同的主机上。这个功能是让用户可以规定某些VMs运行在同“host anti-affinity”类型的而非同一台主机上。这写类服务器增强了容错功能。如果一个主机出现问题，那么另一个提供同样服务的VM(比如，运行用户的网站)依然在别的主机上运行。

en: The scope of an affinity group is per user account.
zh: 一个关联性组的作用域是针对每个用户账号的。

en: Creating a New Affinity Group
zh: 创建一个新的关联性组

en: To add an affinity group:
zh: 要添加一个关联性组：

en: In the left navigation bar, click Affinity Groups.
zh: 在左侧的导航条，点击关联性组。

en: Click Add affinity group. In the dialog box, fill in the following fields:
zh: 点击添加关联性组。在对话框中的下列区域中输入：

en: Name. Give the group a name.
zh: 名称。组的名称。

en: Description. Any desired text to tell more about the purpose of the group.
zh: 描述。给出更多关于这个组的说明。

en: Assign a New VM to an Affinity Group
zh: 将一个新的VM分配给一个关联性组

en: To assign a new VM to an affinity group:
zh: 要将一个新的VM分配给一个关联性组：

en: Create the VM as usual, as described in `“Creating VMs” <virtual_machines.html#creating-vms>`_. In the Add Instance wizard, there is a new Affinity tab where you can select the affinity group.
zh: 如何创建VM，在 `“Creating VMs” <virtual_machines.html#creating-vms>`_中有描述。在添加实例向导中，有一个新的关联性组标签，你可以选择关联性组。

en: Change Affinity Group for an Existing VM
zh: 给已有的VM更改关联性组

en: To assign an existing VM to an affinity group:
zh: 要将已有的VM添加到关联性组：

en: Click the name of the VM you want to work with.
zh: 点击你想更改的VM的名称。

en: Stop the VM by clicking the Stop button.
zh: 点击停止按钮，将此VM关机。

en: Click the Change Affinity button. |change-affinity-button.png|
zh: 点击变更关联性组按钮。 |change-affinity-button.png|

en: View Members of an Affinity Group
zh: 查看关联性组的成员

en: To see which VMs are currently assigned to a particular affinity group:
zh: 要查看当前哪些VMs被分配到指定的关联性组：

en: Click the name of the group you are interested in.
zh: 点击要查看的组的名称。

en: Click View Instances. The members of the group are listed.
zh: 点击查看实例。组的成员会列在此处。

en: From here, you can click the name of any VM in the list to access all its details and controls.
zh: 在这里，你可以点击列表中任何VM的名称来访问它所有的详细信息并控制它。

en: Delete an Affinity Group
zh: 删除一个关联性组

en: To delete an affinity group:
zh: 要删除关联性组：

en: Click Delete.
zh: 点击删除。

en: Any VM that is a member of the affinity group will be disassociated from the group. The former group members will continue to run normally on the current hosts, but if the VM is restarted, it will no longer follow the host allocation rules from its former affinity group.
zh: 任何属于关联性组的VM都会被踢出此组。之前组里的成员会继续在当前主机上正常的运行，但是如果VM重启了，它就不再按照之前关联性组的主机分配策略。

en: Virtual Machine Snapshots
zh: 虚拟机快照

en: (Supported on VMware and XenServer)
zh: (支持XenServer、KVM和VMware)

en: In addition to the existing CloudStack ability to snapshot individual VM volumes, you can take a VM snapshot to preserve all the VM's data volumes as well as (optionally) its CPU/memory state. This is useful for quick restore of a VM. For example, you can snapshot a VM, then make changes such as software upgrades. If anything goes wrong, simply restore the VM to its previous state using the previously saved VM snapshot.
zh: 利用CloudStack的VM卷快照功能，你可以对VM做快照像保存它的CPU/内存状态一样保护VM的数据卷(可选的)。这对快速还原一个VM来说是非常有用的。比如，你可以对一个VM做快照，然后做了一些像软件升级的操作。如果期间有问题出现，使用之前保存的VM快照就可以将VM恢复到之前的状态了。

en: The snapshot is created using the hypervisor's native snapshot facility. The VM snapshot includes not only the data volumes, but optionally also whether the VM is running or turned off (CPU state) and the memory contents. The snapshot is stored in CloudStack's primary storage.
zh: 快照的创建使用的是 hypervisor本地快照工具。VM快照不但包括数据卷还可选择性的包括VM的运行或关机时(CPU状态)和内存内容的状态。快照保存在CloudStack的主存储里。

en: VM snapshots can have a parent/child relationship. Each successive snapshot of the same VM is the child of the snapshot that came before it. Each time you take an additional snapshot of the same VM, it saves only the differences between the current state of the VM and the state stored in the most recent previous snapshot. The previous snapshot becomes a parent, and the new snapshot is its child. It is possible to create a long chain of these parent/child snapshots, which amount to a "redo" record leading from the current state of the VM back to the original.
zh: VM快照存在父/子关系。同一个VM的每次快照都是之前快照的子级。每次你对同一VM追加的快照，它仅仅保存两次快照之间系统状态差异。之前的快照变成父级，新的快照变成子级。它可能对这些父/子快照创建一个长链，它实际上是一个从当前的VM状态还原到之前的"还原"记录。

en: If you need more information about VM snapshots on VMware, check out the VMware documentation and the VMware Knowledge Base, especially `Understanding virtual machine snapshots <http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1015180>`_.
zh: 如果你需要了解更多关于VMware的VM快照，请转去VMware文档中心和VMwareBK库，查找 `了解虚拟机的快照-英文 <http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1015180>`_、`了解虚拟机的快照-中文<http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2075429>`_。

en: Limitations on VM Snapshots
zh: VM快照的限制

en: If a VM has some stored snapshots, you can't attach new volume to the VM or delete any existing volumes. If you change the volumes on the VM, it would become impossible to restore the VM snapshot which was created with the previous volume structure. If you want to attach a volume to such a VM, first delete its snapshots.
zh: 如果一个VM存储了一些快照，你就不能给他附加新卷或删除存在的卷。如果你更改了VM的卷，他将不能通过之前卷结构下所做快照来进行恢复。如果你想给这样一个VM附加卷，请先删除快照。

en: VM snapshots which include both data volumes and memory can't be kept if you change the VM's service offering. Any existing VM snapshots of this type will be discarded.
zh: 如果你更改了VM的服务方案，那么包含了数据卷和内存的VM快照就不能保留了，任何已有的此类型的VM快照都将被丢弃。

en: You can't make a VM snapshot at the same time as you are taking a volume snapshot.
zh: 你不能同时对VM在做卷快照和VM快照。

en: You should use only CloudStack to create VM snapshots on hosts managed by CloudStack. Any snapshots that you make directly on the hypervisor will not be tracked in CloudStack.
zh: 你只能使用CloudStack来创建其管理的主机上的VM快照。你在hypervisor上直接创建的任何快照都不能被CloudStack识别。

en: Configuring VM Snapshots
zh: 配置VM快照

en: The cloud administrator can use global configuration variables to control the behavior of VM snapshots. To set these variables, go through the Global Settings area of the CloudStack UI.
zh: 云管理员可以使用全局配置变量来控制VM快照的行为。要设置这些变量，移步至CloudStack UI中的全局设置。

en: Configuration Setting Name
zh: 配置设置名

en: Description
zh: 描述

en: The maximum number of VM snapshots that can be saved for any given virtual machine in the cloud. The total possible number of VM snapshots in the cloud is (number of VMs) \* vmsnapshots.max. If the number of snapshots for any VM ever hits the maximum, the older ones are removed by the snapshot expunge job.
zh: 云中虚拟机能够保存快照的最大数。 (number of VMs) \* vmsnapshots.max是云中VM快照的总共可能数量。如果任何一个VM的快照数达到了最大值，那么快照删除任务会把最老的快照删掉。

en: Number of seconds to wait for a snapshot job to succeed before declaring failure and issuing an error.
zh: 在提示失败和发生错误之前快照工作为了成功的做快照而等待的秒数。

en: Using VM Snapshots
zh: 是用VM的快照

en: To create a VM snapshot using the CloudStack UI:
zh: 是用CloudStack UI创建一个VM快照：

en: Log in to the CloudStack UI as a user or administrator.
zh: 是用用户或者管理员登录CloudStack。

en: Click Instances.
zh: 点击实例。

en: Click the name of the VM you want to snapshot.
zh: 点击你想做快照的VM名称。

en: Click the Take VM Snapshot button. |VMSnapshotButton.png|
zh: 点击抓取VM快照按钮。 |VMSnapshotButton.png|

en: If a snapshot is already in progress, then clicking this button will have no effect.
zh: 如果一个快照处理过程正在进行，那么点击这个按钮是没有反应的。

en: Provide a name and description. These will be displayed in the VM Snapshots list.
zh: 提供一个名称和秒数。这些会显示在VM快照列表中。

en: (For running VMs only) If you want to include the VM's memory in the snapshot, click the Memory checkbox. This saves the CPU and memory state of the virtual machine. If you don't check this box, then only the current state of the VM disk is saved. Checking this box makes the snapshot take longer.
zh: (仅限运行中的VMs)如果你想在快照中包含VM的内存状态，请勾选内存。这可以保存虚拟机的CPU和内存状态。如果你不勾选这个选项，那么只有VM目前磁盘状态会被保存。勾选了这个选项会让快照过程变长。

en: Quiesce VM: check this box if you want to quiesce the file system on the VM before taking the snapshot. Not supported on XenServer when used with CloudStack-provided primary storage.
zh: 静止VM：如果你想在做快照之前让VM的文件系统处于静止状态，请勾选此选项。使用CloudStack提供的主存储的XenServer环境不受支持。

en: When this option is used with CloudStack-provided primary storage, the quiesce operation is performed by the underlying hypervisor (VMware is supported). When used with another primary storage vendor's plugin, the quiesce operation is provided according to the vendor's implementation.
zh: 当这个选项在CloudStack提供的主存储中使用了，那么静止操作是由底层的hypervisor完成的(VMware支持)。当使用了其他主存储提供商的插件，静止操作是由其提供商的软件完成的，

en: Click OK.
zh: 点击确定。

en: To delete a snapshot or restore a VM to the state saved in a particular snapshot:
zh: 要删除一个快照或者还原VM的状态到指定的一个快照：

en: Navigate to the VM as described in the earlier steps.
zh: 通过之前描述的步骤定位至VM。

en: Click View VM Snapshots.
zh: 点击查看VM快照。

en: In the list of snapshots, click the name of the snapshot you want to work with.
zh: 在快照列表中，点击你要操作的快照名字。

en: Depending on what you want to do:
zh: 取决于你想做什么：

en: To delete the snapshot, click the Delete button. |delete-button.png|
zh: 要删除快照，点击删除按钮。 |delete-button.png|

en: To revert to the snapshot, click the Revert button. |revert-vm.png|
zh: 要还原至此快照，点击还原按钮。 |revert-vm.png|

en: VM snapshots are deleted automatically when a VM is destroyed. You don't have to manually delete the snapshots in this case.
zh: 当VM被销毁了，那么它的快照也会被自动的删除。这种情况下，你不用手动的去删除快照。

en: Changing the VM Name, OS, or Group
zh: 更改VM名字，OS或组

en: After a VM is created, you can modify the display name, operating system, and the group it belongs to.
zh: 在VM被创建之后，你可以修改显示名，操作系统和它所属的组。

en: In the left navigation, click Instances.
zh: 在左侧的导航菜单中，点击实例。

en: Select the VM that you want to modify.
zh: 选择你想修改的VM。

en: Click the Stop button to stop the VM. |StopButton.png|
zh: 点击停止按钮来关闭虚机。 |StopButton.png|

en: Click Edit. |EditButton.png|
zh: 点击编辑。 |EditButton.png|

en: Make the desired changes to the following:
zh: 更改以下几项为所需要的：

en: **Display name**: Enter a new display name if you want to change the name of the VM.
zh: **显示名**：如果你想更改VM的名字，那么输入一个新的显示名。

en: **OS Type**: Select the desired operating system.
zh: **OS类型**：选择所需的操作系统。

en: **Group**: Enter the group name for the VM.
zh: **组**：输入VM的组名。

en: Click Apply.
zh: 点击应用

en: Appending a Display Name to the Guest VM’s Internal Name
zh: 给来宾VM的内部名称附加显示名

en: Every guest VM has an internal name. The host uses the internal name to identify the guest VMs. CloudStack gives you an option to provide a guest VM with a display name. You can set this display name as the internal name so that the vCenter can use it to identify the guest VM. A new global parameter, vm.instancename.flag, has now been added to achieve this functionality.
zh: 每个来宾VM都有一个内部名称。主机使用内部名称来识别来宾VMs。CloudStack为来宾VM提供了一个关于显示名的选项。你可以设置显示名作为内部名称以便vCenter可以使用它来识别来宾VM。vm.instancename.flag作为一个新的全局参数，已被添加用来实现此功能。

en: The default format of the internal name is i-<user\_id>-<vm\_id>-<instance.name>, where instance.name is a global parameter. However, If vm.instancename.flag is set to true, and if a display name is provided during the creation of a guest VM, the display name is appended to the internal name of the guest VM on the host. This makes the internal name format as i-<user\_id>-<vm\_id>-<displayName>. The default value of vm.instancename.flag is set to false. This feature is intended to make the correlation between instance names and internal names easier in large data center deployments.
zh: 默认的内部名称的格式是 i-<user\_id>-<vm\_id>-<instance.name>，这里instance.name是全局参数。但是，如果vm.instancename.flag被设置为true，并且来宾VM在创建的过程中提供了显示名，那么显示名就会被附加至该主机的来宾VM的内部名称上。这样就使得内部名称的格式类似于 i-<user\_id>-<vm\_id>-<displayName>。vm.instancename.flag的默认值被设置为false。这个功能可以比较容易的在大型数据中心的部署中表示实例名和内部名之间的相互关系。

en: The following table explains how a VM name is displayed in different scenarios.
zh: 下面的表格解释了不同场景下VM的名称是如何显示的。

en: User-Provided Display Name
zh: 用户提供的显示名

en: Hostname on the VM
zh: VM的主机名

en: Name on vCenter
zh: vCenter中的名称

en: Internal Name
zh: 内部名称

en: Yes
zh: 是

en: Display name
zh: 显示名

en: No
zh: 否

en: Changing the Service Offering for a VM
zh: 为VM变更服务方案

en: To upgrade or downgrade the level of compute resources available to a virtual machine, you can change the VM's compute offering.
zh: 要给虚拟机提升或降低可用计算资源的级别，你可以更改VM的计算方案。

en: Choose the VM that you want to work with.
zh: 选择你要处理的VM。

en: (Skip this step if you have enabled dynamic VM scaling; see :ref:`cpu-and-memory-scaling`.)
zh: (如果你启用了动态VM扩展或缩减，请跳过此步；查看:ref:`cpu-and-memory-scaling。`)

en: Click the Change Service button. |ChangeServiceButton.png|
zh: 点击更改服务按钮。 |ChangeServiceButton.png|

en: The Change service dialog box is displayed.
zh: 显示更改服务对话框。

en: Select the offering you want to apply to the selected VM.
zh: 选择你想应用到选择的VM的方案。

en: CPU and Memory Scaling for Running VMs
zh: 运行中VMs的CPU和内存的扩展和缩减

en: It is not always possible to accurately predict the CPU and RAM requirements when you first deploy a VM. You might need to increase these resources at any time during the life of a VM. You can dynamically modify CPU and RAM levels to scale up these resources for a running VM without incurring any downtime.
zh: 通常当你第一次部署VM的时候不太可能精确地预计CPU和RAM需求。你可能必须在VM的生命周期内的任何时间增加这些资源。你可以在不中断运行状态中的VM的情况下，动态的修改CPU和RAM级别来提升这些资源，、。

en: Dynamic CPU and RAM scaling can be used in the following cases:
zh: 动态CPU和RAM扩展和缩减能被用于一下情况：

en: User VMs on hosts running VMware and XenServer.
zh: 运行VMware和XenServer的主机上的用户VMs。

en: System VMs on VMware.
zh: VMware上的系统VMs。

en: VMware Tools or XenServer Tools must be installed on the virtual machine.
zh: 虚拟机上必须安装VMware Tools或者XenServer Tools。

en: The new requested CPU and RAM values must be within the constraints allowed by the hypervisor and the VM operating system.
zh: 对于新的CPU和RAM大小必须在hypervisor和VM操作系统要求之内。

en: New VMs that are created after the installation of CloudStack 4.2 can use the dynamic scaling feature. If you are upgrading from a previous version of CloudStack, your existing VMs created with previous versions will not have the dynamic scaling capability unless you update them using the following procedure.
zh: 在CloudStack 4.2安装完以后创建的新VMs都可以使用动态扩展和缩减功能。如果你的CloudStack是从旧版本升级而来的，其上已有的VMs不会支持动态扩展和缩减功能，除非你按照下面的过程来升级这些VM。

en: Updating Existing VMs
zh: 升级已有VMs

en: If you are upgrading from a previous version of CloudStack, and you want your existing VMs created with previous versions to have the dynamic scaling capability, update the VMs using the following steps:
zh: 如果你正在升级旧版本的CloudStack，并且你还想让你的旧版本VMs拥有动态扩展和缩减能力，请使用以下步骤来升级VMs：

en: Make sure the zone-level setting enable.dynamic.scale.vm is set to true. In the left navigation bar of the CloudStack UI, click Infrastructure, then click Zones, click the zone you want, and click the Settings tab.
zh: 确保区域级别设置enable.dynamic.scale.vm被设置为true。在CloudStack UI的左侧导航条，点击基础架构，然后点击区域，点击你要操作的区域，然后点击Settings标签。

en: Install Xen tools (for XenServer hosts) or VMware Tools (for VMware hosts) on each VM if they are not already installed.
zh: 在每台VM上安装Xen tools(适用于XenServer主机)或者VMware Tools(适用于VMware主机)。

en: Stop the VM.
zh: 停止VM。

en: Click the Edit button.
zh: 点击编辑按钮。

en: Click the Dynamically Scalable checkbox.
zh: 点击动态伸缩选框。

en: Restart the VM.
zh: 重启VM。

en: Configuring Dynamic CPU and RAM Scaling
zh: 配置动态CPU和RAM伸缩

en: To configure this feature, use the following new global configuration variables:
zh: 要配置此功能，请使用下面的全局配置变量：

en: enable.dynamic.scale.vm: Set to True to enable the feature. By default, the feature is turned off.
zh: enable.dynamic.scale.vm：设置为True以启用此功能。默认情况下，此功能是被关闭的。

en: scale.retry: How many times to attempt the scaling operation. Default = 2.
zh: scale.retry：伸缩操作的重试次数。默认为2。

en: How to Dynamically Scale CPU and RAM
zh: 如果动态伸缩CPU和RAM

en: To modify the CPU and/or RAM capacity of a virtual machine, you need to change the compute offering of the VM to a new compute offering that has the desired CPU and RAM values. You can use the same steps described above in `“Changing the Service Offering for a VM” <#changing-the-service-offering-for-a-vm>`_, but skip the step where you stop the virtual machine. Of course, you might have to create a new compute offering first.
zh: 要修改虚拟机的CPU和/或RAM，你必须更改VM的计算方案为你想要的。你可以按照上文中所述的同样的步骤 `“Changing the Service Offering for a VM” <#changing-the-service-offering-for-a-vm>`_，但是要跳过停止虚拟机的步骤。当然，你可能必须先创建一个新的计算方案。

en: When you submit a dynamic scaling request, the resources will be scaled up on the current host if possible. If the host does not have enough resources, the VM will be live migrated to another host in the same cluster. If there is no host in the cluster that can fulfill the requested level of CPU and RAM, the scaling operation will fail. The VM will continue to run as it was before.
zh: 当你提交一个动态伸缩的请求的时候，当前主机可能会扩展资源。如果主机没有足够的资源，VM会被在线迁移至同一群集中的其他主机。如果群集中没有能满足CPU和RAM条件的主机，那么扩展操作会失败。不用担心，VM会往常一样继续运行。

en: Limitations
zh: 局限性

en: You can not do dynamic scaling for system VMs on XenServer.
zh: 你不能为XenServer上运行的系统VMs进行动态伸缩操作。

en: CloudStack will not check to be sure that the new CPU and RAM levels are compatible with the OS running on the VM.
zh: CloudStack不会检查新的CPU和RAM级别是不是符合VM操作系统的要求。

en: When scaling memory or CPU for a Linux VM on VMware, you might need to run scripts in addition to the other steps mentioned above. For more information, see `Hot adding memory in Linux (1012764) <http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012764>`_ in the VMware Knowledge Base.
zh: 当为VMware上运行的Linux VM扩展内存或者CPU的时候，你可能需要运行额外的脚本。更多信息，请参阅VMware知识库中的 `在Linux中热添加内存 (1012764) <http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012764>`_

en: (VMware) If resources are not available on the current host, scaling up will fail on VMware because of a known issue where CloudStack and vCenter calculate the available capacity differently. For more information, see `https://issues.apache.org/jira/browse/CLOUDSTACK-1809 <https://issues.apache.org/jira/browse/CLOUDSTACK-1809>`_.
zh: (VMware)如果当前主机上没有可用资源，因为一个已知的问题，VMware上的虚机扩展会失败，这是因为CloudStack和vCenter计算可用容量方法的不同。更多信息，请参阅`https://issues.apache.org/jira/browse/CLOUDSTACK-1809 <https://issues.apache.org/jira/browse/CLOUDSTACK-1809>`_。

en: On VMs running Linux 64-bit and Windows 7 32-bit operating systems, if the VM is initially assigned a RAM of less than 3 GB, it can be dynamically scaled up to 3 GB, but not more. This is due to a known issue with these operating systems, which will freeze if an attempt is made to dynamically scale from less than 3 GB to more than 3 GB.
zh: 对于运行Linux 64位和Windows 7 32位操作系统的VMs，如果VM初始分配的RAM小于3GB，那么它最大能动态的扩展到3GB。这是因为这些操作系统已知的问题，如果尝试从小于3G动态扩展至超过3G的话，操作系统会宕机。

en: Resetting the Virtual Machine Root Volume on Reboot
zh: 在重启时重置虚拟机的Root卷

en: For secure environments, and to ensure that VM state is not persisted across reboots, you can reset the root disk. For more information, see `“Reset VM to New Root Disk on Reboot” <storage.html#reset-vm-to-new-root-disk-on-reboot>`_.
zh: 为安全环境和确保VM重启期间不被中断状态，你可以重置root磁盘。更多信息，请参阅 `“在重启时给VM重置一个新的Root磁盘” <storage.html#reset-vm-to-new-root-disk-on-reboot>`_。

en: Moving VMs Between Hosts (Manual Live Migration)
zh: 在主机之间移动VMs(手动在线迁移)

en: The CloudStack administrator can move a running VM from one host to another without interrupting service to users or going into maintenance mode. This is called manual live migration, and can be done under the following conditions:
zh: CloudStack管理员可以从一个主机将运行中的VM不中断服务地移动到其他主机或者将其进入维护模式。这个过程叫手动在线迁移，要满足以下条件：

en: The root administrator is logged in. Domain admins and users can not perform manual live migration of VMs.
zh: root管理员已登录。域管理员和用户不能执行手动在线迁移操作。

en: The VM is running. Stopped VMs can not be live migrated.
zh: VM正在运行。停止的VMs不能进行在线迁移。

en: The destination host must have enough available capacity. If not, the VM will remain in the "migrating" state until memory becomes available.
zh: 目标主机必须有足够的可用容量。如果没有，VM会一直停留在"迁移中"状态，直到有多余内存可用。

en: (KVM) The VM must not be using local disk storage. (On XenServer and VMware, VM live migration with local disk is enabled by CloudStack support for XenMotion and vMotion.)
zh: (KVM)VM必须不能使用本地磁盘存储。(在XenServer和VMware中，CloudStack依靠XenMotion和vMotion允许使用了本地磁盘的VM能够在线迁移。)

en: (KVM) The destination host must be in the same cluster as the original host. (On XenServer and VMware, VM live migration from one cluster to another is enabled by CloudStack support for XenMotion and vMotion.)
zh: (KVM)目标主机必须跟源主机在同一个群集。(在XenServer和VMware上，CloudStack依靠XenMotion和vMotion，允许VM从一个群集在线迁移到另一个群集)

en: To manually live migrate a virtual machine
zh: 手动在线迁移一个虚拟机

en: Choose the VM that you want to migrate.
zh: 选择你想迁移的VM。

en: Click the Migrate Instance button. |Migrateinstance.png|
zh: 点击迁移实例按钮。 |Migrateinstance.png|

en: From the list of suitable hosts, choose the one to which you want to move the VM.
zh: 从可用主机列表中，选择一个目标主机。

en: If the VM's storage has to be migrated along with the VM, this will be noted in the host list. CloudStack will take care of the storage migration for you.
zh: 如果VM的存储与VM必须一起被迁移，这点会在主机列表中标注。CloudStack会为你自动的进行存储迁移。

en: Deleting VMs
zh: 删除VMs

en: Users can delete their own virtual machines. A running virtual machine will be abruptly stopped before it is deleted. Administrators can delete any virtual machines.
zh: 用户可以删除他们拥有的虚拟机。在删除运行中的虚拟机之前，虚拟机会被强制停止。管理员可以删除任何虚拟机。

en: To delete a virtual machine:
zh: 要删除虚拟机：

en: Choose the VM that you want to delete.
zh: 选择你想删除的VM。

en: Click the Destroy Instance button. |Destroyinstance.png|
zh: 点击销毁实例按钮。 |Destroyinstance.png|

en: Working with ISOs
zh: 使用ISOs

en: CloudStack supports ISOs and their attachment to guest VMs. An ISO is a read-only file that has an ISO/CD-ROM style file system. Users can upload their own ISOs and mount them on their guest VMs.
zh: CloudStack支持ISOs和将其挂载到来宾VMs。ISO是一种只读的ISO/CD-ROM格式的文件文件系统。用户可以上传他们自己的ISOs并且将其挂载至他们的来宾VMs。

en: ISOs are uploaded based on a URL. HTTP is the supported protocol. Once the ISO is available via HTTP specify an upload URL such as http://my.web.server/filename.iso.
zh: ISOs文件通过URL上传。HTTP是受支持的协议。一旦ISO通过HTTP指定一个上传URL，比如http://my.web.server/filename.iso上传成功，那么文件就可以用了。

en: ISOs may be public or private, like templates.ISOs are not hypervisor-specific. That is, a guest on vSphere can mount the exact same image that a guest on KVM can mount.
zh: ISOs可能是私有的也可以是共有的，像templates.ISOs并不针对某种hypervisor。也就是说，运行在vSphere上的来宾虚机和运行在KVM上的虚机可以挂载同一个ISO。

en: ISO images may be stored in the system and made available with a privacy level similar to templates. ISO images are classified as either bootable or not bootable. A bootable ISO image is one that contains an OS image. CloudStack allows a user to boot a guest VM off of an ISO image. Users can also attach ISO images to guest VMs. For example, this enables installing PV drivers into Windows. ISO images are not hypervisor-specific.
zh: ISO镜像可能存储在系统中并且隐私级别与模板相似。ISO镜像分为可引导或不可引导的。可引导的ISO镜像是包含了OS镜像的。CloudStack允许用户通过ISO镜像来启动来宾虚机。用户同样可以将ISO镜像挂载到来宾VMs。比如，给Windows安装PV驱动。ISO镜像不指定hypervisor。

en: Adding an ISO
zh: 添加ISO

en: To make additional operating system or other software available for use with guest VMs, you can add an ISO. The ISO is typically thought of as an operating system image, but you can also add ISOs for other types of software, such as desktop applications that you want to be installed as part of a template.
zh: 为了添加额外的操作系统或者给来宾VMs使用其它软件，你可以添加ISO。操作系统镜像被认为是最典型的ISO，但是你也能添加软件类型的ISOs，例如你想把安装的桌面应用作为模板的一部分。

en: Log in to the CloudStack UI as an administrator or end user.
zh: 使用管理员或者终端用户账号登录CloudStack UI。

en: In the left navigation bar, click Templates.
zh: 在左侧的导航栏，点击模板。

en: In Select View, choose ISOs.
zh: 在选择视图中，选择ISOs。

en: Click Add ISO.
zh: 点击添加ISO。

en: In the Add ISO screen, provide the following:
zh: 在添加ISO界面中，提供下列信息:

en: **Name**: Short name for the ISO image. For example, CentOS 6.2 64-bit.
zh: **名称**: ISO 镜像的简称。例如，CentOS6.2 64-bit。

en: **Description**: Display test for the ISO image. For example, CentOS 6.2 64-bit.
zh: **描述**: 对于ISO镜像的描述。例如，CentOS 6.2 64-bit.

en: **URL**: The URL that hosts the ISO image. The Management Server must be able to access this location via HTTP. If needed you can place the ISO image directly on the Management Server
zh: **URL**: ISO镜像主机的URL。管理服务器必须能够通过HTTP访问这个地址。如果有需要你可以直接将ISO放置到管理服务器中。

en: **Zone**: Choose the zone where you want the ISO to be available, or All Zones to make it available throughout CloudStack.
zh: **区域**: 选择你希望该ISO在到哪个区域可用，或者选择所有区域使该ISO在CloudStack中全部区域中可用。

en: **Bootable**: Whether or not a guest could boot off this ISO image. For example, a CentOS ISO is bootable, a Microsoft Office ISO is not bootable.
zh: **可启动**: 来宾是否可以通过该ISO镜像启动。例如，一个CentOS ISO 是可启动的，一个Microsoft Office ISO 是不可启动的。

en: **OS Type**: This helps CloudStack and the hypervisor perform certain operations and make assumptions that improve the performance of the guest. Select one of the following.
zh: **操作系统类型*: 这有助于CloudStack和Hypervisor执行某些操作并假设可提高来宾虚拟机的性能。选择下列之一。

en: If the operating system of your desired ISO image is listed, choose it.
zh: 如果你需要的ISO镜像对应的操作系统在列表中，请选择它。

en: If the OS Type of the ISO is not listed or if the ISO is not bootable, choose Other.
zh: 如果ISO镜像的操作系统类型没有被列出或者ISO是不可引导的，选择Other。

en: (XenServer only) If you want to boot from this ISO in PV mode, choose Other PV (32-bit) or Other PV (64-bit)
zh: (仅针对XenServer) 如果你想使用这个ISO在PV 模式中引导，选择 Other PV (32-bit) 或 Other PV(64-bit)

en: (KVM only) If you choose an OS that is PV-enabled, the VMs created from this ISO will have a SCSI (virtio) root disk. If the OS is not PV-enabled, the VMs will have an IDE root disk. The PV-enabled types are:
zh: (仅针对KVM) 如果你选择一个操作系统为PV-enabled,， 通过这个ISO创建的虚拟机会有一个SCSI(virtio)根磁盘。如果这个操作系统没有PV-enabled,,虚拟机将有一个IDE根磁盘。PV-enabled 类型是:

en: It is not recommended to choose an older version of the OS than the version in the image. For example, choosing CentOS 5.4 to support a CentOS 6.2 image will usually not work. In these cases, choose Other.
zh: 不建议选择一个比操作系统镜像老的版本。例如，选择CentOS 5.4 去支持一个CentOS6.2的镜像通常导致不能工作。在这种情况下，去选择Other。

en: **Extractable**: Choose Yes if the ISO should be available for extraction.
zh: **可提取**:  如果该ISO可以被提取出来，则选择Yes。

en: **Public**: Choose Yes if this ISO should be available to other users.
zh: **公共**:  如果该ISO可以被所有用户使用，则选择Yes。

en: **Featured**: Choose Yes if you would like this ISO to be more prominent for users to select. The ISO will appear in the Featured ISOs list. Only an administrator can make an ISO Featured.
zh: **精选**:  如果你想这个用户在选择这个ISO时更加突出则选择Yes。该ISO将出现在精选ISO列表中。只有管理员可以设置ISO为精选。

en: The Management Server will download the ISO. Depending on the size of the ISO, this may take a long time. The ISO status column will display Ready once it has been successfully downloaded into secondary storage. Clicking Refresh updates the download percentage.
zh: 管理服务器将下载该ISO。根据ISO镜像的大小，下载过程可能会用很长时间。一旦该镜像已经被成功下载到辅助存储时ISO 状态栏将会显示Ready。点击刷新更新更新百分比。

en: **Important**: Wait for the ISO to finish downloading. If you move on to the next task and try to use the ISO right away, it will appear to fail. The entire ISO must be available before CloudStack can work with it.
zh: **重要**: 等等ISO下载完成过程中。如果你想执行下一个任务并且尝试正常使用该ISO，这将会失败。在CloudStack 使用它之前该ISO必须是完整且有效的。

en: Attaching an ISO to a VM
zh: 附加ISO到虚拟机

en: Choose the virtual machine you want to work with.
zh: 选择要使用的虚拟机。

en: Click the Attach ISO button. |iso.png|
zh: 点击附加ISO按钮。 |iso.png|

en: In the Attach ISO dialog box, select the desired ISO.
zh: 在附加ISO对话框中，选择所需的ISO。

en: Changing a VM's Base Image
zh: 改变VM's 的基础镜像

en: Every VM is created from a base image, which is a template or ISO which has been created and stored in CloudStack. Both cloud administrators and end users can create and modify templates, ISOs, and VMs.
zh: 每个VM都是通过基础镜像创建的，可以是创建并存储在CloudStack中的一个模版或者一个ISO镜像。云管理员和终端用户都可以创建和修改模版，ISO和VM。

en: In CloudStack, you can change an existing VM's base image from one template to another, or from one ISO to another. (You can not change from an ISO to a template, or from a template to an ISO).
zh: 在CloudStack中，你可以改变虚拟机的基础磁盘从一个模版换成其他模版，或从一个ISO换成其他ISO。(你不能把ISO变成模版或模版变成ISO。)

en: For example, suppose there is a template based on a particular operating system, and the OS vendor releases a software patch. The administrator or user naturally wants to apply the patch and then make sure existing VMs start using it. Whether a software update is involved or not, it's also possible to simply switch a VM from its current template to any other desired template.
zh: 例如，假设有一个模板基于一个特定的操作系统，并且操作系统厂商发布了一个补丁。管理员和用户理所当然的想要将该补丁应用到已经存在的虚拟机中，并确保虚拟机开始使用它。无论是否涉及软件更新，也有可能只是将虚拟机从当前的模板切换至其他所需的模板。

en: To change a VM's base image, call the restoreVirtualMachine API command and pass in the virtual machine ID and a new template ID. The template ID parameter may refer to either a template or an ISO, depending on which type of base image the VM was already using (it must match the previous type of image). When this call occurs, the VM's root disk is first destroyed, then a new root disk is created from the source designated in the template ID parameter. The new root disk is attached to the VM, and now the VM is based on the new template.
zh: 要改变熏鸡的基础镜像，通过虚拟机iD和新的模版ID调用restoreVirtualMachine API命令。模版ID参数可以参考模版或者ISO，取决于虚拟机正在使用的基础镜像类型(它必须匹配先前的镜像类型)。当这个调用生效时，虚拟机的根磁盘首先被摧毁，然后通过指定的模版ID参数创建根磁盘。新的根磁盘会附件到虚拟机中，现在虚拟机已经基于新的模版了。

en: You can also omit the template ID parameter from the restoreVirtualMachine call. In this case, the VM's root disk is destroyed and recreated, but from the same template or ISO that was already in use by the VM.
zh: 你同样可以在调用restoreVirtualMachine时忽略模版ID参数。在这个情况下，虚拟机的根磁盘被摧毁并重新创建。但相同的模版或ISO已经被该虚拟机使用。

en: Using SSH Keys for Authentication
zh: 未验证使用SSH秘钥

en: In addition to the username and password authentication, CloudStack supports using SSH keys to log in to the cloud infrastructure for additional security. You can use the createSSHKeyPair API to generate the SSH keys.
zh: 除了用户名和密码验证之外，出于额外的安全性考虑，CloudStack还支持使用SSH秘钥来登录到云架构。你可以使用createSSHKeyPair API来生成SSH秘钥。

en: Because each cloud user has their own SSH key, one cloud user cannot log in to another cloud user's instances unless they share their SSH key files. Using a single SSH key pair, you can manage multiple instances.
zh: 因为每个云用户都有他们自己的SSH秘钥，一个云用户不能登录到另一个云用户的实例中，除非他们共享了他们的SSH key文件。使用一个SSH秘钥对，你可以管理多个实例。

en: Creating an Instance Template that Supports SSH Keys
zh: 创建一个支持SSH秘钥的实例模板

en: Create an instance template that supports SSH Keys.
zh: 创建一个支持SSH秘钥的实例模板。

en: Create a new instance by using the template provided by cloudstack.
zh: 使用CloudStack提供的模板创建一个新的实例。

en: For more information on creating a new instance, see
zh: 关于创建新实例的更多信息，请参阅

en: Download the cloudstack script from `The SSH Key Gen Script <http://sourceforge.net/projects/cloudstack/files/SSH%20Key%20Gen%20Script/>`_ to the instance you have created.
zh: 从 `The SSH Key Gen Script <http://sourceforge.net/projects/cloudstack/files/SSH%20Key%20Gen%20Script/>`_ 下载CloudStack脚本到你已经创建的实例中。

en: Copy the file to /etc/init.d.
zh: 复制这个脚本到 /etc/init.d。

en: Give the necessary permissions on the script:
zh: 给这个脚本必要的权限：

en: Run the script while starting up the operating system:
zh: 当系统启动的时候运行脚本：

en: Stop the instance.
zh: 停止实例。

en: Creating the SSH Keypair
zh: 创建SSH秘钥对

en: You must make a call to the createSSHKeyPair api method. You can either use the CloudStack Python API library or the curl commands to make the call to the cloudstack api.
zh: 你必须给createSSHKeyPair api方法做一个调用。你可以使用CloudStack  Python API 库或curl 命令给CloudStack API做调用。

en: For example, make a call from the cloudstack server to create a SSH keypair called "keypair-doc" for the admin account in the root domain:
zh: 比如，从CloudStack服务器为根域中的管理员帐户做调用来创建一个SSH秘钥对 ，名称为 "keypair-doc" ：

en: Ensure that you adjust these values to meet your needs. If you are making the API call from a different server, your URL/PORT will be different, and you will need to use the API keys.
zh: 确认你调整这些值是你所需要的。如果你从不同的服务器上做API调用，你的 URL/PORT 也是不同的，并且你必须使用API 秘钥。

en: Run the following curl command:
zh: 运行如下curl命令：

en: The output is something similar to what is given below:
zh: 输出的内容与下面所示的类似：

en: Copy the key data into a file. The file looks like this:
zh: 复制秘钥的数据到一个文件。这个文件类似于：

en: Save the file.
zh: 保存文件。

en: Creating an Instance
zh: 创建实例

en: After you save the SSH keypair file, you must create an instance by using the template that you created at `Section 5.2.1, “ Creating an Instance Template that Supports SSH Keys” <#create-ssh-template>`__. Ensure that you use the same SSH key name that you created at `Section 5.2.2, “Creating the SSH Keypair” <#create-ssh-keypair>`__.
zh: 在你保存了SSH秘钥对文件之后，你必须使用你在`章节 5.2.1, “ 创建支持SSH秘钥的实例模板” <#create-ssh-template>`__中创建的模来板创建一个实例。确保你使用与你在`章节 5.2.2, “创建秘钥对” <#create-ssh-keypair>`__中创建的同样的SSH秘钥名称。

en: You cannot create the instance by using the GUI at this time and associate the instance with the newly created SSH keypair.
zh: 这时候你不能通过使用 GUI来创建实例，要使用新创建的SSH秘钥对来关联实例。

en: A sample curl command to create a new instance is:
zh: 使用简单的curl命令创建新的实例：

en: Substitute the template, service offering and security group IDs (if you are using the security group feature) that are in your cloud environment.
zh: 在你的云环境中，服务方案和安全组IDs(如果你使用安全组功能)可以替代模板。

en: Logging In Using the SSH Keypair
zh: 使用SSH秘钥对登录

en: To test your SSH key generation is successful, check whether you can log in to the cloud setup.
zh: 测试你的SSH秘钥的生成是否成功，需要检查是否能够登录到云中。

en: For example, from a Linux OS, run:
zh: 举个例子，在LinuxOS中，运行：

en: The -i parameter tells the ssh client to use a ssh key found at ~/.ssh/keypair-doc.
zh: 参数-i是通知ssh客户端使用一个在~/.ssh/keypair-doc中找到的ssh秘钥。

en: Resetting SSH Keys
zh: 重置SSH密钥

en: With the API command resetSSHKeyForVirtualMachine, a user can set or reset the SSH keypair assigned to a virtual machine. A lost or compromised SSH keypair can be changed, and the user can access the VM by using the new keypair. Just create or register a new keypair, then call resetSSHKeyForVirtualMachine.
zh: 通过API命令resetSSHKeyForVirtualMachine，用户可以设置或者重设分配给虚拟机的SSH秘钥对。可以更改丢失或被盗用的SSH密钥对，并且用户可以使用新的秘钥对来访问VM。只要创建或注册新的密钥对然后调用resetSSHKeyForVirtualMachine。
