Virtual disk windows server

Работа с виртуальными жесткими дисками VHD и VHDX средствами Windows

VHD — сокращение от Virtual Hard Disk, буквально «виртуальный жесткий диск». По содержанию, является аналогом настоящего жесткого диска, используя такую же структуру данных. Является стандартным форматом виртуальных жестких дисков у Microsoft Hyper-V и Microsoft Virtual PC, многие другие гипервизоры и виртуальные машины так же поддерживают работу с данным форматом виртуальных жестких дисков. VHDX является более новым форматом виртуального жесткого диска, с различными улучшениями.

Работу с VHD файлами поддерживают все версии Windows, начиная с Windows 7 и Windows Server 2008.
Работу с VHDX файлами поддерживают все версии Windows, начиная с Windows 8 и Windows Server 2012.

Использование Управление дисками

Подключение виртуального жесткого диска

  1. Подключить VHD/VHDX диск в систему Windows можно через Управление дисками. Для этого, достаточно просто нажать правой кнопкой мыши по иконке меню «Пуск», и выбрать пункт «Управление дисками».
  2. В открывшемся окне управления дисками, в верхнем меню нужно выбрать раздел «Действие», и в нем выбрать «Присоединить виртуальный жесткий диск».
  3. Откроется маленькое окошко, где нужно выбрать VHD или VHDX файл. В нем так же можно установить чекбокс «Только для чтения.», установка которого закроет любую возможность вносить какие-либо изменения в данный файл виртуального жесткого диска.
  4. После нажатия кнопки «ОК», VHD/VHDX файл будет смонтирован в систему, а в «Мой компьютер» появятся разделы виртуального жесткого диска (при условии, что у них файловая система, которую поддерживает Windows — exFAT, FAT, FAT32, NTFS или ReFS).

Отключение виртуального жесткого диска

Отключить подключенный VHD/VHDX файл можно так же через управление дисками. Для этого, нужно найти данный жесткий диск в списке подключенных дисков, и нажать на нем правой кнопкой мыши. В появившемся меню нужно выбрать пункт «Отсоединить виртуальный жесткий диск».

Использование diskpart

Запускаем diskpart (через Проводник, Выполнить или Командную строку). В нем указываем расположение VHD файла:

Для монтирования диска, нужно выполнить следующую команду:

Для размонтирования диска, нужно выполнить следующую команду:

Использование PowerShell

В PowerShell так же возможно выполнить монтирование и размонтирование виртуальных жестких дисков VHD и VHDX. Для этого, нужно запустить PowerShell от имени администратора, и выполнить следующие команды:

  • Для монтирования диска:
  • Для размонтирования диска:

Virtual Hard Disk Sharing Overview

Applies To: Windows Server 2012 R2

Starting in Windows Server 2012 R2, Hyper-V makes it possible to share a virtual hard disk file between multiple virtual machines. Sharing a virtual hard disk file (.vhdx) provides the shared storage that is necessary for a Hyper-V guest failover cluster. This is also referred to as a virtual machine failover cluster. For information on creating and enabling a shared virtual hard disk, see Configure a Shared Virtual Hard Disk.

Key benefits

Sharing a virtual hard disk file (.vhdx) means that you can create and manage a guest failover cluster to protect the application services running inside your virtual machines. Before Windows Server 2012 R2, if you wanted to create a Hyper-V guest failover cluster, you needed to expose your storage topology to the virtual machine.

Читайте также:  Lenovo thinkpad t410 windows 10

Starting in Windows Server 2012 R2, you can deploy a Hyper-V guest failover cluster that is no longer bound to your storage topology. You can implement a guest failover cluster by using a shared virtual hard disk, Fibre Channel, Server Message Block (SMB), Storage Spaces, or iSCSI storage options. Shared virtual hard disks are only available in Windows Server 2012 R2. Hyper-V makes it possible to share a virtual hard disk file between multiple virtual machines. Sharing a virtual hard disk file (.vhdx) provides the shared storage that is necessary for a Hyper-V guest failover cluster.

Using a shared virtual hard disk is ideal for the following situations:

SQL Server database files.

File server services running within a virtual machine.

