Advertisement
Guest User

Untitled

a guest
Jan 27th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. * **Para modificar vms KVM em execução podemos usar o virsh.**
  2.  
  3. * **Para o virsh se conectar ao "kvm" (libvirt) será necessário criar uma credencial no libvirt:**
  4. ```
  5. # saslpasswd2 -a libvirt glichti
  6. ```
  7.  
  8. * **Para verificar as credenciais já existentes:**
  9. ```
  10. # sasldblistusers2 -f /etc/libvirt/passwd.db
  11. glichti@kvm-server: userPassword
  12. ```
  13.  
  14. # Usando o virsh:
  15. * **Conectando ao KVM(Libvirt)**
  16. ```
  17. # virsh
  18. virsh # connect
  19. Please enter your authentication name: glichti
  20. Please enter your password:
  21. ```
  22.  
  23. * **Listando VMs**
  24. ```
  25. virsh # list
  26. Id Name State
  27. ----------------------------------------------------
  28. 8 MQUEUE running
  29. 10 NGINX running
  30. ```
  31.  
  32. * **Verificando a configuração atual do VNC de uma VM:**
  33. ```
  34. virsh # qemu-monitor-command MQUEUE --hmp 'info vnc'
  35. Server:
  36. address: 0.0.0.0:5902
  37. auth: vnc
  38. Client: none
  39. ```
  40.  
  41. * **Desabilitando o vnc da VM**
  42. ```
  43. virsh # qemu-monitor-command MQUEUE --hmp 'change vnc none'
  44. virsh # qemu-monitor-command MQUEUE --hmp 'info vnc'
  45. Server: disabled
  46. ```
  47.  
  48. * **Habilitando o VNC da VM sem senha:**
  49. ```
  50. virsh # qemu-monitor-command MQUEUE --hmp 'change vnc :2'
  51. virsh # qemu-monitor-command MQUEUE --hmp 'info vnc'
  52. Server:
  53. address: 0.0.0.0:5902
  54. auth: none
  55. Client: none
  56. ```
  57.  
  58. * **Listando clientes conectados ao vnc:**
  59. ```
  60. virsh # qemu-monitor-command MQUEUE --hmp 'info vnc'
  61. Server:
  62. address: 0.0.0.0:5902
  63. auth: none
  64. Client:
  65. address: 127.0.0.1:45617
  66. x509_dname: none
  67. username: none
  68. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement