Este conteúdo foi traduzido por máquina para sua conveniência e a Huawei Cloud não pode garantir que o conteúdo foi traduzido com precisão. Para exibir o conteúdo original, use o link no canto superior direito para mudar para a página em inglês.
Computação
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Redes
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Gerenciamento e governança
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
Cloud Operations Center
Resource Governance Center
Migração
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Análises
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
IoT
IoT Device Access
Outros
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Segurança e conformidade
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Blockchain
Blockchain Service
Serviços de mídia
Media Processing Center
Video On Demand
Live
SparkRTC
Armazenamento
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Cloud Server Backup Service
Storage Disaster Recovery Service
Scalable File Service
Volume Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Bancos de dados
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Aplicações de negócios
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Data Lake Factory
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Distribuição de conteúdo e computação de borda
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Soluções
SAP Cloud
High Performance Computing
Serviços para desenvolvedore
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
Cloud Application Engine
MacroVerse aPaaS
KooPhone
KooDrive
Central de ajuda/ Elastic Cloud Server/ Primeiros passos/ Initializing EVS Data Disks/ Initializing Windows Data Disks Using Script

Initializing Windows Data Disks Using Script

Atualizado em 2025-01-23 GMT+08:00

Scenarios

This section uses Windows Server 2008 R2 Enterprise 64bit to describe how to automatically initialize data disks attached to a ECS running Windows.

The formatting procedure varies depending on the ECS OS. This section is for reference only.

Ao usar um disco pela primeira vez, se você não o inicializou, incluindo a criação de partições e sistemas de arquivos, a capacidade adicional adicionada ao disco em uma operação de expansão posterior pode não ser usada normalmente.

Pré-requisitos

  • Um disco de dados foi anexado ao ECS e não foi inicializado.
  • Você fez logon no ECS.

Constraints

  • This script uses the NTFS file system and MBR partition style by default.
  • This script does not support the initialization of disks that form Windows logical volume groups.
  • This script supports the initialization of up to 23 Windows data disks.
  • Only data disks in Windows simplified Chinese and English can be initialized.

Manually Executing the Script to Initialize Windows Data Disks

  1. Log in to the ECS, visit https://ecs-instance-driver.obs.cn-north-1.myhuaweicloud.com/datadisk/WinVMDataDiskAutoInitialize.ps1 to obtain the automatic disk initialization script, and save it to C:\Windows\System32.
  2. On the ECS desktop, click Start, right-click Windows PowerShell, and choose Run as administrator from the shortcut menu.

    Figura 1 Run Windows PowerShell as administrator

  3. In the displayed dialog box, run the following command to set the script execution policy:

    Set-ExecutionPolicy -ExecutionPolicy Bypass -Force

  4. Run the following command in the dialog box to execute the initialization script:

    C:\Windows\System32\WinVMDataDiskAutoInitialize.ps1

    Information similar to the following is displayed:

    If the command output shows that PowerShell cannot load the file, the reason is that the Windows system policy does not allow the PowerShell script downloaded from the network to be executed when the script is not signed.

    To solve this problem, run the set-ExecutionPolicy RemoteSigned command and restart PowerShell.

  5. (Optional) On the Disk Management page, view the initialization result.

    Figura 2 Disk Management

Configuring Automatic Initialization of Windows Data Disks

You can configure automatic initialization for Windows data disks. After the configuration is complete, new disks purchased and attached to this ECS will be automatically initialized after the ECS is logged in to again.

To enable automatic initialization of Windows data disks on multiple ECSs, configure automatic initialization on one ECS, create a private image for this ECS, and use the image to batch create ECSs.

  1. On ECS desktop, click Start, right-click Computer in the list, and choose Manage from the shortcut menu.

    The Server Manager window is displayed.

  2. In the navigation tree on the left, choose Configuration > Task Scheduler > Task Scheduler Library, then right-click and choose Create Task from the shortcut menu.

    The Create Task page is displayed.

  3. On the displayed page, click the General tab, enter WinVMDataDiskInitialize in the Name text box, and click Change User or Group.

    The Select User or Group page is displayed.

  4. Click Advanced in the lower left corner of the page.
  5. Click Find Now to the right of the page. In the search result list, select SYSTEM and click OK.

    The Select User or Group page is displayed.

  6. Click OK.

  7. Click the Triggers tab and click Create in the lower left corner of the page.
  8. On the New Trigger page, choose At log on for Begin the task, retain the default settings for other parameters, and click OK.

  9. Click the Actions tab and click Create in the lower left corner of the page.
  10. On the Edit Action page, set the following parameters:

    • Action: Choose Start a program.
    • Program/Script: Select powershell.exe.
    • Add arguments (optional): Enter -ExecutionPolicy Bypass C:\Windows\System32\WinVMDataDiskAutoInitialize.ps1.

    Click OK.

  11. On the Create Task page, click OK.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Conteúdo selecionado

Envie o conteúdo selecionado com o feedback