Database files that reside on shared disks.

When you share a virtual hard disk file, these tasks aren’t supported:

Guest Failover Clusters

The following information will help you understand and deploy a guest failover cluster by using a shared virtual hard disk.

Shared virtual hard disk format

Shared virtual hard disk functionality in guest failover clusters exclusively uses the .vhdx file format. Although the shared virtual hard disk must use the .vhdx file format for the data drive, the operating system disk for a virtual machine can use either the .vhd or the .vhdx file format.

Supported virtual machines

Generation 1 and Generation 2 virtual machines are supported in a guest failover cluster using a shared virtual hard disk.

Supported guest operating systems

Supported guest operating systems for guest clusters that use a shared virtual hard disk include Windows Server 2012 R2 and Windows Server 2012. To support Windows Server 2012 as a guest operating system, Windows Server 2012 R2 Integration Services must be installed within the guest (virtual machine).

Deploying a shared virtual hard disk in a guest failover cluster

A Hyper-V guest failover cluster that uses a shared virtual hard disk has two preferred deployment models. The shared virtual hard disk for the guest failover cluster can be deployed on:

Cluster Shared Volumes (CSVs) on block storage (including clustered Storage Spaces).

Scale-Out File Server with SMB 3.0 on file-based storage.

A Hyper-V guest failover cluster can be configured and deployed by using Hyper-V Manager and Failover Cluster Manager. You can also use Windows PowerShell.

When you use shared VHDX with local block storage, synchronization must occur for shared VHDX file access. If the virtual machines are running on different nodes, this involves network redirection for the synchronization activity. If you have fast block connectivity combined with slow intra-cluster network communication, this synchronization activity results in I/O variance (either redirected or direct) based on the node. This happens on a per file basis. (The entire CSV is not in redirected mode.) To increase performance, we recommend that you scale the intra-cluster network. Be aware that this is not a consideration when you use file-based storage. When you use a compute layer of file-based storage over SMB together with a remote Scale-Out File Server (SOFS), this shared file access orchestration is performed by the SOFS. With a SOFS, SMB sessions are transitioned to optimize file access. The SMB sessions co-exist on the same node that performs the synchronization. As a result, there is no network communication.

Читайте также:  Изоляция графов аудиоустройств windows грузит диск

Using Cluster Shared Volume

One option for using virtual hard disk sharing is to use Cluster Shared Volumes. The following graphic provides an example configuration. You can also use other types of shared storage if required.

Using Scale-Out File Server with SMB 3.0

A second option for virtual hard disk sharing is to use a Scale-Out File Server. The following graphic provides an example configuration. You can also use other types of shared storage if required.

Requirements

To configure a guest failover cluster that uses shared virtual hard disks, you require the following:

At least a two-node Hyper-V failover cluster.

Servers must be running Windows Server 2012 R2.

Servers must belong to the same Active Directory domain.

Availability of configured shared storage resources—for example, CSVs on block storage (such as clustered storage spaces) or a Scale-Out File Server cluster (running Windows Server 2012 R2) with SMB 3.0 (for file-based storage).

Sufficient memory, disk, and processor capacity within the failover cluster to support multiple virtual machines that are implemented as guest failover clusters.

Управление виртуальными жесткими дисками Manage Virtual Hard Disks (VHD)

Относится к: Windows 10, Windows 8.1, Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 Applies To: Windows 10, Windows 8.1, Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

В этом разделе описывается, как создавать, подключать и отключать виртуальные жесткие диски с помощью средства управления дисками. This topic describes how to create, attach, and detach virtual hard disks with Disk Management. Виртуальные жесткие диски — это файлы виртуальных жестких дисков, которые при подключении отображаются и функционируют практически идентично физическому жесткому диску. Virtual hard disks (VHDs) are virtualized hard disk files that, once mounted, appear and operate pretty much identically to a physical hard drive. В основном они используются в сочетании с виртуальными машинами Hyper-V. They’re most commonly used with Hyper-V virtual machines.

Просмотр виртуальных жестких дисков в средстве управления дисками. Viewing VHDs in Disk Management

