Attempt of VNC setup on Ubuntu Hardy PV DomU at Xen 3.3 CentOS 5.2 Dom0 (all 64-bit)

Posting bellow describes setup Ubuntu Hardy PV DomU via attacment block device to Ubuntu Hardy HVM DomU at the same CentOS 5.2 Dom0. Standard debootstrap procedure has been used to create initial
image on this device. This step allows to avoid “scp” image files from remote Ubuntu HH box to Dom0 and use /dev/sda(X) with prepared image immediately on the same box,referencing the device from Ubuntu Hardy PV profile.
I’ve also attempted to install “ubuntu_desktop” on PV DomU and activate VNC. This procedure seems to have bugs during “ubuntu_desktop” install on image prepared via debootstrap. However, gnome desktop been installed
still appears to be able perform numerous useful functions.

Create Ubuntu Hardy HVM via virt-install at Xen 3.3 CentOS 5.2 Dom0 providing by Xen 3.3 port via http://www.gitco.de/repo/xen3.3.0 .It can be also done and at Xen 3.3 Dom0 been built from source via hvm-profile,e.g. not using
virt-install at all.
Disk attach block device to prepare Ubuntu PV DomU image via debootstrap.

# virsh attach-disk U8HVM –driver phy /dev/sda10 xvdb
Restart U8HVM and issue at Ubuntu HVM DomU (attached disk will be recognized as /dev/sdb) :-
# fdisk /dev/sdb
and created /dev/sdb1 – 14 GB, /dev/sdb2 – 2GB
# mkfs.ext3 /dev/sdb1
# mkswap /dev/sdb2
# mount /dev/sdb1 /mnt
# apt-get install debootstrap
# debootstrap –arch=amd64 –components=main,updates,universe,multiverse hardy /mnt \
http://ftp.iinet.net.au/pub/ubuntu

: Retrieving Release
I: Retrieving Packages
I: Validating Packages
I: Retrieving Packages
I: Validating Packages
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages…
I: Resolving dependencies of base packages…
. . . . . . . ..
I: Base system installed successfully.



# chroot /mnt
# export LANG=C

# echo deb http://ftp.iinet.net.au/pub/ubuntu hardy-updates main universe multiverse \
>>/etc/apt/sources.list
# apt-get update
# echo deb http://ftp.iinet.net.au/pub/ubuntu hardy-updates main universe multiverse >>/etc/apt/sources.list
# apt-get update
# apt-get install grub linux-image-xen



# apt-get install vim
******************
Create /etc/fstab
******************
# vi /etc/fstab
/dev/xvda1 / ext3 defaults 0 1
/dev/xvda2 none swap defaults 0 0
proc /proc proc defaults 0 0
:wq
*****************************
Create /boot/grub/menu.lst
*****************************
# vi /boot/grub/menu.lst
default 0
timeout 3
title Ubuntu 8.04, kernel 2.6.24-17-xen
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-xen root=/dev/xvda1 ro console=xvc0
initrd /boot/initrd.img-2.6.24-19-xen
:wq
***********************
Turn off the hwclock
***********************

# update-rc.d -f hwclockfirst remove
# update-rc.d -f hwclock remove
# rm /etc/udev/rules.d/85-hwclock.rules
# cat /etc/event.d/tty1 | sed -e “s/tty1/xvc0/g” >/etc/event.d/xvc0
# vi /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
:wq

Setup our hosts file

echo “127.0.0.1 localhost” >/etc/hosts
echo “ubuntupvm” >/etc/hostname

# exit (chroot environment)

**************************************************
Image created on /dev/sda10 is ready to go
**************************************************
Shutdown Ubuntu HVM DomU and procced in Dom0

[root@ServerCentOS52 vm]# vi UB8PV.cfg
memory = 2048
name = “UBUNTU8PVM”
vif = [ ‘mac=00:16:3e:00:00:00’ ]
disk = [ ‘phy:/dev/sda10,xvda,w!’]
:wq

# xm create -c UB8PV.cfg



