private static async Task <BootVolume> createBootVolume(BlockstorageClient blockstorageClient, string compartmentId, AvailabilityDomain availabilityDomain, Image image)
        {
            string bootVolumeName = "oci-dotnet-sdk-example-boot-volume";
            // find existing boot volume by image
            ListBootVolumesRequest listBootVolumesRequest = new ListBootVolumesRequest
            {
                AvailabilityDomain = availabilityDomain.Name,
                CompartmentId      = compartmentId
            };
            ListBootVolumesResponse listBootVolumesResponse = await blockstorageClient.ListBootVolumes(listBootVolumesRequest);

            List <BootVolume> bootVolumes        = listBootVolumesResponse.Items;
            BootVolume        existingBootVolume = null;

            foreach (BootVolume bootVol in bootVolumes)
            {
                if (BootVolume.LifecycleStateEnum.Available.Equals(bootVol.LifecycleState) && image.Id.Equals(bootVol.ImageId))
                {
                    existingBootVolume = bootVol;
                    break;
                }
            }

            // create a new boot volume based on existing one
            logger.Info($"Found BootVolume: {existingBootVolume.Id}");
            BootVolumeSourceDetails existingBootVolumeDetails = existingBootVolume.SourceDetails;
            BootVolumeSourceDetails bootVolumeSourceDetails   = new BootVolumeSourceFromBootVolumeDetails
            {
                Id = existingBootVolume.Id
            };

            CreateBootVolumeDetails createBootVolumeDetails = new CreateBootVolumeDetails
            {
                AvailabilityDomain = availabilityDomain.Name,
                CompartmentId      = compartmentId,
                DisplayName        = bootVolumeName,
                SourceDetails      = bootVolumeSourceDetails
            };
            CreateBootVolumeRequest createBootVolumeRequest = new CreateBootVolumeRequest {
                CreateBootVolumeDetails = createBootVolumeDetails
            };
            CreateBootVolumeResponse createBootVolumeResponse = await blockstorageClient.CreateBootVolume(createBootVolumeRequest);

            logger.Info($"Provisioning new BootVolume: " + createBootVolumeResponse.BootVolume.Id);

            WaiterConfiguration waiterConfiguration = new WaiterConfiguration
            {
                MaxAttempts           = 20,
                GetNextDelayInSeconds = DelayStrategy.GetExponentialDelayInSeconds
            };

            // wait for boot volume to be ready
            GetBootVolumeRequest getBootVolumeRequest = new GetBootVolumeRequest {
                BootVolumeId = createBootVolumeResponse.BootVolume.Id
            };
            GetBootVolumeResponse getBootVolumeResponse = blockstorageClient.Waiters.ForBootVolume(getBootVolumeRequest, waiterConfiguration, BootVolume.LifecycleStateEnum.Available).Execute();
            BootVolume            bootVolume            = getBootVolumeResponse.BootVolume;

            logger.Info($"Provisioned BootVolume: {bootVolume.Id}");
            return(bootVolume);
        }