{"id":38073,"date":"2025-08-05T16:57:50","date_gmt":"2025-08-05T19:57:50","guid":{"rendered":"https:\/\/www.locaweb.com.br\/ajuda\/?post_type=ht_kb&#038;p=38073"},"modified":"2025-08-05T16:57:50","modified_gmt":"2025-08-05T19:57:50","slug":"como-criar-um-template-locaweb-cloud","status":"publish","type":"ht_kb","link":"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/como-criar-um-template-locaweb-cloud\/","title":{"rendered":"Como criar um template &#8211; Locaweb Cloud"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">O processo de cria\u00e7\u00e3o de um <\/span><b>template<\/b><span style=\"font-weight: 400;\"> envolve preparar uma VM modelo e, em seguida, criar um snapshot do seu disco raiz para servir de base.<\/span><\/p>\n<h6><span style=\"font-weight: 400;\">Requisitos essenciais<\/span><\/h6>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Uma VM Modelo:<\/b><span style=\"font-weight: 400;\"> Voc\u00ea precisa de uma <\/span><a href=\"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/como-criar-uma-maquina-virtual-vm-no-locaweb-cloud\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">VM j\u00e1 existente<\/span><\/a><span style=\"font-weight: 400;\">, configurada exatamente como voc\u00ea deseja que o template seja.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>VM Parada:<\/b><span style=\"font-weight: 400;\"> Para garantir a consist\u00eancia do sistema de arquivos, a VM modelo deve estar no <\/span><a href=\"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/como-reiniciar-parar-ou-destruir-uma-vm\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">estado <\/span><b>&#8220;parada&#8221;<\/b><\/a><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Um snapshot do disco raiz:<\/b><span style=\"font-weight: 400;\"> O template \u00e9 gerado a partir de um <\/span><a href=\"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/como-criar-um-snapshot-de-disco-locaweb-cloud\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">snapshot do disco <\/span><\/a><span style=\"font-weight: 400;\">principal da VM.<\/span><\/li>\n<\/ul>\n<h6><span style=\"font-weight: 400;\">Por que o Snapshot precisa ser do disco raiz?<\/span><\/h6>\n<p><span style=\"font-weight: 400;\">Um template serve para criar <\/span><b>novas VMs que possam ser iniciadas (boot)<\/b><span style=\"font-weight: 400;\">. Toda a informa\u00e7\u00e3o necess\u00e1ria para o boot de um sistema operacional (o kernel, os arquivos de sistema, o bootloader) reside exclusivamente no <\/span><b>disco raiz<\/b><span style=\"font-weight: 400;\">. Um snapshot de um disco de dados, por outro lado, cont\u00e9m apenas arquivos e n\u00e3o um sistema operacional inicializ\u00e1vel, por isso n\u00e3o pode ser usado para criar um template.<\/span><\/p>\n    \t\t<div class=\"hts-messages hts-messages--info  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Dica<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t<\/p>\n<p><b>O snapshot \u00e9 de disco raiz ou de dados?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Ao acessar a aba <\/span><b>Detalhes<\/b><span style=\"font-weight: 400;\"> do snapshot, voc\u00ea pode verificar essa informa\u00e7\u00e3o no campo <\/span><b>\u201cTipo de disco\u201d<\/b><span style=\"font-weight: 400;\">. Se o valor for <\/span><b>ROOT<\/b><span style=\"font-weight: 400;\">, significa que \u00e9 um snapshot do disco raiz e pode ser utilizado para criar um template. J\u00e1 <\/span><b>DATADISK<\/b><span style=\"font-weight: 400;\"> indica que se trata de um disco adicional de dados.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38076\" src=\"https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/1-8.png\" alt=\"\" width=\"336\" height=\"75\" srcset=\"https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/1-8.png 336w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/1-8-300x67.png 300w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/1-8-50x11.png 50w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/1-8-60x13.png 60w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/1-8-100x22.png 100w\" sizes=\"auto, (max-width: 336px) 100vw, 336px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">\u00c9 importante destacar que snapshots de discos de dados (<\/span><b>DATADISK<\/b><span style=\"font-weight: 400;\">) <\/span><b>n\u00e3o possuem a op\u00e7\u00e3o \u201cCriar Template\u201d<\/b><span style=\"font-weight: 400;\"> na lista de a\u00e7\u00f5es dispon\u00edveis.<\/span><\/p>\n<p>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<h6><span style=\"font-weight: 400;\">Criando o template<\/span><\/h6>\n<p><span style=\"font-weight: 400;\">Criar o template a partir do snapshot<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Agora, v\u00e1 para <\/span><b>Armazenamento -&gt; Snapshots de disco.<\/b><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Selecione<\/span><b> \u201cdisco exportado de snapshot VM\u201d<\/b><span style=\"font-weight: 400;\"> que voc\u00ea deseja usar para criar o template.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Com o snapshot selecionado, clique no bot\u00e3o de a\u00e7\u00e3o <\/span><b>&#8220;Criar template&#8221;<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-38077\" src=\"https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/2-7-1024x543.png\" alt=\"\" width=\"643\" height=\"341\" srcset=\"https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/2-7-1024x543.png 1024w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/2-7-300x159.png 300w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/2-7-768x407.png 768w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/2-7-50x27.png 50w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/2-7-1536x814.png 1536w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/2-7-60x32.png 60w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/2-7-100x53.png 100w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/2-7.png 1600w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" value=\"4\" aria-level=\"1\"><span style=\"font-weight: 400;\">Um formul\u00e1rio aparecer\u00e1. Preencha os detalhes:<\/span><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38074\" src=\"https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/3-6.png\" alt=\"\" width=\"512\" height=\"453\" srcset=\"https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/3-6.png 512w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/3-6-300x265.png 300w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/3-6-50x44.png 50w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/3-6-60x53.png 60w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/3-6-100x88.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Nome:<\/b> <span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">D\u00ea um nome para o seu novo template (<\/span><b>ex: Template-Ubuntu-c-Nginx).<\/b><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Descri\u00e7\u00e3o:<\/b> <span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Explique para que serve este template. <\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Zona:<\/b> <span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Selecione a <\/span><b>Zona<\/b><span style=\"font-weight: 400;\"> onde o template ser\u00e1 criado (ex.: <\/span><b>ZP01<\/b><span style=\"font-weight: 400;\">).<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Dom\u00ednio: <\/b><span style=\"font-weight: 400;\">Informe o Dom\u00ednio apenas se estiver criando o template vinculado a uma conta espec\u00edfica. Caso utilize o par\u00e2metro account, tamb\u00e9m \u00e9 obrigat\u00f3rio informar o dom\u00ednio.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Tipo de SO (Sistema operacional):<\/b> <span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Selecione na lista o sistema operacional usado para criar a VM que gerou o snapshot (Ubuntu, Fedora, Debian, etc). Isso ajuda o Locaweb Cloud a gerenciar a VM de forma adequada.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Senha ativada<\/b><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Ativar esta op\u00e7\u00e3o permitir\u00e1 que voc\u00ea use a fun\u00e7\u00e3o <\/span><b>&#8220;Resetar Senha da VM&#8221;<\/b><span style=\"font-weight: 400;\"> no painel para as m\u00e1quinas criadas a partir deste template, o que \u00e9 \u00fatil para recuperar o acesso.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n    \t\t<div class=\"hts-messages hts-messages--alert  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Importante!<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t<\/p>\n<p><span style=\"font-weight: 400;\">A &#8220;m\u00e1gica&#8221; por tr\u00e1s da op\u00e7\u00e3o <\/span><b>&#8220;Senha ativada<\/b><span style=\"font-weight: 400;\">&#8221; \u00e9 um servi\u00e7o chamado <\/span><b>cloud-init<\/b><span style=\"font-weight: 400;\">, que \u00e9 o padr\u00e3o da ind\u00fastria para inicializa\u00e7\u00e3o e configura\u00e7\u00e3o de VMs na nuvem.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">As imagens que oferecemos s\u00e3o &#8220;preparadas para a nuvem&#8221; (cloud-ready), o que significa que j\u00e1 v\u00eam com o <\/span><b>cloud-init<\/b><span style=\"font-weight: 400;\"> pr\u00e9-instalado.<\/span><\/p>\n<p>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<ul>\n<li aria-level=\"2\"><b>Dinamicamente escal\u00e1vel<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\">Marcar essa op\u00e7\u00e3o significa que voc\u00ea poder\u00e1, futuramente, aumentar esses recursos em uma VM criada a partir deste template sem precisar reinici\u00e1-la, permitindo um escalonamento sem indisponibilidade.\u00a0<\/span><\/li>\n<\/ul>\n    \t\t<div class=\"hts-messages hts-messages--alert  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Importante!<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t<\/p>\n<p><span style=\"font-weight: 400;\">Ao marcar a caixa <\/span><b>&#8220;Dinamicamente escal\u00e1vel&#8221;<\/b><span style=\"font-weight: 400;\"> ao criar o template, voc\u00ea est\u00e1 essencialmente <\/span><b>afirmando que<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8220;Eu preparei esta imagem de sistema operacional e sei que ela \u00e9 uma vers\u00e3o compat\u00edvel e que tem as ferramentas necess\u00e1rias para aceitar mais CPU e RAM sem precisar ser reiniciada.&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Se voc\u00ea marcar essa caixa, mas o sistema operacional dentro do seu template for muito antigo ou n\u00e3o estiver preparado, a opera\u00e7\u00e3o de escalar dinamicamente ir\u00e1 falhar no futuro.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Caso n\u00e3o entenda o que precisa ser configurado para a VM ser dinamicamente escal\u00e1vel, deixe essa op\u00e7\u00e3o desmarcada.<\/span><\/p>\n<p>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>HVM<\/b><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Indica que o template requer virtualiza\u00e7\u00e3o assistida por hardware, que \u00e9 o padr\u00e3o para a grande maioria dos sistemas operacionais modernos (como as vers\u00f5es atuais de Linux e Windows). Mantenha esta op\u00e7\u00e3o marcada para garantir a melhor performance e compatibilidade.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>P\u00fablico<\/b><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Deixe desmarcado se o template for apenas para seu uso. Marcar essa op\u00e7\u00e3o torna o template vis\u00edvel para outros usu\u00e1rios dentro do seu dom\u00ednio.<\/span><\/li>\n<\/ul>\n<ol>\n<li style=\"font-weight: 400;\" value=\"5\" aria-level=\"1\"><span style=\"font-weight: 400;\">Por fim, clique em <\/span><b>OK<\/b><span style=\"font-weight: 400;\"> para iniciar a cria\u00e7\u00e3o do template.<\/span><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38075\" src=\"https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/4-4.png\" alt=\"\" width=\"512\" height=\"67\" srcset=\"https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/4-4.png 512w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/4-4-300x39.png 300w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/4-4-50x7.png 50w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/4-4-60x8.png 60w, https:\/\/www.locaweb.com.br\/ajuda\/wp-content\/uploads\/2025\/08\/4-4-100x13.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">O Locaweb Cloud come\u00e7ar\u00e1 a copiar os dados do snapshot para criar o template, o que pode levar algum tempo. Voc\u00ea poder\u00e1 acompanhar o progresso na se\u00e7\u00e3o <\/span><b>Imagens &gt; templates <\/b><span style=\"font-weight: 400;\">do painel. Uma vez que o status esteja como <\/span><b>&#8220;Pronto&#8221;<\/b><span style=\"font-weight: 400;\">, ele aparecer\u00e1 como uma op\u00e7\u00e3o na tela de cria\u00e7\u00e3o de novas VMs.<\/span><\/p>\n<h6><span style=\"font-weight: 400;\">P\u0155oximos passos<\/span><\/h6>\n<p><b>Criar uma VM utilizando seu template<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\">Agora que voc\u00ea criou seu pr\u00f3prio template, \u00e9 hora de coloc\u00e1-lo em uso. <\/span><a href=\"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/como-criar-uma-maquina-virtual-vm-no-locaweb-cloud\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Crie uma VM <\/span><\/a><span style=\"font-weight: 400;\">j\u00e1 com todo o seu sistema e aplica\u00e7\u00f5es pr\u00e9-configurados.<\/span><\/p>\n<p><b>Como criar um disco de um snapshot<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\">Al\u00e9m de templates, voc\u00ea pode usar snapshots para clonar volumes de dados. Este guia mostra <\/span><span style=\"font-weight: 400;\"><a href=\"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/como-criar-um-disco-a-partir-de-um-snapshot\/\" target=\"_blank\" rel=\"noopener\">como criar um novo disco independente a partir de qualquer snapshot<\/a>.<\/span><span style=\"font-weight: 400;\"> \u00c9 ideal para duplicar um ambiente de dados ou para recupera\u00e7\u00e3o granular de arquivos.<\/span><\/p>\n<p><b>Como restaurar uma VM<\/b><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Para uma recupera\u00e7\u00e3o completa do sistema ap\u00f3s uma falha ou erro de configura\u00e7\u00e3o, <\/span><a href=\"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/como-restaurar-um-snapshot-de-vm-locaweb-cloud\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">use um snapshot de VM para reverter sua m\u00e1quina inteira <\/span><\/a><span style=\"font-weight: 400;\">para um ponto de restaura\u00e7\u00e3o anterior. Esta a\u00e7\u00e3o restaura os discos e a mem\u00f3ria, sendo o &#8220;bot\u00e3o de desfazer&#8221; mais r\u00e1pido para sua VM.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>O processo de cria\u00e7\u00e3o de um template envolve preparar uma VM modelo e, em seguida, criar um snapshot do seu disco raiz para servir de base. Requisitos essenciais Uma VM Modelo: Voc\u00ea precisa de uma VM j\u00e1 existente, configurada exatamente como voc\u00ea deseja que o template seja. VM Parada: Para&#8230;<\/p>\n","protected":false},"author":30,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[666],"ht-kb-tag":[],"class_list":["post-38073","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-locaweb-cloud"],"_links":{"self":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb\/38073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/comments?post=38073"}],"version-history":[{"count":2,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb\/38073\/revisions"}],"predecessor-version":[{"id":38189,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb\/38073\/revisions\/38189"}],"wp:attachment":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/media?parent=38073"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb-category?post=38073"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb-tag?post=38073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}