Showing posts with label redhat6. Show all posts
Showing posts with label redhat6. Show all posts

2012-01-13

Xvnc black screen

I was configuring my workstation for remote VNC login following this blog post.
The checklist ends suggesting a reboot command.
If you don't obey, you'll only get a black screen on a VNC connection.
That seems to break the spell: no reboots under linux!

After some investigation it seems that the cause was gdm not accepting tcp connections from Xvnc.
A full reboot is not necessary, just a gdm restart:

Find the gdm instance started by init:

# ps -ef --forest

search the process tree for something like this:

root      3621     1  0 14:35 ?        00:00:00 /usr/sbin/gdm-binary -nodaemon
root      3707  3621  0 14:35 ?        00:00:00  \_ /usr/sbin/gdm-binary -nodaemon
root      3713  3707  0 14:35 tty7     00:00:00      \_ /usr/bin/Xorg :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
gdm       3734  3707  0 14:35 ?        00:00:00      \_ /usr/libexec/gdmgreeter

the parent gdm here has PID 3621

# kill -1 3621

The console X session will restart, and after that, VNC logins will work.

Update:
On RHEL/CentOS 6, you must use kill -9 to reload gdm, and the vnc-server package is called tigervnc-server

2011-12-06

P2V RedHat 6

While virtualizing a RedHat RHEL 6.2 machine, I've made a pleasent discovery: after cloning the disk, the VM booted without any initrd rebuild.
The source was an HP BL460 G7 and the target VM was created with the VSphere wizard using a typical Red Hat 6 x64 configuration: version 7 vm, paravirtual scsi, vmxnet3 networking.
The VMDK was created as big as the source physical disk.
I've followed the procedure for RedHat 5 P2V, with one notable exception: the internal disk on RedHat 6 is called /dev/sda even if it's really a SmartArray RAID drive.
After the ssh command:

# ssh root@P "cat /dev/sda | gzip -1 | cat" | gzip -d >/dev/sda

I've simply rebooted the VM and it came up on the first try.