feat(xo-server): respect disabled setting for VM console

See #6319
This commit is contained in:
Julien Fontanet 2022-09-02 11:32:57 +02:00
parent 8c14906a60
commit 6cbce81faa
2 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@
- [Dashboard/Health] Detect broken VHD chains and display missing parent VDIs (PR [#6356](https://github.com/vatesfr/xen-orchestra/pull/6356))
- [Proxy] Ability to bind a licence to an existing proxy (PR [#6348](https://github.com/vatesfr/xen-orchestra/pull/6348))
- [Backup] Implement encryption for backup files on storage (PR [#6321](https://github.com/vatesfr/xen-orchestra/pull/6321))
- [VM/Console] Don't connect if the [console is disabled](https://support.citrix.com/article/CTX217766/how-to-disable-the-console-for-the-vm-in-xencenter) [#6319](https://github.com/vatesfr/xen-orchestra/issues/6319)
### Bug fixes

View File

@ -382,6 +382,10 @@ export default class Xapi extends XapiBase {
getVmConsole(vmId) {
const vm = this.getObject(vmId)
if (vm.other_config.disable_pv_vnc === '1') {
throw new Error('console is disabled for this VM')
}
const console = find(vm.$consoles, { protocol: 'rfb' })
if (!console) {
throw new Error('no RFB console found')