Machine is not connected (Code: HCRP400) trying to create a host pool

David Pereira 15 Reputation points
2024-06-18T13:58:27.5133333+00:00

I'm setting up a lab environment and managed to deploy a host pool successfully on Azure Stack HCI, now when I try to add servers to an existing pool or create a new pool I get the following error

{"code":"HCRP400","message":"Machine is not connected"}

on this phase of the deployment

Microsoft.HybridCompute/machines/extensions

The VM is created and it looks "apparently" fine but it's not showing as a session host in AVD

As you can see the error doesn't give much detail on what's wrong, I've tried a few different things but every attempt takes about an hour before it fails, any advice?

AVD

Azure Stack HCI
Azure Stack HCI
A hyperconverged infrastructure operating system delivered as an Azure service that provides security, performance, and feature updates.
368 questions
Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,589 questions
{count} vote

1 answer

Sort by: Most helpful
  1. David Pereira 0 Reputation points
    2024-11-17T22:21:36.3666667+00:00

    It turns out the issue was with the master image I was using to push hosts, MS doesn't support custom images that are not created from a market place image.

    You can customize your image before pushing it to a host pool or create a new host pool if you do it from a fresh market place image, so basically ONCE only, if you forget something or if you wish to create lets say version 2, 3, 4, 15 of that custom image chances are it will fail to deploy the host(s). This happens because sysprep doesn't clean the arcagent from the image.

    Now there's a few options to go around this,

    Use a third party tool to manage your images like Nerdio.

    Don't customize your image always use market place image (not realistic in most cases)

    Script all the changes you need to do to your custom image so that you can use a fresh Market place image every time. (again not realistic with legacy/complex/bespoke apps)

    Another option is to deploy the VM from your custom image with a million changes register arcagent with the correct name once the VM is deployed manually and join the host pool manually.

    The following solution is not supported by MS

    If you need to make a version 2 + of you master image uninstall the arcagent from the "master image" before sysprep by using the command "azcmagent disconnect --force-local-only" careful with this command in az stack hci if you don't use the local only switch it will delete the VM.

    Hope this makes sense and helps someone

    0 comments No comments

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.