摘要 |
<p>Embodiments of the present invention provide a method and an apparatus for allocating a virtual machine. The method includes: acquiring configuration information of application software, where the configuration information includes multiple virtual machine types available for the application software and priorities of the virtual machine types; and preferentially allocating a virtual machine corresponding to a virtual machine type with a high priority to the application software according to the priorities of the virtual machine types in the configuration information, so that the application software runs on the virtual machine. According to the technical solutions provided by the embodiments of the present invention, a virtual machine corresponding to a virtual machine type with a high priority can be preferentially allocated to application software based on priorities of virtual machine types available for the application software in configuration information of the application software, thereby improving the running effect of the application software.</p> |