- Artigo
- 7 minutos para o fim da leitura
Aplica-se a: ✔️ VMs do Linux ✔️ VMs do Windows ✔️ Conjuntos de dimensionamento flexíveis ✔️ Conjuntos de dimensionamento uniformes
O uso de Máquinas Virtuais de Spot do Azure permite aproveitar a capacidade não usada com uma economia de custos significativa. A qualquer momento que o Azure precisar da capacidade de volta, a infraestrutura do Azure removerá as Máquinas Virtuais de Spot do Azure. Portanto, as Máquinas Virtuais de Spot do Azure são ótimas para cargas de trabalho que podem lidar com interrupções, como trabalhos de processamento em lotes, ambientes de desenvolvimento/teste, grandes cargas de trabalho de computação, entre outros.
A quantidade de capacidade disponível pode variar com base no tamanho, região, hora do dia e etc. Quando você implantar Máquinas Virtuais de Spot do Azure, o Azure alocará as VMs se houver capacidade disponível, mas não há um SLA para essas VMs. Uma Máquina Virtual de Spot do Azure não oferece garantias de alta disponibilidade. Quando o Azure precisar da capacidade novamente, a infraestrutura do Azure removerá as Máquinas Virtuais de Spot do Azure enviando um aviso com 30 segundos de antecedência.
Política de remoção
As VMs podem ser removidas com base na capacidade ou no preço máximo definido. Ao criar uma Máquina Virtual de Spot do Azure, você pode definir a política de remoção como Desalocar (padrão) ou Excluir.
A política Deslocar move a VM para o estado de parado desalocada, permitindo que você reimplante-a posteriormente. No entanto, não há nenhuma garantia de que a alocação terá êxito. As VMs deslocadas afetarão sua cota e você será cobrado pelos custos de armazenamento dos discos subjacentes.
Se quiser que a VM seja excluída quando removida, defina a política de remoção como excluir. As VMs removidas são excluídas junto com os respectivos discos subjacentes e, portanto, você não continuará sendo cobrado pelo armazenamento.
Você pode aceitar receber notificações na VM por meio dos Eventos Agendados do Azure. Isso notificará você se suas VMs estiverem sendo removidas e você terá 30 segundos para concluir todos os trabalhos e realizar tarefas de desligamento antes da remoção.
Opção | Resultado |
---|---|
O preço máximo é definido como >= o preço atual. | A VM será implantada se a capacidade e a cota estiverem disponíveis. |
O preço máximo é definido como <= o preço atual. | A VM não está implantada. Você receberá uma mensagem de erro informando que o preço máximo precisa ser >= que o preço atual. |
Reiniciar uma VM parada/desalocada se o preço máximo for >= o preço atual | Se houver capacidade e cota, a VM será implantada. |
Reiniciar uma VM parada/desalocada se o preço máximo for < o preço atual | Você receberá uma mensagem de erro informando que o preço máximo precisa ser >= que o preço atual. |
O preço da VM subiu e agora está > o preço máximo. | A VM é removida. Você obtém uma notificação de 30s antes da remoção real. |
Após a remoção, o preço da VM volta a ser < que o preço máximo. | A VM não será reiniciada automaticamente. Você pode reiniciar a VM por conta própria e ela será cobrada com o preço atual. |
Se o preço máximo for definido como -1 | A VM não será removida por motivos de preço. O preço máximo será o preço atual, até o preço das VMs padrão. Você nunca será cobrado acima do preço padrão. |
Alteração do preço máximo | Você precisa desalocar a VM para alterar o preço máximo. Desaloque a VM, defina um novo preço máximo e, em seguida, atualize a VM. |
Dica
Confira nosso guia de Remoção de Spot de Máquina Virtual do Azure para saber como criar uma carga de trabalho confiável e parável no Azure.
Limitações
Não há suporte para os seguintes tamanhos de VM para Máquinas Virtuais de Spot do Azure:
- Série B
- Versões promocionais de qualquer tamanho (como Dv2, NV, NC, tamanhos promocionais de H)
As Máquinas Virtuais de Spot do Azure podem ser implantadas em qualquer região, exceto Microsoft Azure China 21Vianet.
No momento, há suporte para os seguintes tipos de oferta:
- Contrato Enterprise
- Código de oferta pago conforme o uso (003P)
- Patrocinado (0036P e 0136P)
- Para o provedor de serviços de nuvem (CSP), consulte a Central de Parceiros ou contate seu parceiro diretamente.
Preços
O preço para as Máquinas Virtuais de Spot é variável, com base na região e SKU. Para obter mais informações, confira os preços de VM para Linux e Windows.
Você também pode consultar informações de preços usando a API de preços de varejo do Azure para consultar informações sobre preços de Spot. Tanto meterName
quanto skuName
conterão Spot
.
Como o preço é variável, você tem a opção de definir um preço máximo, em dólares americanos (USD), usando até cinco casas decimais. Por exemplo, o valor 0.98765
seria um preço máximo de $0,98765 USD por hora. Se você definir o preço máximo como -1
, a VM não será removida com base no preço. O preço da VM será o preço atual do Spot ou o preço de uma VM padrão, o que for menor, desde que haja capacidade e cota disponíveis.
Histórico de preços e remoções
Portal
Você pode ver o histórico de taxas de preços e remoções por tamanho em uma região no portal enquanto está criando a VM. Após marcar a caixa de seleção para Executar com o desconto de Spot do Azure, aparecerá um link sob a seleção de tamanho da VM intitulado Exibir histórico de preços e comparar preços em regiões próximas. Ao selecionar esse link, você poderá ver uma tabela ou grafo de preços de spot para o tamanho da VM especificado. As taxas de preço e remoção nas imagens a seguir são apenas exemplos.
Gráfico:
Tabela:
Gráfico de Recursos do Azure
Você pode acessar programaticamente dados relevantes de SKU da VM spot por meio do Azure Resource Graph. Obtenha histórico de preços nos últimos 90 dias e taxas de remoção nos últimos 28 dias para identificar SKUs que melhor atendam às suas necessidades específicas.
Principais benefícios:
- Consultar as taxas de remoção de spot e os últimos meses de preços de spot programaticamente por meio do ARM ou do ARG Explorer no portal do Azure
- Criar uma consulta personalizada para extrair os dados específicos relevantes ao seu cenário com a capacidade de filtrar em uma variedade de parâmetros, como SKU e região
- Comparar dados facilmente entre várias regiões e SKUs
- Encontrar uma SKU ou região de spot diferente com um preço e/ou uma taxa de remoção mais baixa
Experimente as consultas de exemplo a seguir para o histórico de preços e as taxas de remoção de spot usando o ARG Explorer no portal do Azure. O histórico de preços de spot e os dados de taxas de remoção estão disponíveis na tabela SpotResources
.
Consulta de exemplo de histórico de preços de spot:
SpotResources | where type =~ 'microsoft.compute/skuspotpricehistory/ostype/location' | where sku.name in~ ('standard_d2s_v4', 'standard_d4s_v4') | where properties.osType =~ 'linux' | where location in~ ('eastus', 'southcentralus') | project skuName = tostring(sku.name), osType = tostring(properties.osType), location, latestSpotPriceUSD = todouble(properties.spotPrices[0].priceUSD) | order by latestSpotPriceUSD asc
Consulta de exemplo de taxas de remoção de spot:
SpotResources | where type =~ 'microsoft.compute/skuspotevictionrate/location' | where sku.name in~ ('standard_d2s_v4', 'standard_d4s_v4') | where location in~ ('eastus', 'southcentralus') | project skuName = tostring(sku.name), location, spotEvictionRate = tostring(properties.evictionRate) | order by skuName asc, location asc
Como alternativa, experimente a API REST do ARG para obter o histórico de preços e os dados do histórico de taxas de remoção.
Perguntas frequentes
P: Uma vez criada, uma Máquina Virtual de Spot do Azure é igual à VM normal padrão?
R: Sim, exceto que não há um SLA para Máquinas Virtuais de Spot do Azure e elas podem ser removidas a qualquer momento.
P: O que fazer quando você é removido, mas ainda precisa de capacidade?
R: Recomendamos que você use VMs padrão em vez de Máquinas Virtuais de Spot do Azure se precisar de capacidade imediatamente.
P: Como a cota é gerenciada para Máquinas Virtuais de Spot do Azure?
R: As Máquinas Virtuais de Spot do Azure terão um pool de cotas separado. A cota do Spot será compartilhada entre as VMs e as instâncias do conjunto de dimensionamento. Para saber mais, confira Assinatura e limites de serviço, cotas e restrições do Azure.
P: Posso solicitar cota adicional para Máquinas Virtuais de Spot do Azure?
R: Sim, você poderá enviar a solicitação para aumentar a cota das Máquinas Virtuais de Spot do Azure por meio do processo de solicitação de cota padrão.
P: Onde posso postar perguntas?
R: Você pode postar e marcar sua pergunta com azure-spot
em Perguntas e respostas.
P: Como posso alterar o preço máximo de uma VM spot?
R: Para poder alterar o preço máximo, você precisa desalocar a VM. Em seguida, você pode alterar o preço máximo no portal, na seção Configuração da VM.
Próximas etapas
Use a CLI, o portal, o modelo do ARM ou o PowerShell para implantar Máquinas Virtuais de Spot do Azure.
Você também pode implantar um conjunto de dimensionamento com instâncias de Máquina Virtual de Spot do Azure.
Se você encontrar um erro, confira Códigos de erro.
FAQs
What are spot virtual machines in Azure? ›
With Spot Virtual Machines, provision unused Azure compute capacity at deep discounts of up to 90 percent compared to pay-as-you-go prices. * Pay only up to the maximum price that you set in advance (optional).
How many number of virtual machines can we scale upto on Azure *? ›How many VMs can I have in a scale set? A scale set can have 0 to 1,000 virtual machines (VMs) based on platform images, or 0 to 600 VMs based on custom images.
What is the purpose of deploying an Azure VM as a spot instance? ›Optimise costs with Spot Virtual Machines
If your workload can tolerate interruptions and its execution time is flexible, using Spot Virtual Machines can significantly reduce the cost of running your workload in Azure. Run your workloads on Azure VMs or VM scale sets.
Only virtual machines that are supported by Azure can be protected by Zerto. All Windows operating systems are supported.
What are spot instances good for? ›You can use Spot Instances for various fault-tolerant and flexible applications. Examples include stateless web servers, API endpoints, big data and analytics applications, containerized workloads, CI/CD high performance and high throughput computing (HPC/HTC), rendering workloads, and other flexible workloads.
What is the purpose of spot instances? ›A Spot Instance is an instance that uses spare EC2 capacity that is available for less than the On-Demand price. Because Spot Instances enable you to request unused EC2 instances at steep discounts, you can lower your Amazon EC2 costs significantly. The hourly price for a Spot Instance is called a Spot price.
What is the limit of virtual machines? ›VM & Host Limits | 2008 R2 | 2016 |
---|---|---|
Virtual Machines per Host | 384 | 1024/Host |
Virtual Machine in a Cluster | 1,000 | |
Running virtual machines per server | 384 | 1024 |
Virtual processors per logical processor | 1:8 for Server's |
Scale sets support up to 1,000 VM instances for standard marketplace images and custom images through the Azure Compute Gallery (formerly known as Shared Image Gallery). If you create a scale set using a managed image, the limit is 600 VM instances.
What is the maximum number of virtual machines a cloud service can contain 500? ›Ques: How many virtual machines can be deployed into a cloud service? Each cloud service can contain up to 50 virtual machines.
What are the major advantages of deploying virtual machine? ›- Lower hardware costs. Many organizations don't fully utilize their hardware resources. ...
- Quicker Desktop Provisioning and Deployment. Deploying a new physical server often takes numerous time-consuming steps. ...
- Smaller Footprint. ...
- Enhanced Data Security. ...
- Portability. ...
- Improved IT Efficiency.
What advantage does a spot VM provide over a regularly provisioned VM? ›
Using Azure Spot Virtual Machines allows you to take advantage of our unused capacity at a significant cost savings. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Azure Spot Virtual Machines.
What are some benefits of using a virtual machine on Azure? ›An Azure virtual machine gives you the flexibility of virtualization without having to buy and maintain the physical hardware that runs it. However, you still need to maintain the virtual machine by performing tasks, such as configuring, patching, and installing the software that runs on it.
Which two Windows Server features are not supported on Azure virtual machines? ›The following significant features are not supported: BitLocker Drive Encryption (on the operating system hard disk, may be used on data disks) Internet Storage Name Server. Multipath I/O.
Which Azure service can you use to make sure your virtual machines are running smoothly and without problems? ›Which Azure service can you use to make sure your virtual machines are running smoothly and without problems? Azure Monitor, Azure Monitor collects and analyzes telemetry data from your virtual machines to provide your with alerts and recommendations for how they are running.
What is the difference between Azure VM and Windows virtual desktop? ›When looking at VDI vs VM, their difference is that a VM is a virtualized computing environment functioning as a traditional physical computer with its own CPU, memory, storage, and network interface whilst VDI, on the other hand, leverages VMs to provision and manage virtual desktops and applications.
What are spot Instances disadvantages? ›Spot Instances: Pros and Cons
This can lead to significant savings when it comes to your EC2 infrastructure expenses. Con: Spot Instances can get terminated: AWS can terminate your Spot Instances with a 2-minute termination warning. This requires that the applications using Spot Instances need to fault-tolerant.
Defined duration—you can get a spot instance guaranteed to run for a period of 1-6 hours. The longer the defined duration, the lower the discount provided for the spot instance.
How much cheaper are spot Instances? ›Spot Instances are available at up to a 90% discount compared to On-Demand prices. You can use Spot Instances for various stateless, fault-tolerant, or flexible applications such as big data, containerized workloads, CI/CD, web servers, high-performance computing (HPC), and test & development workloads.
What is the recommended strategy for spot instances? ›We recommend using the price-capacity-optimized strategy because this strategy automatically provisions instances from the most-available Spot Instance pools that also have the lowest possible price.
How do I choose a spot instance? ›Click on “Request Spot Instances” and proceed through the Launch Instance Wizard process, choosing an AMI and instance type. Enter the number of Spot Instances you would like to request, your maximum price and whether the request is persistent or not.
How do I know if an instance is a spot? ›
You can identify a Spot Instance from the spot value in the Instance lifecycle column. The Instance state column indicates whether the instance is pending , running , stopping , stopped , shutting-down , or terminated . For a hibernated Spot Instance, the instance state is stopped .
What are the minimum requirements for a virtual machine? ›- RAM: 16 GB.
- Disk space: 400 GB.
- CPU cores: 6.
- Processor speed: 2.3 GHz or more. Comparable to an Intel Xeon E-2276G processor, or to an AMD Opteron 1352 processor.
A good starting point is to allocate 1GB for 32-bit Windows 7 or later desktops and 2GB for 64-bit Windows 7 or later desktops. If you want to use one of the hardware accelerated graphics features for 3D workloads, VMware recommends 2 virtual CPUs and 4GB of RAM.
How many processors should I give my virtual machine? ›As long as you don't have any other physical processor in your system, do not assign more than 1 processor to your virtual machine. You can assign more or fewer cores to your guest os, depending on your needs, but you shouldn't assign a value higher than your hyperthreading cores.
How many virtual machines can I run on 8GB RAM? ›DS1517+ (8GB) can run 1 virtual machine with the same specifications as Virtual Machine C. For the second one, the NAS is short of 2944 MB (6656 MB - 4800 MB x 2 = - 2944 MB).
How many VMs per host is too many? ›More than three VMs per core causes scheduling overhead, among other issues. This doesn't mean paltry consolidation numbers, however. A high-end server using a 15-core Intel Xeon E7 processor yields 60 available cores. Ideally, it could host 180 VMs.
How much RAM do I need to run multiple virtual machines? ›You can run 3 or 4 basic virtual machines on a host that has 4GB of RAM, though you'll need more resources for more virtual machines. On the other end of the spectrum, you can also create large virtual machines with 32 processors and 512GB RAM, depending on your physical hardware.
What is the highest number of virtual machine? ›The limit on the number of VMs in a single scale set can be increased to 300. Note that when deploying VMs using Availability Sets the maximum limit is at 200 VMs per Availability Set.
What is the maximum number of VMs you can create during the setup process of a host pool? ›The setup process can create up to 400 VMs while setting up your host pool, and each VM setup process creates four objects in your resource group.
What is the maximum number of application VMs that you can host on one of your new servers? ›Max 100 VMs per Host.
What are 3 major benefits of using virtualization? ›
- Reduced capital and operating costs.
- Minimized or eliminated downtime.
- Increased IT productivity, efficiency, agility and responsiveness.
- Faster provisioning of applications and resources.
With the use of virtual machine solutions, accessibility, sharing, backup, and recovery of data becomes easy, hence offering flexibility and mobility in business operations. This not only adds to the collaboration advantage and increased productivity but also helps in maintaining business continuity.
What are three benefits of virtual machines? ›- Personalization: There is great flexibility and personalization with virtual machines. ...
- Virtualization: ...
- Backup by VM at a time: ...
- Easy Recover/Failover: ...
- Run multiple Operating Systems: ...
- OS and Application Updates: ...
- The Bottom Line:
Spot instances are up to 90% cheaper than On-Demand instances, which can significantly reduce your EC2 costs. A Spot Price is the hourly rate for a Spot instance. AWS sets the Spot price for each instance type in each availability zone based on the evolving supply and demand for Spot instances.
Are spot instances cheaper than reserved instances? ›While it's been proven that even Reserved EC2 instances are cheaper than their On-Demand counterparts, it turns out Spot Instances are additionally capable of pushing their discounts beyond the reach of the Reserved Instances.
When should I use Azure virtual machine? ›An Azure virtual machine is an on-demand, scalable computer resource that is available in Azure. Virtual machines are generally used to host applications when the customer requires more control over the computing environment than what is offered by other compute resources.
What are the advantages and disadvantages of virtual? ›Advantages | Disadvantages |
---|---|
Cost Savings | Lack of Trust |
Increased Productivity | Reduced Team Collaboration |
No Unnecessary Meetings | Social Isolation |
Healthy Work-Life Balance | Hidden Technological Costs |
Virtual machines are easy to manage and maintain, and they offer several advantages over physical machines: VMs can run multiple operating system environments on a single physical computer, saving physical space, time and management costs.
Which two options can you use to connect Azure Virtual Network? ›- Route via the Internet.
- VNet peering.
- Site-to-site VPN.
Host pool outbound access to Azure Virtual Desktop
You'll need to create an Azure Firewall Policy and create Rule Collections for Network Rules and Applications Rules.
What types of VPN are compatible with Azure? ›
- Secure Socket Tunneling Protocol (SSTP). SSTP is a Microsoft proprietary SSL-based solution that can penetrate firewalls since most firewalls open the outbound TCP port that 443 SSL uses.
- OpenVPN. ...
- IKEv2 VPN.
Select the correct VM series – the first place to start is to make sure you have selected the most appropriate VM series for your workload type. This is not simply a matter of picking a series that has the amount of vCPU cores and RAM that you require and sits within your price range.
How do I monitor my Azure VM performance? ›- In the Azure portal, select Virtual Machines.
- From the list, choose a VM and in the Monitoring section choose Insights.
- Select the Performance tab.
If you are using shared storage services such as Azure Files it also means that you need to understand the performance is linked to the size of the share. So, if you have applications or other services that are dependent on a shared folder, and you haven't properly sized the share you will get crappy performance.
Which virtual machine is best for Windows? ›- 👍 Virtualization Manager.
- 👍 VM Monitor.
- VMware Fusion (Mac)
- VMware Workstation Player.
- Parallels.
- Hyper-V.
- VirtualBox.
- QEMU.
There are three main types of desktop virtualization: virtual desktop infrastructure (VDI), Remote Desktop Services (RDS) -- formerly, Terminal Services -- and desktop as a service (DaaS).
What is Azure spot instance in Azure? ›Azure has Spot Instances to help users cheaply access unused cloud capacity. These Spot Instances are also known as Azure Spot Virtual Machines (VMs). Azure Spot Virtual Machines are highly volatile and commonly used for fault-tolerant workloads.
What are the types of virtual machines in Azure? ›- General purpose VMs. ...
- Compute optimized VMs. ...
- Memory optimized VMs. ...
- Storage optimized VMs. ...
- VMs for Graphics Processing (GPUs) ...
- High performance compute.
Users can choose from two different types of virtual machines—process VMs and system VMs: A process virtual machine allows a single process to run as an application on a host machine, providing a platform-independent programming environment by masking the information of the underlying hardware or operating system.
How do I make a spot VM in Azure? ›Create the VM
When you are deploying a VM, you can choose to use an Azure spot instance. On the Basics tab, in the Instance details section, No is the default for using an Azure spot instance. If you select Yes, the section expands and you can choose your eviction type and eviction policy.
How Azure spot instances work? ›
With Spot VMs, customers can bid on spare capacity, and set the price they are willing to pay for compute. Prices for an Azure Spot VM fluctuates based on demand and availability, and varies based on the capacity for size or SKU in an Azure region.
How do I use spot instances in Azure? ›- decide a maximum price, the machine is evicted when the spot price is greater than the maximum price;
- choose capacity only, the machine is evicted when Azure needs capacity. In other words, your maximum price for the spot VM is the current price of the regular VM;
Defined duration—you can get a spot instance guaranteed to run for a period of 1-6 hours. The longer the defined duration, the lower the discount provided for the spot instance.
What are the 3 types of virtualization? ›There are three main types of server virtualization: full-virtualization, para-virtualization, and OS-level virtualization.
What are the 2 main components of virtual machine? ›...
The host VM is the physical machine that provides the guest VM with computing hardware resources, such as:
- Processing power.
- Memory.
- Disk.
- Network I/O (input/output)
- Network virtualization. Network virtualization takes the available resources on a network and breaks the bandwidth into discrete channels. ...
- Storage virtualization. ...
- Desktop virtualization. ...
- Application virtualization.
When it comes to desktop virtualization, there are two main methods: local and remote. Local and remote desktop virtualization are both possible depending on the business needs. However, local desktop virtualization has many limitations, including the inability to use a mobile device to access the network resources.
Can I create a Azure VM for free? ›You can create multiple instances of services for free if your total usage is within the usage limit. For example, you get 750 hours of a B1S Windows virtual machine free each month with your Azure free account. Use 750 hours in any combination you want.
What can I do with unused VMs? ›- Log on to the TrueSight console. In the left navigation pane, click Capacity > Views > Cloud > Azure > Virtual Machines.
- View the VM-specific core metric details. ...
- Configure the optimization behavior settings. ...
- View the recommendations for the overallocated and idle VMs. ...
- Save an offline copy of the recommendations.