Started domain UBUNTU8PVM
[ 0.000000] Linux version 2.6.24-19-xen (buildd@king) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Aug 20 21:08:51 UTC 2008 (Ubuntu 2.6.24-4.6-generic)
[ 0.000000] Command line: root=/dev/xvda1 ro console=xvc0
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] Xen: 0000000000000000 – 0000000080800000 (usable)
[ 0.000000] end_pfn_map = 526336
[30079.150230] Zone PFN ranges:
[30079.150231] DMA 0 -> 4096
[30079.150232] DMA32 4096 -> 1048576
[30079.150233] Normal 1048576 -> 1048576
[30079.150234] Movable zone start PFN for each node
[30079.150234] early_node_map[1] active PFN ranges
[30079.150235] 0: 0 -> 526336
[30079.177774] No mptable found.
[30079.181963] PERCPU: Allocating 22368 bytes of per cpu data
[30079.181978] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 519140
[30079.181980] Kernel command line: root=/dev/xvda1 ro console=xvc0
[30079.182291] Initializing CPU#0
[30079.182459] PID hash table entries: 4096 (order: 12, 32768 bytes)
[30079.182494] Xen reported: 3005.554 MHz processor.
[ 0.091808] console [xvc0] enabled
[ 0.091834] Console: colour dummy device 80×25
[ 0.092405] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.092828] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.092956] Software IO TLB disabled
[ 0.105766] Memory: 2028220k/2105344k available (2531k kernel code, 68260k reserved, 1329k data, 220k init)
[ 0.171820] Calibrating delay using timer specific routine.. 6013.05 BogoMIPS (lpj=12026118)
[ 0.171848] Security Framework initialized
[ 0.171854] SELinux: Disabled at boot.
[ 0.171860] AppArmor: AppArmor initialized
[ 0.171863] Failure registering capabilities with primary security module.
[ 0.171872] Mount-cache hash table entries: 256
[ 0.171968] , L1 D cache: 32K
[ 0.171972] CPU: Physical Processor ID: 0
[ 0.171973] CPU: Processor Core ID: 0
[ 0.171978] SMP alternatives: switching to UP code
[ 0.172586] Freeing SMP alternatives: 23k freed
[ 0.172669] Early unpacking initramfs… done
[ 0.185547] Brought up 1 CPUs
[ 0.185864] net_namespace: 120 bytes
[ 0.185867] failed to set up cpufreq notifier
[ 0.203850] Time: 165:165:165 Date: 165/165/65
[ 0.203869] NET: Registered protocol family 16
[ 0.205053] Brought up 1 CPUs
[ 0.205417] PCI: Fatal: No config space access function found
[ 0.205420] PCI: setting up Xen PCI frontend stub
[ 0.205752] ACPI: Interpreter disabled.
[ 0.205755] Linux Plug and Play Support v0.97 (c) Adam Belay
[ 0.205773] pnp: PnP ACPI: disabled
[ 0.205912] xen_mem: Initialising balloon driver.
[ 0.206725] Setting mem allocation to 2097152 kiB
[ 0.206825] PCI: System does not support PCI
[ 0.206828] PCI: System does not support PCI
[ 0.214096] NET: Registered protocol family 8
[ 0.214098] NET: Registered protocol family 20
[ 0.214134] AppArmor: AppArmor Filesystem Enabled
[ 0.214365] NET: Registered protocol family 2
[ 0.218076] Time: xen clocksource has been installed.
[ 0.250108] IP route cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.250289] TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
[ 0.251214] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[ 0.251501] TCP: Hash tables configured (established 262144 bind 65536)
[ 0.251504] TCP reno registered
[ 0.262163] checking if image is initramfs… it is
[ 0.275755] Freeing initrd memory: 22904k freed
[ 0.282019] audit: initializing netlink socket (disabled)
[ 0.282035] audit(1223647670.747:1): initialized
[ 0.282255] VFS: Disk quotas dquot_6.5.1
[ 0.282268] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.282315] io scheduler noop registered
[ 0.282317] io scheduler anticipatory registered
[ 0.282318] io scheduler deadline registered
[ 0.282322] io scheduler cfq registered (default)
[ 0.282452] Xen virtual console successfully installed as xvc0
[ 0.282482] Event-channel device installed.
[ 0.285899] Successfully initialized TPM backend driver.
[ 0.287201] netfront: Initialising virtual ethernet driver.
[ 0.302785] rtc: IRQ 8 is not free.
[ 0.302829] Linux agpgart interface v0.102
[ 0.303154] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
[ 0.303191] input: Macintosh mouse button emulation as /devices/virtual/input/input0
[ 0.303255] PNP: No PS/2 controller found. Probing ports directly.
[ 0.304072] i8042.c: No controller found.
[ 0.304304] xen-vbd: registered block device major 202
[ 0.304489] xvda:mice: PS/2 mouse device common for all mice
[ 0.306361] cpuidle: using governor ladder
[ 0.306402] NET: Registered protocol family 1
[ 0.306434] registered taskstats version 1
[ 0.313705] xvda1 xvda2
[ 0.406006] XENBUS: Device with no driver: device/console/0
[ 0.406016] Magic number: 1:252:3141
[ 0.406076] /build/buildd/linux-2.6.24/debian/build/custom-source-xen/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 0.406083] Freeing unused kernel memory: 220k freed
Loading, please wait…
Begin: Loading essential drivers… …
[ 0.593008] thermal: Unknown symbol acpi_processor_set_thermal_limit
Done.
Begin: Running /scripts/init-premount …
Done.
Begin: Mounting root file system… …
Begin: Running /scripts/local-top …
Done.
Begin: Waiting for root file system… …
Done.
Begin: Running /scripts/local-premount …
Done.
[ 0.863440] kjournald starting. Commit interval 5 seconds
[ 0.863433] EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/local-bottom …
Done.
Done.
Begin: Running /scripts/init-bottom …
Done.
init: /etc/event.d/xvc0:31: Duplicate value
* Reading files needed to boot… [ OK ]
* Setting preliminary keymap… [ OK ]
* Setting the system clock
Cannot access the Hardware Clock via any known method.
Use the –debug option to see the details of our search for an access method.
* Unable to set System Clock to: Fri Oct 10 14:07:54 UTC 2008
* Starting basic networking… [ OK ]
* Starting kernel event manager… [ OK ]
* Loading hardware drivers… [ OK ]
* Setting the system clock
Cannot access the Hardware Clock via any known method.
Use the –debug option to see the details of our search for an access method.
* Unable to set System Clock to: Fri Oct 10 14:07:55 UTC 2008
* Loading kernel modules… * Loading manual drivers… [ OK ]
* Setting kernel variables… [ OK ]
* Activating swap… [ OK ]
* Checking root file system… fsck 1.40.8 (13-Mar-2008)
/dev/xvda1: clean, 104816/905760 files, 692564/3614617 blocks
[ OK ]
* Checking file systems… fsck 1.40.8 (13-Mar-2008)
[ OK ]
* Mounting local filesystems… [ OK ]
* Activating swapfile swap… [ OK ]
* Checking minimum space in /tmp… [ OK ]
* Configuring network interfaces… [ OK ]
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
* Starting system log daemon… [ OK ]
* Doing Wacom setup… cat: */id: No such file or directory
[ OK ]
* Starting kernel log daemon… [ OK ]
* Starting system message bus dbus [ OK ]
* Starting System Tools Backends system-tools-backends [ OK ]
* Starting OpenBSD Secure Shell server sshd [ OK ]
* Starting Avahi mDNS/DNS-SD Daemon avahi-daemon [ OK ]
* Starting Common Unix Printing System: cupsd [ OK ]
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
* Starting powernowd… * CPU frequency scaling not supported… [ OK ]
* Starting internet superserver xinetd [ OK ]
* Starting DHCP D-Bus daemon dhcdbd [ OK ]
* Starting Hardware abstraction layer hald [ OK ]
* Starting bluetooth [ OK ]
* Starting GNOME Display Manager… [ OK ]
* Starting anac(h)ronistic cron anacron [ OK ]
* Checking battery state… /dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
[ OK ]
* Running local boot scripts (/etc/rc.local) [ OK ]

Ubuntu 8.04 ubuntupvm xvc0

ubuntupvm login: * Reloading OpenBSD Secure Shell server’s configuration sshd

Ubuntu 8.04 ubuntupvm xvc0

ubuntupvm login:

Last login: Fri Oct 10 14:05:12 UTC 2008 on xvc0
Linux ubuntupvm 2.6.24-19-xen #1 SMP Wed Aug 20 21:08:51 UTC 2008 x86_64

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
root@ubuntupvm:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 14G 2.6G 11G 20% /
varrun 1.1G 84K 1.1G 1% /var/run
varlock 1.1G 0 1.1G 0% /var/lock
udev 1.1G 16K 1.1G 1% /dev
devshm 1.1G 0 1.1G 0% /dev/shm

**********************************************************
Atempt to install VNC at Ubuntu Hardy PV DomU
**********************************************************
# apt-get install ubuntu_desktop ( every time with certain issues)

What causes latter enrties :-
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address

to appear in start up log, otherwise everything goes fine.

# apt-get remove NetworkManager
# apt-get install vnc4server xinetd

# vi /etc/gdm/gdm.conf
Uncomment this line
Code:

RemoteGreeter=/usr/lib/gdm/gdmlogin

Enable xdmcp, look for [xdmcp] and change Enable to true.
Code:

[xdmcp]
Enable=true
*****************
Restart gdm
*****************
Code:
# /etc/init.d/gdm restart
Setup xinetd
*****************************************
Create a new service file for xinetd
*****************************************
# vi /etc/xinetd.d/Xvnc
service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -cc 3 -once -SecurityTypes=none -extension XFIXES
port = 5901
}
******************
Restart xinetd
******************
# /etc/init.d/xinetd restart

root@ubuntupvm:~# shutdown -P now

Broadcast message from root@ubuntupvm
(/dev/xvc0) at 14:13 …

The system is going down for power off NOW!
* Stopping GNOME Display Manager… [ OK ]
* Stopping DHCP D-Bus daemon dhcdbd [ OK ]
* Stopping Avahi mDNS/DNS-SD Daemon avahi-daemon [ OK ]
* Stopping internet superserver xinetd [ OK ]
* Saving the system clock
Cannot access the Hardware Clock via any known method.
Use the –debug option to see the details of our search for an access method.
* Shutting down ALSA… [ OK ]
* Unmounting any overflow tmpfs from /tmp… [ OK ]
* Terminating all remaining processes… [ OK ]
* Sending all processes the KILL signal… [ OK ]
* Deactivating swap… [ OK ]
* Unmounting local filesystems… [ OK ]
* Will now halt
halt: Unable to iterate IDE devices: No such file or directory
[ 363.787526] System halted.
*******************************************
When connect via vncviewer from Dom0,
get following error.
*******************************************




However, Gnome still allows to perform numerous functions. For example:-









Regardless issue with with starting Gnome Setting Daemon, desktop allows to surf the Net, work with Open Ofice,operate with windows network shares on the LAN and etc.
********************
Update 10/24/08
********************
To fix the issue with Gnome Settings Daemon run :-
# gconf-editor
and disable mouse and keyboard plugins.



References.
http://www.opensolaris.org/jive/thread.jspa?threadID=62436&tstart=0

One Response to Attempt of VNC setup on Ubuntu Hardy PV DomU at Xen 3.3 CentOS 5.2 Dom0 (all 64-bit)

  1. […] Driver at Dom0) and reboot. Set up VNC at Ubuntu Hardy PV DOMU per [1]:- References 1.Attempt of VNC setup on Ubuntu Hardy PV DomU at Xen 3.3 CentOS 5.2 Dom0 (all 64-bit) Possibly related posts: (automatically generated)Setting Router Untuk WarnetCara Setting […]

Leave a comment