Connecting VNC with virt-install in RHEL 5.4

If you have been using virt-install for a while and have update to RHEL 5.4 (Red Hat Enterprise Linux) or CentOS 5.4 then you will likely have noticed that the virt-install utility has changed its behaviour.  No longer can you simply run virt-install without any other parameters.  To run the way that the utility was run traditionally you need to use the new –prompt flag.  Easy enough.  But now graphical console information is not prompted for and if you are installing Windows you will need that graphical console.  What to do?

What is needed is the –vnc flag to turn on the VNC console.  We will also use the –vncport flag to set the port so that we can easily access our system.  Here is an example command to start our installation using the default VNC port, 5900:

virt-install –prompt –vnc –vncport=5900

Of course, if you have another process (likely another virtual machine on either Xen or KVM) using port 5900 then you will need to choose an alternative port.

Leave a comment