有关 Windows 虚拟机的常见问题Frequently asked question about Windows Virtual Machines

本文讨论了在 Azure 中使用 Resource Manager 部署模型创建的 Windows 虚拟机的一些常见问题。This article addresses some common questions about Windows virtual machines created in Azure using the Resource Manager deployment model. 有关本主题的 Linux 版本,请参阅有关 Linux 虚拟机的常见问题For the Linux version of this topic, see Frequently asked question about Linux Virtual Machines.

我可以在 Azure VM 上运行什么程序?What can I run on an Azure VM?

所有订户都可以在 Azure 虚拟机上运行服务器软件。All subscribers can run server software on an Azure virtual machine. 有关在 Azure 中运行 Microsoft 服务器软件的支持策略的信息,请参阅 Microsoft 服务器软件对 Azure 虚拟机的支持For information about the support policy for running Microsoft server software in Azure, see Microsoft server software support for Azure Virtual Machines.

某些版本的 Windows 10 可供标准预付费套餐订户及以上用户使用。Certain versions of Windows 10 are available to Standard Pay-in-Advance Offer subscribers and above.

使用虚拟机时,我可以使用多少存储?How much storage can I use with a virtual machine?

每个数据磁盘的容量高达 32,767 GiB。Each data disk can be up to 32,767 GiB. 可以使用的数据磁盘数取决于虚拟机大小。The number of data disks you can use depends on the size of the virtual machine. 有关详细信息,请参阅虚拟机大小For details, see Sizes for Virtual Machines.

Azure 托管磁盘是推荐用于 Azure 虚拟机的磁盘存储产品,方便永久存储数据。Azure Managed Disks are the recommended disk storage offerings for use with Azure Virtual Machines for persistent storage of data. 可对每个虚拟机使用多个托管磁盘。You can use multiple Managed Disks with each Virtual Machine. 托管磁盘提供两种类型的持久存储选项:高级和标准托管磁盘。Managed Disks offer two types of durable storage options: Premium and Standard Managed Disks. 有关定价信息,请参阅托管磁盘定价For pricing information, see Managed Disks Pricing.

Azure 存储帐户还可为操作系统磁盘和任何数据磁盘提供存储空间。Azure storage accounts can also provide storage for the operating system disk and any data disks. 每个磁盘都是一个 .vhd 文件,以页 blob 形式存储。Each disk is a .vhd file stored as a page blob. 有关定价详细信息,请参阅 Storage Pricing Details(存储定价详细信息)。For pricing details, see Storage Pricing Details.

如何访问我的虚拟机?How can I access my virtual machine?

使用适用于 Windows VM 的远程桌面连接 (RDP) 建立远程连接。Establish a remote connection using Remote Desktop Connection (RDP) for a Windows VM. 有关说明,请参阅如何连接并登录到运行 Windows 的 Azure 虚拟机For instructions, see How to connect and sign on to an Azure virtual machine running Windows. 除非将服务器配置为远程桌面服务会话主机,否则最多支持两个并发连接。A maximum of two concurrent connections are supported, unless the server is configured as a Remote Desktop Services session host.

如果在使用远程桌面时遇到问题,请参阅排查连接到基于 Windows 的 Azure 虚拟机时的远程桌面连接问题If you're having problems with Remote Desktop, see Troubleshoot Remote Desktop connections to a Windows-based Azure Virtual Machine.

如果熟悉 Hyper-V,可以查找与 VMConnect 类似的工具。If you're familiar with Hyper-V, you might be looking for a tool similar to VMConnect. Azure 不提供类似工具,因为不支持通过控制台访问虚拟机。Azure doesn't offer a similar tool because console access to a virtual machine isn't supported.

我是否可以使用临时磁盘(默认为 D: 驱动器)存储数据?Can I use the temporary disk (the D: drive by default) to store data?

不要使用临时磁盘来存储数据。Don't use the temporary disk to store data. 它只是临时存储空间,因此存在丢失数据且数据不能恢复的风险。It is only temporary storage, so you would risk losing data that can't be recovered. 将虚拟机移到另一主机时,可能会发生数据丢失的情况。Data loss can occur when the virtual machine moves to a different host. 调整虚拟机大小、更新主机、主机硬件故障等都是需要移动虚拟机的原因。Resizing a virtual machine, updating the host, or a hardware failure on the host are some of the reasons a virtual machine might move.

如果有应用程序需要使用 D: 驱动器号,可以重新分配驱动器号以便临时磁盘使用除 D: 以外的位置。If you have an application that needs to use the D: drive letter, you can reassign drive letters so that the temporary disk uses something other than D:. 有关说明,请参阅更改 Windows 临时磁盘的驱动器号For instructions, see Change the drive letter of the Windows temporary disk.

如何更改临时磁盘的驱动器号?How can I change the drive letter of the temporary disk?

