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

Windows for business Windows Client for IT Pros Storage high availability Virtualization and Hyper-V
Windows for business Windows Server Devices and deployment Set up, install, or upgrade
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaowei He 9,936 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://learn.microsoft.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


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.