Виртуальные жесткие диски отображаются в средстве управления дисками так же, как и физические диски. VHDs appear just like physical disks in Disk Management. После подключения (предоставления системе в пользование) виртуальный жесткий диск выделяется синим цветом. When a VHD has been attached (that is, made available to the system for use), it appears blue. Если диск отключен (становится недоступным), его значок становится серым. If the disk is detached (that is, made unavailable), its icon reverts to gray.

Создание виртуального жесткого диска Creating a VHD

Для выполнения следующих шагов необходимо как минимум состоять в группе Операторы архива или Администраторы. You must be a member of the Backup Operators or Administrators group, at minimum, to complete these steps.

Процедура создания виртуального жесткого диска To create a VHD

В меню Действие выберите Создать виртуальный жесткий диск. On the Action menu, select Create VHD.

В диалоговом окне Создание и подключение виртуального жесткого диска укажите расположение на физическом компьютере, где требуется хранить файл виртуального жесткого диска, а также размер виртуального жесткого диска. In the Create and Attach Virtual Hard Disk dialog box, specify both the location on the physical computer where you want the VHD file to be stored, and the size of the VHD.

Читайте также:  Разрешение для сертификата windows

В поле Формат виртуального жесткого диска выберите Динамически расширяемый или Фиксированный размер и нажмите кнопку ОК. In Virtual hard disk format, select Dynamically expanding or Fixed size, and then click OK.

Подключение и отключение виртуального жесткого диска Attaching and detaching a VHD

Чтобы сделать виртуальный жесткий диск (недавно созданный или другой существующий виртуальный жесткий диск) доступным для использования, выполните следующие действия. To make a VHD available for use (either one you have just created or another existing VHD):

В меню Действие выберите Подключить виртуальный жесткий диск. On the Action menu, select Attach VHD.

Укажите полный путь к виртуальному жесткому диску. Specify the location of the VHD, using a fully-qualified path.

Чтобы отключить виртуальный жесткий диск, сделав его недоступным: Щелкните диск правой кнопкой мыши, выберите команду Отключить виртуальный жесткий диск, а затем нажмите кнопку ОК. To detach the VHD, making it unavailable: Right-click the disk, select Detach VHD, and then click OK. При отключении ни виртуальный жесткий диск, ни хранящиеся на нем данные не удаляются. Detaching a VHD does not delete the VHD or any data stored in it.

Virtual Disk Service

[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]

Purpose

The Virtual Disk Service (VDS) manages a wide range of storage configurations, from single-disk desktops to external storage arrays. The service exposes an application programming interface (API).

Where applicable

Beginning with Windows 8 and Windows Server 8, the Virtual Disk Service COM interface is superseded by the Storage Management API, a WMI-based programming interface. For managing storage subsystems, (Windows) disks, partitions, and volumes, we strongly recommend using the Storage Management API. For more information, see the Windows Storage Management API.

For all usages except mirror boot volumes (using a mirror volume to host the operating system ), dynamic disks are deprecated. For data that requires resiliency against drive failure, use Storage Spaces, a resilient storage virtualization solution. For more information, see Storage Spaces Technical Preview.

Application developers who use the interfaces described in this guide can query and configure a heterogeneous set of vendor-supplied and internally managed storage. VDS hides from applications the complexities associated with storage, making the service both vendor and technology neutral.

Developer audience

This documentation is intended for application developers who are familiar with the storage capabilities of Microsoft Windows platforms and who are knowledgeable about COM development.

The guide is also intended for hardware subsystem manufacturers who develop and support VDS hardware provider programs.

Run-time requirements

VDS is supported on Windows Server 2003, Windows Vista, and later. For information about run-time requirements for a particular programming element, see the Requirements section of the documentation for that element.

Running 32-bit VDS applications under WOW64 is supported, but 64-bit VDS providers must run as native applications on 64-bit Windows versions.

VDS is available in the Microsoft Windows Software Development Kit (SDK). You can install the SDK for Windows 7 and Windows Server 2008 R2 from the Windows Download Center. This version of the Windows SDK can be used to develop VDS applications for Windows Server 2003, Windows Vista, and later. You can also download the ISO version of the SDK from the Windows Download Center.

Оцените статью