可以通过移动页面文件和重新分配驱动器号来更改驱动器号,但需确保按特定顺序执行这些步骤。You can change the drive letter by moving the page file and reassigning drive letters, but you need to make sure you do the steps in a specific order. 有关说明,请参阅更改 Windows 临时磁盘的驱动器号For instructions, see Change the drive letter of the Windows temporary disk.

我是否可以将现有 VM 添加到可用性集?Can I add an existing VM to an availability set?

否。No. 不可以。如果希望 VM 成为可用性集的一部分,需要在该集内创建 VM。If you want your VM to be part of an availability set, you need to create the VM within the set. 目前不支持在创建 VM 之后再将其添加到可用性集。There currently isn't a way to add a VM to an availability set after it has been created.

可否将虚拟机上传到 Azure?Can I upload a virtual machine to Azure?

是的。Yes. 有关说明,请参阅将本地 VM 迁移到 AzureFor instructions, see Migrating on-premises VMs to Azure.

可否调整 OS 磁盘的大小?Can I resize the OS disk?

是的。Yes. 有关说明,请参阅 How to expand the OS drive of a Virtual Machine in an Azure Resource Group(如何扩展 Azure 资源组中虚拟机的 OS 驱动器)。For instructions, see How to expand the OS drive of a Virtual Machine in an Azure Resource Group.

可否复制或克隆现有的 Azure VM?Can I copy or clone an existing Azure VM?

是的。Yes. 借助托管映像,可创建虚拟机的映像,然后使用该映像生成多个新的 VM。Using managed images, you can create an image of a virtual machine and then use the image to build multiple new VMs. 有关说明,请参阅创建 VM 的自定义映像For instructions, see Create a custom image of a VM.

为什么在 Azure Resource Manager 中看不到加拿大中部和加拿大东部区域?Why am I not seeing Canada Central and Canada East regions through Azure Resource Manager?

针对现有 Azure 订阅创建的虚拟机不会自动注册到加拿大中部和加拿大东部这两个新区域。The two new regions of Canada Central and Canada East are not automatically registered for virtual machine creation for existing Azure subscriptions. 通过 Azure 门户使用 Azure Resource Manager 将虚拟机部署到其他任何区域时,将自动完成此注册。This registration is done automatically when a virtual machine is deployed through the Azure portal to any other region using Azure Resource Manager. 将虚拟机部署到其他任何 Azure 区域后,新区域可供后续虚拟机使用。After a virtual machine is deployed to any other Azure region, the new regions should be available for subsequent virtual machines.

Azure 是否支持 Linux VM?Does Azure support Linux VMs?

是的。Yes. 若要快速创建 Linux VM 进行试用,请参阅使用门户在 Azure 上创建 Linux VMTo quickly create a Linux VM to try out, see Create a Linux VM on Azure using the Portal.

创建 VM 后能否向 VM 添加 NIC?Can I add a NIC to my VM after it's created?

能,目前可行。Yes, this is now possible. 首先需停止解除分配 VM。The VM first needs to be stopped deallocated. 然后便可添加或删除 NIC(除非它是 VM 上的最后一个 NIC)。Then you can add or remove a NIC (unless it's the last NIC on the VM).

是否有任何计算机名称要求?Are there any computer name requirements?

是的。Yes. 计算机名称的最大长度为 15 个字符。The computer name can be a maximum of 15 characters in length.

是否存在资源组名称要求?Are there any resource group name requirements?

是的。Yes. 资源组名称的最大长度为 90 个字符。The resource group name can be a maximum of 90 characters in length.

创建 VM 时,用户名有什么要求?What are the username requirements when creating a VM?

用户名最长为 20 个字符,不能以句点(“.”)结尾。Usernames can be a maximum of 20 characters in length and cannot end in a period (".").

不允许使用以下用户名:The following usernames are not allowed:

administrator admin user user1
test user2 test1 user3
admin1 1 123 a
actuser adm admin2 aspnet
backup console david guest
john owner root server
sql support support_388945a0 sys
test2 test3 user4 user5
video

创建 VM 时,密码有什么要求?What are the password requirements when creating a VM?

根据所使用的工具,有不同的密码长度要求:There are varying password length requirements, depending on the tool you are using:

  • 门户 - 12 到 72 个字符之间Portal - between 12 - 72 characters
  • PowerShell - 8 到 123 个字符之间PowerShell - between 8 - 123 characters
  • CLI - 12 到 123 个字符之间CLI - between 12 - 123
  • 具有小写字符Have lower characters
  • 具有大写字符Have upper characters
  • 具有数字Have a digit
  • 具有特殊字符(正则表达式匹配 [\W_])Have a special character (Regex match [\W_])

不允许使用以下密码:The following passwords are not allowed:

abc@123 iloveyou!iloveyou! P@$$w0rdP@$$w0rd P@ssw0rd P@ssword123
Pa$$wordPa$$word pass@word1 Password!Password! Password1Password1 Password22Password22