Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * **Para modificar vms KVM em execução podemos usar o virsh.**
- * **Para o virsh se conectar ao "kvm" (libvirt) será necessário criar uma credencial no libvirt:**
- ```
- # saslpasswd2 -a libvirt glichti
- ```
- * **Para verificar as credenciais já existentes:**
- ```
- # sasldblistusers2 -f /etc/libvirt/passwd.db
- glichti@kvm-server: userPassword
- ```
- # Usando o virsh:
- * **Conectando ao KVM(Libvirt)**
- ```
- # virsh
- virsh # connect
- Please enter your authentication name: glichti
- Please enter your password:
- ```
- * **Listando VMs**
- ```
- virsh # list
- Id Name State
- ----------------------------------------------------
- 8 MQUEUE running
- 10 NGINX running
- ```
- * **Verificando a configuração atual do VNC de uma VM:**
- ```
- virsh # qemu-monitor-command MQUEUE --hmp 'info vnc'
- Server:
- address: 0.0.0.0:5902
- auth: vnc
- Client: none
- ```
- * **Desabilitando o vnc da VM**
- ```
- virsh # qemu-monitor-command MQUEUE --hmp 'change vnc none'
- virsh # qemu-monitor-command MQUEUE --hmp 'info vnc'
- Server: disabled
- ```
- * **Habilitando o VNC da VM sem senha:**
- ```
- virsh # qemu-monitor-command MQUEUE --hmp 'change vnc :2'
- virsh # qemu-monitor-command MQUEUE --hmp 'info vnc'
- Server:
- address: 0.0.0.0:5902
- auth: none
- Client: none
- ```
- * **Listando clientes conectados ao vnc:**
- ```
- virsh # qemu-monitor-command MQUEUE --hmp 'info vnc'
- Server:
- address: 0.0.0.0:5902
- auth: none
- Client:
- address: 127.0.0.1:45617
- x509_dname: none
- username: none
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement