By:
Marcos
on 9/26/2012 10:18:00 AM
1 Listar todas VMS
# xe vm-list
uuid ( RO) : 30ecba2c-1656-c131-5360-e62cc35330fb
name-label ( RW): TS
power-state ( RO): running
uuid ( RO) : 0705326d-a545-fd79-2495-e67a2228e7f4
name-label ( RW): FOM
power-state ( RO): halted
uuid ( RO) : 29f337f7-4010-72f0-ffb8-f41d2d9c6570
name-label ( RW): Focco 11G base teste
power-state ( RO): running
uuid ( RO) : 25f4a01a-946f-acdd-44e3-eb6577e75e9c
name-label ( RW): Focco Web
power-state ( RO): running
2 Listar VMs rodando
xe vm-list power-state=running
3 Listar Vms desligadas
xe vm-list power-state=halted
4 Forçar reboot da VM
xe vm-reset-powerstate --force uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c
5 Reboot VM
xe vm-reboot uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c
6 Desligar VM
xe vm-shutdown --force uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c
7 Pausar VM
xe vm-pause uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c
8 Iniciar VM
xe start uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c
9 VM Presa
Algumas vezes, temos o problema de uma VM fica totalmente travada,
sem resposta a nenhuma ação, nem ao reboot, nem ao desligamento, isso
pode ter ocorrido, por algum repositorio de ISO que esteja offline, com
isso a VM fica travada... doidera. Para resolver isso, force o
desligamento da mesma, e remova a midia da mesma. Correto, porém a VM
não desliga, cara o que eu vou fazer????
xe task-list
xe task-cancel --force uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c
- Mesmo assim ela não esta reiniciando o que fazer??? Força a reinicialização de todas tarefas agendadas
xe-toolstack-restart
10 VM iniciar automaticamente
xe vm-param-set uuid=25f4a01a-946f-acdd-44e3-eb6577e75e9c other-config:auto_poweron=true
11 TOP das vms
xentop
Se mesmo assim nao conseguir derrubar a vm com o erro(aconteceu comigo xenserver 6.1.0): domain still exists
ResponderExcluirSegue esquema abaixo:
The operation could not be performed because a domain still exists for the specified VM
Posted: 15/07/2011 14:45 in response to: webmaster@dawne...
4 users found this post useful
That's correct, Thanks Kirk!
Here's the simplified answer from the post that Kirk reffered me to.
1 - "xe vm-list" to get the uuid of the VM that is hung
2 - "list_domains" to list the domain uuid's so you can determine
the domain # of the VM above by matching the uuids from this output with
the uuid for your VM from the previous command.
3 - "/opt/xensource/debug/destroy_domain -domid XX" where XX is the domain number from the previous command
4 - "xe vm-reboot uuid=XXXX --force" where XXXX is the uuid from the first vm-list command for your VM. (name-label may work but didn't work this time for me so I used the uuid)
Your VM will be back up running now in most cases. (I use this for my HVMs that hang so I don't have to reboot the host server)