VHD query attachVirtualDisk

balu T 41 Reputation points
2020-08-25T12:17:28.417+00:00

Hi,
if we use the ATTACH_VIRTUAL_DISK_FLAG_NO_LOCAL_HOST flag, where do the VM disks get attached.

Suppose i have created a snapshot and use the base disk for the openVirtualDisk() function. Now if i call in the AttachVirualDisk(...) with the flags with ATTACH_VIRTUAL_DISK_FLAG_NO_LOCAL_HOST, where do the VM disks get attached ?

Is it to the hypervisor host or VM host ?
Using the AttachVirtualdisk() has any performance impact on either of the hosts ?
is there any command (diskManager) where we can look at the attached disks ?

====
attachFlags = ATTACH_VIRTUAL_DISK_FLAG_NO_LOCAL_HOST |
ATTACH_VIRTUAL_DISK_FLAG_READ_ONLY;

opStatus = AttachVirtualDisk(
    sourceVhdHandle,
    NULL,
    attachFlags,
    0,
    &attachParameters,

NULL);

appreciate your response.

-Balu

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,613 questions
Windows Server Backup
Windows Server Backup
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Backup: A duplicate copy of a program, a disk, or data, made either for archiving purposes or for safeguarding valuable files from loss should the active copy be damaged or destroyed.
464 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaowei He 9,876 Reputation points
    2020-08-26T09:01:23.293+00:00

    Hi,

    --if we use the ATTACH_VIRTUAL_DISK_FLAG_NO_LOCAL_HOST flag, where do the VM disks get attached.

    ATTACH_VIRTUAL_DISK_FLAG_NO_LOCAL_HOST: Specifies that the operating system disk device created when the virtual disk is attached will not be exposed to the local system, but rather to a virtual machine running on the local system.

    https://video2.skills-academy.com/en-us/openspecs/windows_protocols/ms-vds/32a46f9f-66be-44e8-951f-563368084546

    -------------------

    If the reply could be of help, please help to accept it as an answer, thanks for your cooperation!
    Thanks for your time!
    Best Regards,
    Anne