Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM Setup Issue #19

Closed
12devsilva12 opened this issue Nov 22, 2022 · 4 comments
Closed

VM Setup Issue #19

12devsilva12 opened this issue Nov 22, 2022 · 4 comments
Assignees
Labels
FarmVibes.AI setup Issues encountered during cluster setup

Comments

@12devsilva12
Copy link

Getting the following error when I try to setup the VM. I have cloned the repo to my local machine and am running the command as per the guide:

{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"VMExtensionProvisioningError\",\r\n \"message\": \"VM has reported a failure when processing extension 'farmvibes-ai_setup_script'. Error message: \\\"Enable failed: failed to get configuration: invalid configuration: 'commandToExecute' is not specified\\\"\\r\\n\\r\\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSELinuxTroubleshoot \"\r\n }\r\n ]\r\n }\r\n}"}]}}

@brsilvarec brsilvarec self-assigned this Nov 22, 2022
@brsilvarec
Copy link
Contributor

Hi @12devsilva12,

First of all, thanks for your input on this. Could you please post the command you used and confirm you are running it from project's root folder? I suspect you are running the script in such a way the initialization script cannot be found.

Keep in mind this command cat resources/vm/setup_farmvibes_ai_vm.sh must prompt the initialization script to successfully create and initialize the VM. You will probably need to select another deployment_name or delete the previous one before creating a new VM.

Please, let me know if you had success on this....

Best Regards.

@12devsilva12
Copy link
Author

12devsilva12 commented Nov 22, 2022

Thanks for the help! Below is the command I used and yes I am running it from the root of the project's root folder. Still getting the same error as above @brsilvarec. Any ideas?

az deployment group create --resource-group terradot \
   --name dev2\
   --template-file  resources/vm/farmvibes_ai_vm.bicep \
   --parameters \
            ssh_public_key="$(cat ~/.ssh/id_rsa.pub)" \
            vm_suffix_name=terra \
            encoded_script="$(cat resources/vm/setup_farmvibes_ai_vm.sh | gzip -9 | base64 -w0)"  

If helpful also getting following warning, not sure if related:

base64: invalid argument -w0

@brsilvarec
Copy link
Contributor

It seems your base64 script is getting problems to translate the setup_farmvibes_ai_vm.sh into base64 format. az cli expects a encoded_script parameter just like the following output.

(/datadrive/conda-env/dev-vibes) ╭─azureuser@eywa-bruno-dev /datadrive/demo/farmvibes-ai  ‹main›
╰─➤  cat resources/vm/setup_farmvibes_ai_vm.sh | gzip -9 | base64 -w0
H4sIAAAAAAACA41Ty05bMRDd36+Yhixg4bgSO0oq0SYg1IpUAVYURb725GYUx3b9AEJbqb/R3+uX1L5JIG2qipXteZw5c2a894rXZHgtwqyq9uDaKRERhItVSMqWC6TWVrznJkShNTS05aZnI7Dldphbxpk1FT446yMMhu/OTy4mp+PRxdXwYtA31pCJ6IWMdIe7eKvsw/XJKLA/LYfMkfurorJyjh4UOjQKjSQMu8BSMIk+0pRk7itAY5JrQIeaedQoAq5BT5SCQQv468fPAHaaE0hoOPt0BnNcHq2QF3NFHpgDjlHyXIdnnyfThEomr4FNw+VHmMXowhHnyt4bbYXqrZj2pF1wTSY98FQnExNvMpVv0CKXK2MKhV/YXMHuVuBrlBxZCAcsw4I4Q/DobKBo/bIHV/k9JR8i5GoLYRRIj23nJTLY5CWCpuxHE/0Sqv0qCwPHxzAcnVaQ1azhRng563f3lZsXUi6Xj6zYKKKMyeMBfM6hgRqDitXL/v+43raxL5WkDe7u5/lMnuYjwwHkYdYaoSokDzaaRcRnmVathV7prac2BNpO3wJXeMdN0vof+4OmIYM7P2Bnk1bheZueb0xqyjqbKDKCVz2y620a1cW0qZAC+oqmcAOd7vD6fNABhl/gNdy+KUMxuePNrxm9/zAcT64vh+N+p/t163nEOuIxK1+gOt87FeqAL8vrliNnTKkQG6cnVveUP1aKrZSrbgv4wipg4mwT1N3Cqn4DTRWg3z8EAAA=%

Are you getting an output similar to this one?

What is your version of base64? Perharps your are using a outdated version...

(/datadrive/conda-env/dev-vibes) ╭─azureuser@eywa-bruno-dev /datadrive/TerraVibes  ‹brunosilva/rm-output-handler*›
╰─➤  base64 --version                                                                                                          130 ↵
base64 (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Simon Josefsson.

Please, also try to update your az cli (instructions here)

@12devsilva12
Copy link
Author

Thanks for the advice! I am running this from a Mac, so the base64 has a different set of flags. https://stackoverflow.com/questions/46463027/base64-doesnt-have-w-option-in-mac this helped clarify and fixed my error by switching the command to just base64. Thanks!

@rafaspadilha rafaspadilha added the FarmVibes.AI setup Issues encountered during cluster setup label May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FarmVibes.AI setup Issues encountered during cluster setup
Projects
None yet
Development

No branches or pull requests

3 participants