Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-ganeti
Commits
3be34f57
Commit
3be34f57
authored
Jan 29, 2009
by
Guido Trotter
Browse files
KVM: advise about VNC support on GetShellCommand
Reviewed-by: iustinp
parent
8470c8db
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/hypervisor/hv_kvm.py
View file @
3be34f57
...
...
@@ -621,6 +621,17 @@ class KVMHypervisor(hv_base.BaseHypervisor):
utils
.
ShellQuote
(
cls
.
_InstanceSerial
(
instance
.
name
))))
else
:
shell_command
=
"echo 'No serial shell for instance %s'"
%
instance
.
name
vnc_bind_address
=
hvparams
[
constants
.
HV_VNC_BIND_ADDRESS
]
if
vnc_bind_address
:
if
instance
.
network_port
>
constants
.
HT_HVM_VNC_BASE_PORT
:
display
=
instance
.
network_port
-
constants
.
HT_HVM_VNC_BASE_PORT
vnc_command
=
(
"echo 'Instance has VNC listening on %s:%d"
" (display: %d)'"
%
(
vnc_bind_address
,
instance
.
network_port
,
display
))
shell_command
=
"%s; %s"
%
(
vnc_command
,
shell_command
)
return
shell_command
def
Verify
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment