source/adminguide/locale/zh_CN/LC_MESSAGES/virtual_machines.mo (35 lines of code) (raw):

��/�  ) �7���[�#�KlR#���PvT�J�g+$�PG'1o��FO��zN'�x�2j � #�! �! �!�!� "f#Zk#�$j�%:A&$|&�&��&\'{u'Q�'/C(�s(#H)�l)&.+ U+ `+ k+(v+�+&�+"�+&,'+,)S,1},�,�,J�, - *-8-5U-�- �-5�-:�-.&0.>W.:�.8�.( /3/8J/6�/9�/1�/.&0/U02�0��0?L1_�2�2��3r�4(5'C5k5�58�5C�536HS6��6 a7n7�74�7�7�78 8!&8 H8JT8 �8p�8�9?�9� :��:��;�\<u'=�> �> �> �> �>�>S�>�(?"�?� @z�@4B�EBS3C��C_1DQ�D-�D E�FGH$(H�MH��I��JBMKK�LT�M%1NgWOT�Q�R��RGuS��S �T��UXV�uV�X-�X5%Y2[Y,�Y,�Y(�YOZ"aZx�Z��Z��[ q]3]��^ �_�_/�_7�_<`8N` �`��`*a�a0�a�albub5�b6�b�cfdRid��e�vf4gQ=g��gFhch�h�h�h3�h�hi6/ifi4ui��iZj&ij9�j(�j �jkk�-k�kS�k+*l�Vl0>moq8ur��r�=tL�t�DwO�w3"xzVy7�yj z3tz�z��{{D|F�|)})1}[}(u}.�}\�}*~PH�����0ՀQ�X�u�D��2ׁ* ��5�C�G+�_s��ӅT�Y�^�/t������!e��� ��|��4$��Y�I�IL�!�����Ҍ0����J������3��ɓۓ������Д���;��R��{3�����Z�b �%m�!��J����,�<��S� (��4����Þft� ۟C��u@�������B<�T�Cԣ�����ޤ>��-���F�������$�s-�.���Шʩ � � ����S�9<��v��D�)�,G�t����!�d7�f��8��<���2�-ݲ � � !� ,�M�h�������г� ��E3� y��� ��/�����2�3:�n�"��>��5�1�P�l�1��5��4�1�#Q�#u�!�����0J�={�������TY�����ڻ$�?�:N�-��=����� ���� ڽ*��%�6� O�Y�u�0|� ��l���$�9ǿ������O����H���� � � � !�+�i4����(Z����b�0g����?u����ea�6��!��� �����������T���6����������Z�������_���O����N�����rx����"��w���8�+��0�-P�!~�'��-��9��0�cO����aG� ������� ~���:��.��=�1B�t����$Z��,����k��E�)^�����]�� ��������D�DM����=�Z�w�����%�� ����' �3�?C�����4�,O�&|� ������h��;�VT������������8e�v����$�����GH����Nx�*��U��?H����na�]��1.�`�~���2��)��N��h�<*�g���*��G���$�;=��y�!qJ�=�<WY_�3+_�x+=wVk��:<�G\x��$A �f % �6 9 $V  {�����]� E 1Og����vi %s!�9�� !1(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.(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:(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.)(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.)(Skip this step if you have enabled dynamic VM scaling; see :ref:`cpu-and-memory-scaling`.)(Supported on VMware and XenServer)(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>`_.(XenServer only) If you want to boot from this ISO in PV mode, choose Other PV (32-bit) or Other PV (64-bit)(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.**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.**Description**: Display test for the ISO image. For example, CentOS 6.2 64-bit.**Display name**: Enter a new display name if you want to change the name of the VM.**Extractable**: Choose Yes if the ISO should be available for extraction.**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.**Group**: Enter the group name for the VM.**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.**Name**: Short name for the ISO image. For example, CentOS 6.2 64-bit.**OS Type**: Select the desired operating system.**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.**Public**: Choose Yes if this ISO should be available to other users.**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**Zone**: Choose the zone where you want the ISO to be available, or All Zones to make it available throughout CloudStack.A reboot is a stop followed by a start.A running virtual machine may fail because of hardware or network issues. A failed virtual machine is in the down state.A sample curl command to create a new instance is: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.About Working with Virtual MachinesAccessing VMsAdding an ISOAffinity GroupsAffinity 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.After a VM is created, you can modify the display name, operating system, and the group it belongs to.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>`__.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.Any user can access their own virtual machines. The administrator can access all VMs running in the cloud.Appending a Display Name to the Guest VM’s Internal NameAssign a New VM to an Affinity GroupAssigning VMs to HostsAt 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:Attaching an ISO to a VMAutomatic default host allocation. CloudStack can automatically pick the most appropriate host to run each virtual machine.Be sure that the hardware you have allows starting the selected service offering.Be sure the following are installed on each VM: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.Best Practices for Virtual MachinesBy 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.CPU and Memory Scaling for Running VMsCentOS 5.3CentOS 5.4CentOS 5.5Change Affinity Group for an Existing VMChanging a VM's Base ImageChanging the Service Offering for a VMChanging the VM Name, OS, or GroupChoose the VM that you want to delete.Choose the VM that you want to migrate.Choose the VM that you want to work with.Choose the virtual machine you want to work with.Click Add ISO.Click Add Instance.Click Add affinity group. In the dialog box, fill in the following fields:Click Apply.Click Delete.Click Edit. |EditButton.png|Click Instances, then click the name of a running VM.Click Instances.Click OK.Click Submit and your VM will be created and started.Click View Instances. The members of the group are listed.Click View VM Snapshots.Click the Attach ISO button. |iso.png|Click the Change Affinity button. |change-affinity-button.png|Click the Change Service button. |ChangeServiceButton.png|Click the Destroy Instance button. |Destroyinstance.png|Click the Dynamically Scalable checkbox.Click the Edit button.Click the Migrate Instance button. |Migrateinstance.png|Click the Stop button to stop the VM. |StopButton.png|Click the Take VM Snapshot button. |VMSnapshotButton.png|Click the View Console button |console-icon.png|.Click the name of the VM you want to snapshot.Click the name of the VM you want to work with.Click the name of the group you are interested in.CloudStack also provides a pluggable interface for adding new allocators. These custom allocators can provide any policy the administrator desires.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.CloudStack preserves the state of the virtual machine hard disk until the machine is destroyed.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.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.CloudStack will not check to be sure that the new CPU and RAM levels are compatible with the OS running on the VM.Configuration Setting NameConfiguring Dynamic CPU and RAM ScalingConfiguring VM SnapshotsCopy the file to /etc/init.d.Copy the key data into a file. The file looks like this:Create a new instance by using the template provided by cloudstack.Create an instance template that supports SSH Keys.Create each VM from a template that already has the tools installed; or,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.Creating VMsCreating a New Affinity GroupCreating an InstanceCreating an Instance Template that Supports SSH KeysCreating the SSH KeypairDebian GNU/LinuxDelete an Affinity GroupDeleting VMsDepending on what you want to do:DescriptionDescription. Any desired text to tell more about the purpose of the group.Display nameDisplay name – the name displayed in the CloudStack web UI. Can be set by the user. Defaults to instance name.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.Dynamic CPU and RAM scaling can be used in the following cases: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.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.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.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.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.FalseFedora 10Fedora 11Fedora 12Fedora 13Fedora 9For VMs to work as expected and provide excellent service, follow these guidelines.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.For example, from a Linux OS, run: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: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.For more information on creating a new instance, seeFor 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>`_.For security reason, the internal name of the VM is visible only to the root admin.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.From here, you can click the name of any VM in the list to access all its details and controls.From the list of suitable hosts, choose the one to which you want to move the VM.Give the necessary permissions on the script: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 onGuest 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: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.Hostname on the VMHow to Dynamically Scale CPU and RAMISO 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.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.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.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.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.If a snapshot is already in progress, then clicking this button will have no effect.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.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>`_.If the OS Type of the ISO is not listed or if the ISO is not bootable, choose Other.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.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>`_.If the operating system of your desired ISO image is listed, choose it.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: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>`_.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).In Select View, choose ISOs.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.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.In the Add ISO screen, provide the following:In the Attach ISO dialog box, select the desired ISO.In the left navigation bar, click Affinity Groups.In the left navigation bar, click Instances.In the left navigation bar, click Templates.In the left navigation, click Instances.In the list of snapshots, click the name of the snapshot you want to work with.Install Required Tools and DriversInstall Xen tools (for XenServer hosts) or VMware Tools (for VMware hosts) on each VM if they are not already installed.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.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.Internal NameIt 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.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.LimitationsLimitations on VM SnapshotsLog in to the CloudStack UI as a user or admin.Log in to the CloudStack UI as a user or administrator.Log in to the CloudStack UI as an administrator or end user.Log in to the CloudStack UI as an administrator or user.Logging In Using the SSH KeypairMake 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.Make the desired changes to the following:Monitor VMs for Max CapacityMoving VMs Between Hosts (Manual Live Migration)Name on vCenterName – host name that the DHCP server assigns to the VM. Can be set by the user. Defaults to instance nameName. Give the group a name.Navigate to the VM as described in the earlier steps.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.NoNumber of seconds to wait for a snapshot job to succeed before declaring failure and issuing an error.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.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.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.Other PVProvide a name and description. These will be displayed in the VM Snapshots list.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.Red Hat Enterprise Linux 5.3Red Hat Enterprise Linux 5.4Red Hat Enterprise Linux 5.5Red Hat Enterprise Linux 6Resetting SSH KeysResetting the Virtual Machine Root Volume on RebootRestart the VM.Run the following curl command:Run the script while starting up the operating system:Save the file.Select ISO Boot, and follow the steps in the wizard.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>`_.Select a zone.Select the VM that you want to modify.Select the offering you want to apply to the selected VM.Stop the VM by clicking the Stop button.Stop the VM.Stop the instance.Stopping and Starting VMsSubstitute the template, service offering and security group IDs (if you are using the security group feature) that are in your cloud environment.System VMs on VMware.The -i parameter tells the ssh client to use a ssh key found at ~/.ssh/keypair-doc.The Change service dialog box is displayed.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: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.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.The VM is running. Stopped VMs can not be live migrated.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>`_.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.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.The destination host must have enough available capacity. If not, the VM will remain in the "migrating" state until memory becomes available.The following table explains how a VM name is displayed in different scenarios.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.The new requested CPU and RAM values must be within the constraints allowed by the hypervisor and the VM operating system.The output is something similar to what is given below:The root administrator is logged in. Domain admins and users can not perform manual live migration of VMs.The scope of an affinity group is per user account.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.The system places the virtual machine into the down state if it does not receive the heartbeat from the hypervisor for three minutes.The system will start the virtual machine from the down state automatically if the virtual machine is marked as HA-enabled.The user can manually restart the virtual machine from the down state.To access a VM directly over the network:To access a VM through the CloudStack UI:To add an affinity group:To assign a new VM to an affinity group:To assign an existing VM to an affinity group:To be sure that Xen tools or VMware Tools is installed, use one of the following techniques: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.To configure this feature, use the following new global configuration variables:To create a VM from a template:To create a VM from an ISO:To create a VM snapshot using the CloudStack UI:To delete a snapshot or restore a VM to the state saved in a particular snapshot:To delete a virtual machine:To delete an affinity group:To delete the snapshot, click the Delete button. |delete-button.png|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.To manually live migrate a virtual machineTo 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.To revert to the snapshot, click the Revert button. |revert-vm.png|To see which VMs are currently assigned to a particular affinity group:To test your SSH key generation is successful, check whether you can log in to the cloud setup.To upgrade or downgrade the level of compute resources available to a virtual machine, you can change the VM's compute offering.TrueUUIDUpdating Existing VMsUser VMs on hosts running VMware and XenServer.User-Provided Display NameUsers can delete their own virtual machines. A running virtual machine will be abruptly stopped before it is deleted. Administrators can delete any virtual machines.Using SSH Keys for AuthenticationUsing VM SnapshotsVM LifecycleVM snapshots are deleted automatically when a VM is destroyed. You don't have to manually delete the snapshots in this case.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.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.VMware Tools or XenServer Tools must be installed on the virtual machine.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.View Members of an Affinity GroupVirtual Machine SnapshotsVirtual 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.Virtual machines can be in the following states: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,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.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.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.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.Working with ISOsWorking with Virtual MachinesYesYou 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.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>`_.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.You can not do dynamic scaling for system VMs on XenServer.You can't make a VM snapshot at the same time as you are taking a volume snapshot.You cannot create the instance by using the GUI at this time and associate the instance with the newly created SSH keypair.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.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.enable.dynamic.scale.vm: Set to True to enable the feature. By default, the feature is turned off.i-<user\_id>-<vm\_id>-<instance.name>i-<user\_id>-<vm\_id>-displayNamescale.retry: How many times to attempt the scaling operation. Default = 2.vm.instancename.flagvmsnapshot.create.waitvmsnapshots.max|basic-deployment.png|Project-Id-Version: Apache CloudStack Administration RTD Report-Msgid-Bugs-To: POT-Creation-Date: 2014-06-30 12:52+0200 PO-Revision-Date: 2014-06-30 12:05+0000 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language-Team: Chinese (China) (http://www.transifex.com/projects/p/apache-cloudstack-administration-rtd/language/zh_CN/) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Language: zh_CN Plural-Forms: nplurals=1; plural=0; (仅限运行中的VMs)如果你想在快照中包含VM的内存状态,请勾选内存。这可以保存虚拟机的CPU和内存状态。如果你不勾选这个选项,那么只有VM目前磁盘状态会被保存。勾选了这个选项会让快照过程变长。(仅针对KVM) 如果你选择一个操作系统为PV-enabled,, 通过这个ISO创建的虚拟机会有一个SCSI(virtio)根磁盘。如果这个操作系统没有PV-enabled,,虚拟机将有一个IDE根磁盘。PV-enabled 类型是:(KVM)VM必须不能使用本地磁盘存储。(在XenServer和VMware中,CloudStack依靠XenMotion和vMotion允许使用了本地磁盘的VM能够在线迁移。)(KVM)目标主机必须跟源主机在同一个群集。(在XenServer和VMware上,CloudStack依靠XenMotion和vMotion,允许VM从一个群集在线迁移到另一个群集)(如果你启用了动态VM扩展或缩减,请跳过此步;查看:ref:`cpu-and-memory-scaling。`)(支持XenServer、KVM和VMware)(VMware)如果当前主机上没有可用资源,因为一个已知的问题,VMware上的虚机扩展会失败,这是因为CloudStack和vCenter计算可用容量方法的不同。更多信息,请参阅`https://issues.apache.org/jira/browse/CLOUDSTACK-1809 <https://issues.apache.org/jira/browse/CLOUDSTACK-1809>`_。(仅针对XenServer) 如果你想使用这个ISO在PV 模式中引导,选择 Other PV (32-bit) 或 Other PV(64-bit)(XenServer)XXenServer上运行的Windows VMs需要安装PV驱动,它可能在模板中或在创建完VM后添加。PV驱动对于基本的管理功能是必要的,比如挂载额外的卷和ISO镜像、在线迁移和正常关机。**可启动**: 来宾是否可以通过该ISO镜像启动。例如,一个CentOS ISO 是可启动的,一个Microsoft Office ISO 是不可启动的。**描述**: 对于ISO镜像的描述。例如,CentOS 6.2 64-bit.**显示名**:如果你想更改VM的名字,那么输入一个新的显示名。**可提取**: 如果该ISO可以被提取出来,则选择Yes。**精选**: 如果你想这个用户在选择这个ISO时更加突出则选择Yes。该ISO将出现在精选ISO列表中。只有管理员可以设置ISO为精选。**组**:输入VM的组名。**重要**: 等等ISO下载完成过程中。如果你想执行下一个任务并且尝试正常使用该ISO,这将会失败。在CloudStack 使用它之前该ISO必须是完整且有效的。**名称**: ISO 镜像的简称。例如,CentOS6.2 64-bit。**OS类型**:选择所需的操作系统。**操作系统类型*: 这有助于CloudStack和Hypervisor执行某些操作并假设可提高来宾虚拟机的性能。选择下列之一。**公共**: 如果该ISO可以被所有用户使用,则选择Yes。**URL**: ISO镜像主机的URL。管理服务器必须能够通过HTTP访问这个地址。如果有需要你可以直接将ISO放置到管理服务器中。**区域**: 选择你希望该ISO在到哪个区域可用,或者选择所有区域使该ISO在CloudStack中全部区域中可用。重启是关机再开机的过程。正在运行的虚机可能会因为硬件或者网络故障而出现问题。出现问题的虚机是down状态。使用简单的curl命令创建新的实例:停止操作是比较稳妥的关闭操作系统的方式,因为这样做能正常的关闭所有正在运行的应用程序。如果操作系统不能被停止,才要强制关闭它。这么做跟拔掉物理机器的电源线是一个效果。关于虚拟机的使用访问VMs添加ISO关联性组关联性组。依靠定义关联性组并把VMs分配给它们,用户或管理员可以影响(但不是指令)VMs运行在不同的主机上。这个功能是让用户可以规定某些VMs不会运行在同一台主机上。在VM被创建之后,你可以修改显示名,操作系统和它所属的组。在你保存了SSH秘钥对文件之后,你必须使用你在`章节 5.2.1, “ 创建支持SSH秘钥的实例模板” <#create-ssh-template>`__中创建的模来板创建一个实例。确保你使用与你在`章节 5.2.2, “创建秘钥对” <#create-ssh-keypair>`__中创建的同样的SSH秘钥名称。任何属于关联性组的VM都会被踢出此组。之前组里的成员会继续在当前主机上正常的运行,但是如果VM重启了,它就不再按照之前关联性组的主机分配策略。任​何​用​户​都可​以​访​问​他​们​自​己​的​虚​拟​机​。​管​理​员​能​够​访​问​在​云​中​运​行​的​所​有​虚​拟​机​。给来宾VM的内部名称附加显示名将一个新的VM分配给一个关联性组将VMs指定到主机在任何时刻,每个虚拟机实例都运行在一台主机上。CloudStack如何决定在哪个主机上放置VM呢?通常是这几种方式:附加ISO到虚拟机自动分配默认主机。CloudStack可以自动的选取最合适的主机来运行每个虚机。确认​你​的​硬​件​设​备​满足​运​行​所​选​的​服​务条件。确认在每个VM上都安装了下列软件和驱动:因为每个云用户都有他们自己的SSH秘钥,一个云用户不能登录到另一个云用户的实例中,除非他们共享了他们的SSH key文件。使用一个SSH秘钥对,你可以管理多个实例。虚拟机的最佳实践依靠定义关联性组并把VMs分配给它们,用户或管理员可以影响(但不是指令)VMs运行在不同的主机上。这个功能是让用户可以规定某些VMs运行在同“host anti-affinity”类型的而非同一台主机上。这写类服务器增强了容错功能。如果一个主机出现问题,那么另一个提供同样服务的VM(比如,运行用户的网站)依然在别的主机上运行。运行中VMs的CPU和内存的扩展和缩减CentOS 5.3CentOS 5.4CentOS 5.5给已有的VM更改关联性组改变VM's 的基础镜像为VM变更服务方案更改VM名字,OS或组选择你想删除的VM。选择你想迁移的VM。选择你要处理的VM。选择要使用的虚拟机。点击添加ISO。点击添加实例。点击添加关联性组。在对话框中的下列区域中输入:点击应用点击删除。点击编辑。 |EditButton.png|点击实例,然后点击运行VM的名字。点击实例。点击确定。点击提交,你的VM就会被创建并启动。点击查看实例。组的成员会列在此处。点击查看VM快照。点击附加ISO按钮。 |iso.png|点击变更关联性组按钮。 |change-affinity-button.png|点击更改服务按钮。 |ChangeServiceButton.png|点击销毁实例按钮。 |Destroyinstance.png|点击动态伸缩选框。点击编辑按钮。点击迁移实例按钮。 |Migrateinstance.png|点击停止按钮来关闭虚机。 |StopButton.png|点击抓取VM快照按钮。 |VMSnapshotButton.png|点击查看控制台按钮 |console-icon.png|。点击你想做快照的VM名称。点击你想更改的VM的名称。点击要查看的组的名称。CloudStack为添加新的分配器提供了一个插件似的接口。这些自定义的分配器可以提供任何管理员想要的策略。CloudStack不能区分是VM突然关机还是用户对来宾VM进行的关机操作(像Linux中的“shutdown”命令)。如果从启用了HA功能的VM系统中执行了关机操作,CloudStack会重启它。要对启用了HA功能的VM进行关机操作,你必须通过CloudStack UI或者API。CloudStack会保存虚机硬盘的状态直到它被销毁。CloudStack在云中为管理员提供了完整的管理所有来宾VMs整个生命周期的功能。CloudStack为终端用户和管理员提供了许多来宾虚机管理操作。VMs能被关机、开机、重启和销毁。CloudStack支持ISOs和将其挂载到来宾VMs。ISO是一种只读的ISO/CD-ROM格式的文件文件系统。用户可以上传他们自己的ISOs并且将其挂载至他们的来宾VMs。CloudStack不会检查新的CPU和RAM级别是不是符合VM操作系统的要求。配置设置名配置动态CPU和RAM伸缩配置VM快照复制这个脚本到 /etc/init.d。复制秘钥的数据到一个文件。这个文件类似于:使用CloudStack提供的模板创建一个新的实例。创建一个支持SSH秘钥的实例模板。从已经安装了tools的模板创建的每个VM;或者,如何创建VM,在 `“Creating VMs” <virtual_machines.html#creating-vms>`_中有描述。在添加实例向导中,有一个新的关联性组标签,你可以选择关联性组。创建VMs创建一个新的关联性组创建实例创建一个支持SSH秘钥的实例模板创建SSH秘钥对Debian GNU/Linux删除一个关联性组删除VMs取决于你想做什么:描述描述。给出更多关于这个组的说明。显示名显示名称 – 在CloudStack UI中显示的名称。可以由用户设置。默认跟实例名称一致。从 `The SSH Key Gen Script <http://sourceforge.net/projects/cloudstack/files/SSH%20Key%20Gen%20Script/>`_ 下载CloudStack脚本到你已经创建的实例中。动态CPU和RAM扩展和缩减能被用于一下情况:每个新VM都有一个公共网络IP地址。当VM启动后,CloudStack为此VM的公共网络IP地址与内网IP地址自动创建一个静态NAT。最终用户偏好设置。用户不能控制VM实例运行在哪台主机上,但是他们能为VM指定区域。这样CloudStack就只能将VM分配到该区域中的主机上。确认你调整这些值是你所需要的。如果你从不同的服务器上做API调用,你的 URL/PORT 也是不同的,并且你必须使用API 秘钥。每个VM都是通过基础镜像创建的,可以是创建并存储在CloudStack中的一个模版或者一个ISO镜像。云管理员和终端用户都可以创建和修改模版,ISO和VM。每个来宾VM都有一个内部名称。主机使用内部名称来识别来宾VMs。CloudStack为来宾VM提供了一个关于显示名的选项。你可以设置显示名作为内部名称以便vCenter可以使用它来识别来宾VM。vm.instancename.flag作为一个新的全局参数,已被添加用来实现此功能。FalseFedora 10Fedora 11Fedora 12Fedora 13Fedora 9为了让VMs能够按照预期的工作并提供最好的服务,请按照下面的指导进行操作。对于XenServer,在每个VM上安装PV驱动和Xen tools。这将启用动态迁移和干净的来宾虚机关机。安装Xen tools也是为了使动态的CPU和RAM扩展能够工作。举个例子,在LinuxOS中,运行:比如,从CloudStack服务器为根域中的管理员帐户做调用来创建一个SSH秘钥对 ,名称为 "keypair-doc" :例如,假设有一个模板基于一个特定的操作系统,并且操作系统厂商发布了一个补丁。管理员和用户理所当然的想要将该补丁应用到已经存在的虚拟机中,并确保虚拟机开始使用它。无论是否涉及软件更新,也有可能只是将虚拟机从当前的模板切换至其他所需的模板。关于创建新实例的更多信息,请参阅为安全环境和确保VM重启期间不被中断状态,你可以重置root磁盘。更多信息,请参阅 `“在重启时给VM重置一个新的Root磁盘” <storage.html#reset-vm-to-new-root-disk-on-reboot>`_。出于安全原因,VM的内部名称仅root管理员可见。对于vSphere,在每台VM上安装VMware Tools。这是为了能让控制台查看正常工作。安装VMware Tools也是为了使动态的CPU和RAM扩展能够工作。在这里,你可以点击列表中任何VM的名称来访问它所有的详细信息并控制它。从可用主机列表中,选择一个目标主机。给这个脚本必要的权限:来宾VMs可以配置成高可用(HA)。启用了HA的VM由系统监控。如果系统检测到此VM宕机,它可能将尝试在不同的主机上重启VM。更多信息,请参考在虚拟机上启用HA来宾VMs有名称和组。VM的名称和组对于CloudStack是不透明的,对终端用户整理他们的VMs可用。每个VM可以有三个用于不同环境的名称。其中有两个名字受用户控制:主机标签。管理员可以给主机分配标签。这些标签是用来指定VM该使用哪台主机的。CloudStack管理员自己决定如何定义主机标签,然后使用这些标签创建一个服务方案来提供给用户。VM的主机名如果动态伸缩CPU和RAMISO镜像可能存储在系统中并且隐私级别与模板相似。ISO镜像分为可引导或不可引导的。可引导的ISO镜像是包含了OS镜像的。CloudStack允许用户通过ISO镜像来启动来宾虚机。用户同样可以将ISO镜像挂载到来宾VMs。比如,给Windows安装PV驱动。ISO镜像不指定hypervisor。ISOs文件通过URL上传。HTTP是受支持的协议。一旦ISO通过HTTP指定一个上传URL,比如http://my.web.server/filename.iso上传成功,那么文件就可以用了。ISOs可能是私有的也可以是共有的,像templates.ISOs并不针对某种hypervisor。也就是说,运行在vSphere上的来宾虚机和运行在KVM上的虚机可以挂载同一个ISO。如果一个VM存储了一些快照,你就不能给他附加新卷或删除存在的卷。如果你更改了VM的卷,他将不能通过之前卷结构下所做快照来进行恢复。如果你想给这样一个VM附加卷,请先删除快照。如果打开端口后,你仍然不能使用SSH访问VM,那么可能是VM中没有启用SSH。这取决于当你创建VM的时候选的模板是否启用了SSH。通过CloudStack UI访问VM,然后使用VM操作系统中的命令行启用SSH。如果一个快照处理过程正在进行,那么点击这个按钮是没有反应的。如果用户通过一个没有安装Xen tools或者VMware Tools的模板部署虚机,然后在VM上安装了tools,之后用户可以使用updateVirtualMachine API告知CloudStack。在安装tools和更新虚拟机之后,请重启虚拟机。如果使用了弹性IP(与Netscaler负载均衡同时使用),初始分配给新VM的IP地址并没有标记为弹性的。用户必须将自动配置IP改为获得一个弹性IP,并在新IP与来宾VM的内网IP之间设置静态NAT映射。VM的原始IP地址随后会被释放到可用公共网络IPs池中。同样,你也可以在启用了EIP的基础zone中不为VM分配公网IP。关于弹性IP的更多信息,请参考`“关于弹性IP” <networking2.html#about-elastic-ip>`_。如果ISO镜像的操作系统类型没有被列出或者ISO是不可引导的,选择Other。如果VM的存储与VM必须一起被迁移,这点会在主机列表中标注。CloudStack会为你自动的进行存储迁移。如果网络中有外部防火墙设备,你需要创建一个防火墙策略来允许访问。请参考`“IP转发及防火墙” <networking2.html#ip-forwarding-and-firewalling>`_。如果你需要的ISO镜像对应的操作系统在列表中,请选择它。如果你正在升级旧版本的CloudStack,并且你还想让你的旧版本VMs拥有动态扩展和缩减能力,请使用以下步骤来升级VMs:如果你需要了解更多关于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>`_。在CloudStack中,你可以改变虚拟机的基础磁盘从一个模版换成其他模版,或从一个ISO换成其他ISO。(你不能把ISO变成模版或模版变成ISO。)在选择视图中,选择ISOs。利用CloudStack的VM卷快照功能,你可以对VM做快照像保存它的CPU/内存状态一样保护VM的数据卷(可选的)。这对快速还原一个VM来说是非常有用的。比如,你可以对一个VM做快照,然后做了一些像软件升级的操作。如果期间有问题出现,使用之前保存的VM快照就可以将VM恢复到之前的状态了。除了用户名和密码验证之外,出于额外的安全性考虑,CloudStack还支持使用SSH秘钥来登录到云架构。你可以使用createSSHKeyPair API来生成SSH秘钥。在添加ISO界面中,提供下列信息:在附加ISO对话框中,选择所需的ISO。在左侧的导航条,点击关联性组。在左侧导航栏,点击实例在左侧的导航栏,点击模板。在左侧的导航菜单中,点击实例。在快照列表中,点击你要操作的快照名字。安装需要的工具和驱动在每台VM上安装Xen tools(适用于XenServer主机)或者VMware Tools(适用于VMware主机)。实例名称 – 一个唯一的,不可变的由CloudStack生成的ID,此ID不能被用户修改。此名称符合 IETF RFC 1123中的要求。实例类型偏好设置。CloudStack管理员可以指定专门为某些特殊来宾实例做过优化的主机。比如,管理员指定为Windows来宾实例做过优化的主机。默认主机分配器会尝试将此类来宾实例运行到这些主机上。如果这些主机不够用,分配器会把实例运行在容量充足的物理机上。内部名称通常当你第一次部署VM的时候不太可能精确地预计CPU和RAM需求。你可能必须在VM的生命周期内的任何时间增加这些资源。你可以在不中断运行状态中的VM的情况下,动态的修改CPU和RAM级别来提升这些资源,、。不建议选择一个比操作系统镜像老的版本。例如,选择CentOS 5.4 去支持一个CentOS6.2的镜像通常导致不能工作。在这种情况下,去选择Other。局限性VM快照的限制使用用户或管理员登录到CloudStack用户界面。是用用户或者管理员登录CloudStack。使用管理员或者终端用户账号登录CloudStack UI。用管理员或用户账号登录CloudStack UI。使用SSH秘钥对登录确保区域级别设置enable.dynamic.scale.vm被设置为true。在CloudStack UI的左侧导航条,点击基础架构,然后点击区域,点击你要操作的区域,然后点击Settings标签。更改以下几项为所需要的:监视VMs的最大容量在主机之间移动VMs(手动在线迁移)vCenter中的名称名称 – 由DHCP服务器分配给VM的主机名。可以由用户设置。默认跟实例名称一致。名称。组的名称。通过之前描述的步骤定位至VM。在CloudStack 4.2安装完以后创建的新VMs都可以使用动态扩展和缩减功能。如果你的CloudStack是从旧版本升级而来的,其上已有的VMs不会支持动态扩展和缩减功能,除非你按照下面的过程来升级这些VM。否在提示失败和发生错误之前快照工作为了成功的做快照而等待的秒数。对于运行Linux 64位和Windows 7 32位操作系统的VMs,如果VM初始分配的RAM小于3GB,那么它最大能动态的扩展到3GB。这是因为这些操作系统已知的问题,如果尝试从小于3G动态扩展至超过3G的话,操作系统会宕机。一旦VM实例被创建,你可以根据需要停止、重启或删除它。在CloudStack UI里,点击实例,选择VM,然后使用停止、启动、重启和销毁按钮。一旦一个虚拟机被销毁,那么它就不能被恢复。该虚拟机使用的所有资源被系统回收。其中包括虚拟机的IP地址。Other PV提供一个名称和秒数。这些会显示在VM快照列表中。静止VM:如果你想在做快照之前让VM的文件系统处于静止状态,请勾选此选项。使用CloudStack提供的主存储的XenServer环境不受支持。Red Hat Enterprise Linux 5.3Red Hat Enterprise Linux 5.4Red Hat Enterprise Linux 5.5Red Hat Enterprise Linux 6重置SSH密钥在重启时重置虚拟机的Root卷重启VM。运行如下curl命令:当系统启动的时候运行脚本:保存文件。选择ISO启动,然后按照向导中的步骤进行操作。选择一个模板,然后按照向导中的步骤操作。更多关于如何上传模板的更多信息,请参考`*使用模板* <templates.html>`_。选择一个区域。选择你想修改的VM。选择你想应用到选择的VM的方案。点击停止按钮,将此VM关机。停止VM。停止实例。停止和启动VMs在你的云环境中,服务方案和安全组IDs(如果你使用安全组功能)可以替代模板。VMware上的系统VMs。参数-i是通知ssh客户端使用一个在~/.ssh/keypair-doc中找到的ssh秘钥。显示更改服务对话框。CloudStack管理员可以从一个主机将运行中的VM不中断服务地移动到其他主机或者将其进入维护模式。这个过程叫手动在线迁移,要满足以下条件:管理员应该监视每个集群中的虚拟机实例的总数,如果总量快达到hypervisor允许的最大虚拟机数量时,不再向此群集分配虚拟机。并且,要注意为主机预留一定的计算能力,以防止群集中有主机发生故障,因为发生故障的主机上的虚拟机需要重新部署在这些预留主机上。请咨询您所选择hypervisor的文档,了解此hypervisor能支持的最大虚拟机数量,并将此数值设置在CloudStack的全局设置里。监控每个群集里虚拟机的活跃程序,并将活跃虚拟机保持在一个安全线内。这样,CloudStack就能允许偶尔的主机故障。举个示例:如果集群里有N个主机,而你只能让其中任一主机的停机时间不超过特定时间。那么,你能在此集群部署的最多虚拟主机数量值为:(N-1) \* (每主机最大虚拟量数量限值)。一旦群集中的虚拟机达到此数量,必须在CloudStack的用户界面中禁止向此群集分配新的虚拟机。管理服务器将下载该ISO。根据ISO镜像的大小,下载过程可能会用很长时间。一旦该镜像已经被成功下载到辅助存储时ISO 状态栏将会显示Ready。点击刷新更新更新百分比。VM正在运行。停止的VMs不能进行在线迁移。VM必须开通相关端口以便外部访问。比如,在基础zone中,新的VM可能被关联到一个允许流量进入的安全组。但这取决于你在创建VM的时候选择的安全组。在其他情况下,你可以通过设置端口转发策略来打开一个端口。请参考 `“IP转发及防火墙” <networking2.html#ip-forwarding-and-firewalling>`_。云管理员可以使用全局配置变量来控制VM快照的行为。要设置这些变量,移步至CloudStack UI中的全局设置。默认的内部名称的格式是 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。这个功能可以比较容易的在大型数据中心的部署中表示实例名和内部名之间的相互关系。目标主机必须有足够的可用容量。如果没有,VM会一直停留在"迁移中"状态,直到有多余内存可用。下面的表格解释了不同场景下VM的名称是如何显示的。云中虚拟机能够保存快照的最大数。 (number of VMs) \* vmsnapshots.max是云中VM快照的总共可能数量。如果任何一个VM的快照数达到了最大值,那么快照删除任务会把最老的快照删掉。对于新的CPU和RAM大小必须在hypervisor和VM操作系统要求之内。输出的内容与下面所示的类似:root管理员已登录。域管理员和用户不能执行手动在线迁移操作。一个关联性组的作用域是针对每个用户账号的。快照的创建使用的是 hypervisor本地快照工具。VM快照不但包括数据卷还可选择性的包括VM的运行或关机时(CPU状态)和内存内容的状态。快照保存在CloudStack的主存储里。如果系统在三分钟内收不到hypervisor的心跳信号,那么它就会将虚机切换至down状态。如果虚机被标记上启用了HA,那么系统会自动地重启down状态中的虚机。用户能够手动从down状态下重启虚机。通过网络直接访问VM:通过CloudStack UI访问VM:要添加一个关联性组:要将一个新的VM分配给一个关联性组:要将已有的VM添加到关联性组:使用下面其中一个方法确认已经安装了Xen tools或VMware Tools:要改变熏鸡的基础镜像,通过虚拟机iD和新的模版ID调用restoreVirtualMachine API命令。模版ID参数可以参考模版或者ISO,取决于虚拟机正在使用的基础镜像类型(它必须匹配先前的镜像类型)。当这个调用生效时,虚拟机的根磁盘首先被摧毁,然后通过指定的模版ID参数创建根磁盘。新的根磁盘会附件到虚拟机中,现在虚拟机已经基于新的模版了。要配置此功能,请使用下面的全局配置变量:从模板创建一个VM。从ISO创建虚拟机:是用CloudStack UI创建一个VM快照:要删除一个快照或者还原VM的状态到指定的一个快照:要删除虚拟机:要删除关联性组:要删除快照,点击删除按钮。 |delete-button.png|为了添加额外的操作系统或者给来宾VMs使用其它软件,你可以添加ISO。操作系统镜像被认为是最典型的ISO,但是你也能添加软件类型的ISOs,例如你想把安装的桌面应用作为模板的一部分。手动在线迁移一个虚拟机要修改虚拟机的CPU和/或RAM,你必须更改VM的计算方案为你想要的。你可以按照上文中所述的同样的步骤 `“Changing the Service Offering for a VM” <#changing-the-service-offering-for-a-vm>`_,但是要跳过停止虚拟机的步骤。当然,你可能必须先创建一个新的计算方案。要还原至此快照,点击还原按钮。 |revert-vm.png|要查看当前哪些VMs被分配到指定的关联性组:测试你的SSH秘钥的生成是否成功,需要检查是否能够登录到云中。要给虚拟机提升或降低可用计算资源的级别,你可以更改VM的计算方案。TrueUUID升级已有VMs运行VMware和XenServer的主机上的用户VMs。用户提供的显示名用户可以删除他们拥有的虚拟机。在删除运行中的虚拟机之前,虚拟机会被强制停止。管理员可以删除任何虚拟机。未验证使用SSH秘钥是用VM的快照虚拟机的生命周期当VM被销毁了,那么它的快照也会被自动的删除。这种情况下,你不用手动的去删除快照。VM快照存在父/子关系。同一个VM的每次快照都是之前快照的子级。每次你对同一VM追加的快照,它仅仅保存两次快照之间系统状态差异。之前的快照变成父级,新的快照变成子级。它可能对这些父/子快照创建一个长链,它实际上是一个从当前的VM状态还原到之前的"还原"记录。如果你更改了VM的服务方案,那么包含了数据卷和内存的VM快照就不能保留了,任何已有的此类型的VM快照都将被丢弃。虚拟机上必须安装VMware Tools或者XenServer Tools。纵向和横向定位。纵向定位是指,在消耗完当前主机提供的所有资源的时候会将所有来宾虚机定位到第二台主机上。这会云中的节省电力成本。横向定位在每个主机上使用轮询的方式放置来宾虚机。在某些情况下这样会给来宾虚机带来更好的性能。查看关联性组的成员虚拟机快照虚拟机通常是从模板创建的。用户也能创建空白虚拟机。空白虚拟机就是一个重新安装的操作系统。用户可以通过CD/DVD-ROM加载ISO文件安装。虚拟机可能处于下列状态:当注册一个新的模板时,管理员或者用户可以标示出哪个在模板上安装了tools。这可以通过UI或者使用updateTemplate API来做;或者,当为VMware上运行的Linux VM扩展内存或者CPU的时候,你可能需要运行额外的脚本。更多信息,请参阅VMware知识库中的 `在Linux中热添加内存 (1012764) <http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012764>`_当这个选项在CloudStack提供的主存储中使用了,那么静止操作是由底层的hypervisor完成的(VMware支持)。当使用了其他主存储提供商的插件,静止操作是由其提供商的软件完成的,当你提交一个动态伸缩的请求的时候,当前主机可能会扩展资源。如果主机没有足够的资源,VM会被在线迁移至同一群集中的其他主机。如果群集中没有能满足CPU和RAM条件的主机,那么扩展操作会失败。不用担心,VM会往常一样继续运行。通过API命令resetSSHKeyForVirtualMachine,用户可以设置或者重设分配给虚拟机的SSH秘钥对。可以更改丢失或被盗用的SSH密钥对,并且用户可以使用新的秘钥对来访问VM。只要创建或注册新的密钥对然后调用resetSSHKeyForVirtualMachine。使用ISOs使用虚拟机是你同样可以在调用restoreVirtualMachine时忽略模版ID参数。在这个情况下,虚拟机的根磁盘被摧毁并重新创建。但相同的模版或ISO已经被该虚拟机使用。你能把来宾VM的显示名附加到它的内部名称上。更多信息,请参考 `“将显示名附加到VM的内部名称” <#appending-a-display-name-to-the-guest-vms-internal-name>`_.你可以创建一个VM,但不要启动它。你来决定此VM是否需要作为VM部署的一部分而启动。在deployVm API里面提供了一个startVM参数,提供了这个功能。更多信息,请参考开发者指导。你不能为XenServer上运行的系统VMs进行动态伸缩操作。你不能同时对VM在做卷快照和VM快照。这时候你不能通过使用 GUI来创建实例,要使用新创建的SSH秘钥对来关联实例。你必须给createSSHKeyPair api方法做一个调用。你可以使用CloudStack Python API 库或curl 命令给CloudStack API做调用。你只能使用CloudStack来创建其管理的主机上的VM快照。你在hypervisor上直接创建的任何快照都不能被CloudStack识别。enable.dynamic.scale.vm:设置为True以启用此功能。默认情况下,此功能是被关闭的。i-<user\_id>-<vm\_id>-<instance.name>i-<user\_id>-<vm\_id>-displayNamescale.retry:伸缩操作的重试次数。默认为2。vm.instancename.flagvmsnapshot.create.waitvmsnapshots.max|basic-deployment.png|