Difference between revisions of "KVM"
m |
|||
Line 2: | Line 2: | ||
== localhost == | == localhost == | ||
+ | |||
+ | Multiple VNC screen sessions can run on the same machine. By default each session starts at port 5900+session_number. So if you are running just one VNC screem it will usually be mapped to port 5900; the next one will be mapped to 5901; and the next one 5902 and so on. | ||
<pre> | <pre> | ||
− | ssh -N -f -L 5900: | + | ssh -N -f -L 5900:192.168.1.13:5900 username@gateway.example.com |
vncviewer AutoSelect=0 FullColor=1 localhost | vncviewer AutoSelect=0 FullColor=1 localhost | ||
</pre> | </pre> | ||
+ | |||
+ | Or like this to view VNC session 0 on the machine 192.168.1.13. | ||
+ | <pre> | ||
+ | vncviewer AutoSelect=0 FullColor=1 -via username@gateway.example.com 192.168.1.13:0 | ||
+ | </pre> | ||
+ | session 1 on the machine 192.168.1.13: | ||
+ | <pre> | ||
+ | vncviewer AutoSelect=0 FullColor=1 -via username@gateway.example.com 192.168.1.13:1 | ||
+ | </pre> | ||
+ | |||
+ | Note that when you use '''via''' the names and addresses are from the point of view of the gateway machine. So machine 192.168.1.13 on the LAN visible to the gateway machine. You could also just say '''localhost''' if you want to connect to a VNC session running on the gateway machine itself. | ||
+ | <pre> | ||
+ | vncviewer AutoSelect=0 FullColor=1 -via username@gateway.example.com localhost | ||
+ | </pre> | ||
+ | So why use '''via''' at all in that case? Why not just do this? | ||
+ | <pre> | ||
+ | vncviewer AutoSelect=0 FullColor=1 username@gateway.example.com | ||
+ | </pre> | ||
+ | Remember that we may still be going through a firewall. Firewalls rarely allow the VNC ports 5900 through. The '''via''' option says to go through SSH (port 22), which most firewalls will allow -- plus this adds SSH encryption to the session. | ||
== remote KVM server == | == remote KVM server == | ||
Line 12: | Line 33: | ||
<pre> | <pre> | ||
sudo virt-install --connect qemu:///system --name ubuntu910 --force --ram 512 --file ubuntu910.qcow2 --file-size 12 --cdrom ubuntu-9.10-desktop-i386.iso --vnc --noautoconsole --accelerate --os-type linux --os-variant generic26 | sudo virt-install --connect qemu:///system --name ubuntu910 --force --ram 512 --file ubuntu910.qcow2 --file-size 12 --cdrom ubuntu-9.10-desktop-i386.iso --vnc --noautoconsole --accelerate --os-type linux --os-variant generic26 | ||
+ | </pre> | ||
+ | |||
+ | == Error: Rect too big == | ||
+ | |||
+ | This is a bug in the vncviewer. Add these options to the command-line: <pre>AutoSelect=0 FullColor=1</pre> | ||
+ | <pre> | ||
+ | vncviewer AutoSelect=0 FullColor=1 -via username@gateway.example.com localhost:0 | ||
</pre> | </pre> |
Revision as of 12:04, 2 December 2009
localhost
Multiple VNC screen sessions can run on the same machine. By default each session starts at port 5900+session_number. So if you are running just one VNC screem it will usually be mapped to port 5900; the next one will be mapped to 5901; and the next one 5902 and so on.
ssh -N -f -L 5900:192.168.1.13:5900 username@gateway.example.com vncviewer AutoSelect=0 FullColor=1 localhost
Or like this to view VNC session 0 on the machine 192.168.1.13.
vncviewer AutoSelect=0 FullColor=1 -via username@gateway.example.com 192.168.1.13:0
session 1 on the machine 192.168.1.13:
vncviewer AutoSelect=0 FullColor=1 -via username@gateway.example.com 192.168.1.13:1
Note that when you use via the names and addresses are from the point of view of the gateway machine. So machine 192.168.1.13 on the LAN visible to the gateway machine. You could also just say localhost if you want to connect to a VNC session running on the gateway machine itself.
vncviewer AutoSelect=0 FullColor=1 -via username@gateway.example.com localhost
So why use via at all in that case? Why not just do this?
vncviewer AutoSelect=0 FullColor=1 username@gateway.example.com
Remember that we may still be going through a firewall. Firewalls rarely allow the VNC ports 5900 through. The via option says to go through SSH (port 22), which most firewalls will allow -- plus this adds SSH encryption to the session.
remote KVM server
sudo virt-install --connect qemu:///system --name ubuntu910 --force --ram 512 --file ubuntu910.qcow2 --file-size 12 --cdrom ubuntu-9.10-desktop-i386.iso --vnc --noautoconsole --accelerate --os-type linux --os-variant generic26
Error: Rect too big
This is a bug in the vncviewer. Add these options to the command-line:
AutoSelect=0 FullColor=1
vncviewer AutoSelect=0 FullColor=1 -via username@gateway.example.com localhost:0