HP BL680c XenServer Virtual Machine Installation 4.1.0 - Page 28

Firewall settings, 4.8.1.4. VNC screen resolution, For Red Hat Linux 4 and 5, use

Page 28 highlights

Installing Linux VMs 0=VNC • If you are using Red Hat Linux 5 or greater, you will need to add the above line just below the [servers] section and before the [server-VNC] section. 4. Save and close the file. Restart GDM for your change in configuration to take effect, by running /usr/sbin/gdm-restart. Note that, for Red Hat Linux, runlevel 5 is used for graphical startup. If your installation is configured to start up in runlevel 3, you will need to change this in order for the display manager to be started (and therefore to get access to a graphical console). Please refer to Section 4.8.4, "Checking runlevels" for further details. 4.8.1.3. Firewall settings The firewall configuration by default does not allow VNC to traffic to go through. If you have a firewall between the VM and XenCenter, you need to allow traffic over the port that the VNC connection uses. By default, a VNC server listens for connections from a VNC viewer on TCP port 5900 + N, where N is the display number (usually just zero). So a VNC server setup for Display-0 will listen on TCP port 5900, Display-1 is TCP-5901, etc. Consult your firewall documentation to make sure these ports are open. You might want to further customize your firewall configuration if you want to use IP connection tracking or limit the initiation of connections to be from one side only. Procedure 4.6. To customize Red Hat-based VMs firewall to open the VNC port 1. For Red Hat Linux 3, use redhat-config-securitylevel-tui. For Red Hat Linux 4 and 5, use system-config-securitylevel-tui. 2. Select "Customize" and add 5900 to the other ports list. Alternatively, you can disable the firewall until the next reboot by using service iptables stop, or permanently by using chkconfig iptables off. This can of course expose additional services to the outside world and reduce the overall security of your VM. 4.8.1.4. VNC screen resolution If, after connecting to a Virtual Machine with the graphical console, the screen resolution is mismatched (for example, the VM's display is too big to comfortably fit in the Graphical Console pane), you can control it by setting the VNC server's -geometry parameter as follows: 1. Open the GDM configuration file with your preferred text editor. Please refer to Section 4.8.1.1, "De- termining the location of your VNC configuration file" for information about determining the location of this file. 2. Find the [server-VNC] section you added above. 3. Edit the command line to read, for example, command=/usr/bin/Xvnc -SecurityTypes None -geometry 800x600 23

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44

Installing Linux VMs
23
0=VNC
If you are using Red Hat Linux 5 or greater, you will need to add the above line just below the
[servers]
section and before the
[server-VNC]
section.
4.
Save and close the file.
Restart GDM for your change in configuration to take effect, by running
/usr/sbin/gdm-restart
.
Note that, for Red Hat Linux, runlevel 5 is used for graphical startup. If your installation is configured to start
up in runlevel 3, you will need to change this in order for the display manager to be started (and therefore
to get access to a graphical console). Please refer to Section 4.8.4, “Checking runlevels” for further details.
4.8.1.3. Firewall settings
The firewall configuration by default does not allow VNC to traffic to go through. If you have a firewall between
the VM and XenCenter, you need to allow traffic over the port that the VNC connection uses. By default,
a VNC server listens for connections from a VNC viewer on TCP port 5900 + N, where N is the display
number (usually just zero). So a VNC server setup for Display-0 will listen on TCP port 5900, Display-1 is
TCP-5901, etc. Consult your firewall documentation to make sure these ports are open.
You might want to further customize your firewall configuration if you want to use IP connection tracking or
limit the initiation of connections to be from one side only.
Procedure 4.6. To customize Red Hat-based VMs firewall to open the VNC port
1.
For Red Hat Linux 3, use
redhat-config-securitylevel-tui
.
For Red Hat Linux 4 and 5, use
system-config-securitylevel-tui
.
2.
Select “Customize” and add
5900
to the other ports list.
Alternatively, you can disable the firewall until the next reboot by using
service iptables stop
, or perma-
nently by using
chkconfig iptables off
. This can of course expose additional services to the outside world
and reduce the overall security of your VM.
4.8.1.4. VNC screen resolution
If, after connecting to a Virtual Machine with the graphical console, the screen resolution is mismatched (for
example, the VM's display is too big to comfortably fit in the Graphical Console pane), you can control it by
setting the VNC server's
-geometry
parameter as follows:
1.
Open the GDM configuration file with your preferred text editor. Please refer to Section 4.8.1.1, “De-
termining the location of your VNC configuration file” for information about determining the location of
this file.
2.
Find the
[server-VNC]
section you added above.
3.
Edit the command line to read, for example,
command=/usr/bin/Xvnc -SecurityTypes None -geometry 800x600