{"id":2862,"date":"2014-09-01T13:17:44","date_gmt":"2014-09-01T13:17:44","guid":{"rendered":"http:\/\/www.deuzebranaweb.com.br\/?p=2862"},"modified":"2014-09-01T13:17:44","modified_gmt":"2014-09-01T13:17:44","slug":"xenserver-dicas","status":"publish","type":"post","link":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/2014\/09\/01\/xenserver-dicas\/","title":{"rendered":"XenServer Dicas"},"content":{"rendered":"<h1 class=\"title\">Como finalizar uma VM travada no XenServer<\/h1>\n<div class=\"post-content clear-block\">\n<p>Sua VM travou e voc\u00ea n\u00e3o quer reiniciar o servidor para liberar a tarefa que n\u00e3o desliga, essa dica servir\u00e1 para desligar a VM que est\u00e1 travada.<\/p>\n<p>Primeiro passo \u00e9 saber o uuid da VM que est\u00e1 travada, no XenCenter s\u00f3 precisa clicar em cima da VM e decorar o uuid respectivo.<\/p>\n<p>Ou, digitar o comando abaixo para listar o uuid das VMs<br \/>\n<strong>#xe vm-list<br \/>\n<\/strong><br \/>\nSer\u00e1 necess\u00e1rio identificar o ID correspondente ao dom\u00ednio em execu\u00e7\u00e3o da respectiva VM<br \/>\n<strong>#list_domains<br \/>\n<\/strong><br \/>\nDigite e troque o XX pelo ID identificado acima:<br \/>\n<strong>\/opt\/xensource\/debug\/destroy_domain -domid XX<br \/>\n<\/strong><br \/>\nSua VM deve ter sido liberada, se for necess\u00e1rio for\u00e7ar o reboot dela, digite o comando abaixo, troque XXXX pelo uuid da VM:<br \/>\n<strong>#xe vm-reboot uuid=XXXX \u2013force<br \/>\n<\/strong><\/p>\n<p>Isso resolve o problema na maioria dos casos sem ter que reiniciar o servidor inteir<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2 class=\"title\"><a style=\"color: #4e4e4e;\" title=\"Permalink to Como iniciar uma VM com boot autom\u00e1tico\" href=\"http:\/\/www.biblionerd.com.br\/blog\/como-iniciar-uma-vm-com-boot-automatico\/\" rel=\"bookmark\">Como iniciar uma VM com boot autom\u00e1tico<\/a><\/h2>\n<p><a class=\"comments\" style=\"font-weight: bold;\" href=\"http:\/\/www.biblionerd.com.br\/blog\/como-iniciar-uma-vm-com-boot-automatico\/#comments\">0<\/a><\/p>\n<div class=\"post-std clear-block\">\n<div class=\"post-date\"><span class=\"ext\" style=\"font-weight: bold; color: #ffffff;\">1 ANO<\/span><\/div>\n<div class=\"post-info\" style=\"color: #bbbbbb;\"><span class=\"a\">by\u00a0<a style=\"font-weight: bold; color: #999999;\" title=\"Posts by Diogo Germano\" href=\"http:\/\/www.biblionerd.com.br\/blog\/author\/Diogo%20Germano\/\" rel=\"author\">Diogo Germano<\/a>\u00a0<\/span>in\u00a0<a style=\"font-weight: bold; color: #999999;\" title=\"Ver todos os posts em Linux\" href=\"http:\/\/www.biblionerd.com.br\/blog\/category\/linux\/\" rel=\"category tag\">Linux<\/a>,\u00a0<a style=\"font-weight: bold; color: #999999;\" title=\"Ver todos os posts em Xen\" href=\"http:\/\/www.biblionerd.com.br\/blog\/category\/xen\/\" rel=\"category tag\">Xen<\/a><\/div>\n<\/div>\n<div class=\"post-content clear-block\">\n<p>Voc\u00ea instalou o XenServer e agora deseja que a VM inicie automaticamente no boot, segundo a Citrix essa op\u00e7\u00e3o foi desativada e n\u00e3o pode mais ser executada no XenCenter, portanto ser\u00e1 necess\u00e1rio ir para o shell e executar os comandos abaixo:<\/p>\n<p>1. Habilitando o ligamento autom\u00e1tico (n\u00edvel Pool)<br \/>\n<strong>#xe pool-param-set uuid=[uuid-pool] other-config:auto_poweron=true<br \/>\n<\/strong><\/p>\n<p>2. Habilitando o ligamento autom\u00e1tico por m\u00e1quina virtual VM<br \/>\n<strong>#xe vm-param-set uuid=[uuid-pool] other-config:auto_poweron=true<br \/>\n<\/strong><\/p>\n<p>Para localizar o UUID da VM execute:<br \/>\n<strong>#xe vm-list<\/strong><\/p>\n<\/div>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<h3 id=\"post-bodys-7507174437056650395\" class=\"post-title entry-title\">Dicas XEN &#8211; Comando CLI xenserver<\/h3>\n<h2 style=\"color: #000000;\"><span id=\"Listar_todas_VMS\" class=\"mw-headline\">1 Listar todas VMS<\/span><\/h2>\n<pre> # xe vm-list\n  uuid ( RO)           : 30ecba2c-1656-c131-5360-e62cc35330fb\n       name-label ( RW): TS\n      power-state ( RO): running\n  \n  \n  uuid ( RO)           : 0705326d-a545-fd79-2495-e67a2228e7f4\n       name-label ( RW): FOM\n      power-state ( RO): halted\n  \n  \n  uuid ( RO)           : 29f337f7-4010-72f0-ffb8-f41d2d9c6570\n       name-label ( RW): Focco 11G base teste\n      power-state ( RO): running\n  \n  \n  uuid ( RO)           : 25f4a01a-946f-acdd-44e3-eb6577e75e9c\n       name-label ( RW): Focco Web\n      power-state ( RO): running\n  \n  \n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"Listar_VMs_rodando\" class=\"mw-headline\">2 Listar VMs rodando<\/span><\/h2>\n<pre> xe vm-list power-state=running\n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"Listar_Vms_desligadas\" class=\"mw-headline\">3 Listar Vms desligadas<\/span><\/h2>\n<pre>  xe vm-list power-state=halted\n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"For.C3.A7ar_reboot_da_VM\" class=\"mw-headline\">4 For\u00e7ar reboot da VM<\/span><\/h2>\n<pre> xe vm-reset-powerstate --force uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c \n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"Reboot_VM\" class=\"mw-headline\">5 Reboot VM<\/span><\/h2>\n<pre> xe vm-reboot uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c \n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"Desligar_VM\" class=\"mw-headline\">6 Desligar VM<\/span><\/h2>\n<pre> xe vm-shutdown --force uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c \n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"Pausar_VM\" class=\"mw-headline\">7 Pausar VM<\/span><\/h2>\n<pre> xe vm-pause uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c \n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"Iniciar_VM\" class=\"mw-headline\">8 Iniciar VM<\/span><\/h2>\n<pre>  xe start uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c \n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"VM_Presa\" class=\"mw-headline\">9 VM Presa<\/span><\/h2>\n<p>Algumas vezes, temos o problema de uma VM fica totalmente travada, sem resposta a nenhuma a\u00e7\u00e3o, nem ao reboot, nem ao desligamento, isso pode ter ocorrido, por algum repositorio de ISO que esteja offline, com isso a VM fica travada&#8230; doidera. Para resolver isso, force o desligamento da mesma, e remova a midia da mesma. Correto, por\u00e9m a VM n\u00e3o desliga, cara o que eu vou fazer????<\/p>\n<ul>\n<li>Listar tarefas pendentes<\/li>\n<\/ul>\n<pre>  xe task-list\n<\/pre>\n<ul>\n<li>Cancelar uma tarefa<\/li>\n<\/ul>\n<pre>  xe task-cancel --force uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c \n<\/pre>\n<ul>\n<li>Mesmo assim ela n\u00e3o esta reiniciando o que fazer??? For\u00e7a a reinicializa\u00e7\u00e3o de todas tarefas agendadas<\/li>\n<\/ul>\n<pre> xe-toolstack-restart\n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"VM_iniciar_automaticamente\" class=\"mw-headline\">10 VM iniciar automaticamente<\/span><\/h2>\n<pre> xe vm-param-set uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c other-config:auto_poweron=true \n<\/pre>\n<h2 style=\"color: #000000;\"><span id=\"TOP_das_vms\" class=\"mw-headline\">11 TOP das vms<\/span><\/h2>\n<pre> xentop<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>http:\/\/www.biblionerd.com.br\/blog\/tag\/xen\/<\/p>\n<p>http:\/\/marcoscarraro.blogspot.com.br\/2012\/09\/dicas-xen-comando-cli-xenserver.html<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Como finalizar uma VM travada no XenServer Sua VM travou e voc\u00ea n\u00e3o quer reiniciar o servidor para liberar a tarefa que n\u00e3o desliga, essa dica servir\u00e1 para desligar a VM que est\u00e1 travada. Primeiro passo \u00e9 saber o uuid da VM que est\u00e1 travada,&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_angie_page":false,"page_builder":"","footnotes":""},"categories":[17],"tags":[],"class_list":["post-2862","post","type-post","status-publish","format-standard","hentry","category-xen"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=2862"}],"version-history":[{"count":0,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2862\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=2862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=2862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=2862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}