Pygrub&Loading Ubuntu Intrepid Server PV DomU via serial console at Xen 3.3 CentOS 5.2 Dom0

October 30, 2008

To load Ubuntu Intrepid Server PV DomU via serial console files vmlinuz-2.6.27-7-server,initrd.img-2.6.27-7-server usually get copied to Xen 3.3 Dom0 and parameters root=”/dev/xvda1 ro”, extra=”2 hvc0″ are included into startup profile. In general , created profile should look like:-

[root@ServerCentOS52 vm]# cat intrepid.conf
memory = 4096
name = “IntrepidPV”
kernel=”/etc/xen/vm/vmlinuz-2.6.27-7-server”
ramdisk=”/etc/xen/vm/initrd.img-2.6.27-7-server”
root=”/dev/xvda1 ro”
extra = ‘2 console=hvc0′
vif = [ 'mac=00:16:3e:00:00:00' ]
disk = [ 'phy:/dev/sdb14,xvda,w']

At the same time “root” & “extra” may be specified via new entry into /boot/grub/menu.lst located at DomU. File /etc/event.d/tty1 should be also modified to work for xen console instead of vfb.
It’s exec line has to reference hvc0 instead of tty1. All changes above been done at DomU allow to load DomU via pygrub and serial console avoiding using virtual frame buffer. First virt-install Ubuntu Intrepid Server HVM DomU and create a new entry into /boot/grub/menu.lst :-

title Ubuntu 8.10 (hvc0) , kernel 2.6.27-7-server
kernel /boot/vmlinuz-2.6.27-7-server root=/dev/xvda1 ro 2 console=hvc0
initrd /boot/initrd.img-2.6.27-7-server
quiet

Next modify /etc/event.d/tty1 as follows

# cat /etc/event.d/tty1
# tty1 – getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /sbin/getty 38400 hvc0

Create following pygrub profile at Xen 3.3 CentOS 5.2 Dom0

[root@ServerCentOS52 vm]# cat intrepid.py
memory = 4096
name = “IntrepidPV”
bootloader=”/usr/bin/pygrub”
vif = [ 'mac=00:16:3e:00:00:00' ]
disk = [ 'phy:/dev/sdb14,xvda,w!']

Start Ubuntu Intrepid Server PV DomU via command line :-

# xm create -c intrepid.py



Started domain IntrepidPVC
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.27-7-server (buildd@yellow) (gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu10) ) #1 SMP Fri Oct 24 07:20:47 UTC 2008 (Ubuntu 2.6.27-7.14-server)
[ 0.000000] Command line: root=/dev/xvda1 ro 2 console=hvc0
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] ACPI in unprivileged domain disabled
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] Xen: 0000000000000000 – 00000000000a0000 (usable)
[ 0.000000] Xen: 00000000000a0000 – 0000000000100000 (reserved)
[ 0.000000] Xen: 0000000000100000 – 000000000241e000 (usable)
[ 0.000000] Xen: 000000000241e000 – 0000000002c21000 (reserved)
[ 0.000000] Xen: 0000000002c21000 – 0000000100000000 (usable)
[ 0.000000] last_pfn = 0x100000 max_arch_pfn = 0x3ffffffff
[ 0.000000] init_memory_mapping
[ 0.000000] last_map_addr: 100000000 end: 100000000
[ 0.000000] RAMDISK: 008b7000 – 0241e000
[ 0.000000] DMI not present or invalid.
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at 0000000000000000-0000000100000000
[ 0.000000] Bootmem setup node 0 0000000000000000-0000000100000000
[ 0.000000] NODE_DATA [0000000000001000 - 0000000000005fff]
[ 0.000000] bootmap [0000000000008000 - 0000000000027fff] pages 20
[ 0.000000] (6 early reservations) ==> bootmem [0000000000 - 0100000000]
[ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
[ 0.000000] #1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000]
[ 0.000000] #2 [0002c21000 - 0002c3c000] XEN PAGETABLES ==> [0002c21000 - 0002c3c000]
[ 0.000000] #3 [0000200000 - 00008b6f9c] TEXT DATA BSS ==> [0000200000 - 00008b6f9c]
[ 0.000000] #4 [00008b7000 - 000241e000] RAMDISK ==> [00008b7000 - 000241e000]
[ 0.000000] #5 [0002c3c000 - 0003423000] PGTABLE ==> [0002c3c000 - 0003423000]
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0x00000000 -> 0x00001000
[ 0.000000] DMA32 0x00001000 -> 0x00100000
[ 0.000000] Normal 0x00100000 -> 0x00100000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[3] active PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x000000a0
[ 0.000000] 0: 0x00000100 -> 0x0000241e
[ 0.000000] 0: 0x00002c21 -> 0x00100000
[ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] No local APIC present
[ 0.000000] PM: Registered nosave memory: 00000000000a0000 – 0000000000100000
[ 0.000000] PM: Registered nosave memory: 000000000241e000 – 0000000002c21000
[ 0.000000] PCI: Warning: Cannot find a gap in the 32bit address range
[ 0.000000] PCI: Unassigned devices with 32bit resource registers may break!
[ 0.000000] Allocating PCI resources starting at 100200000 (gap: 100100000:400000)
[ 0.000000] PERCPU: Allocating 64928 bytes of per cpu data
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 1028324
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: root=/dev/xvda1 ro 2 console=hvc0
[ 0.000000] Initializing CPU#0
[ 0.000000] PID hash table entries: 4096 (order: 12, 32768 bytes)
[ 0.000000] Detected 3005.554 MHz processor.
[ 0.010000] Console: colour dummy device 80×25
[ 0.010000] console [tty0] enabled
[ 0.010000] console [hvc0] enabled
[ 0.010000] Checking aperture…
[ 0.010000] No AGP bridge found
[ 0.010000] Memory: 4076624k/4194304k available (3110k kernel code, 109092k reserved, 1573k data, 536k init)
[ 0.010000] SLUB: Genslabs=13, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.010000] installing Xen timer for CPU 0
[ 0.010000] Calibrating delay loop (skipped), value calculated using timer frequency.. 6011.10 BogoMIPS (lpj=30055540)
[ 0.010000] Security Framework initialized
[ 0.010000] SELinux: Disabled at boot.
[ 0.010000] AppArmor: AppArmor initialized
[ 0.010000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[ 0.010000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.010000] Mount-cache hash table entries: 256
[ 0.010000] Initializing cgroup subsys ns
[ 0.010000] Initializing cgroup subsys cpuacct
[ 0.010000] Initializing cgroup subsys memory
[ 0.010000] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 0.010000] CPU: L2 cache: 6144K
[ 0.010000] CPU 0/0 -> Node 0
[ 0.010000] CPU: Physical Processor ID: 0
[ 0.010000] CPU: Processor Core ID: 0
[ 0.010000] SMP alternatives: switching to UP code
[ 0.016819] Freeing SMP alternatives: 24k freed
[ 0.016873] cpu 0 spinlock event irq 1
[ 0.016934] Brought up 1 CPUs
[ 0.017188] net_namespace: 1552 bytes
[ 0.017194] Booting paravirtualized kernel on Xen
[ 0.017198] Xen version: 3.3.0 (preserve-AD)
[ 0.017297] Grant table initialized
[ 0.037323] Time: 165:165:165 Date: 165/165/65
[ 0.037347] NET: Registered protocol family 16
[ 0.037569] PCI: Fatal: No config space access function found
[ 0.037569] ACPI: Interpreter disabled.
[ 0.037569] Linux Plug and Play Support v0.97 (c) Adam Belay
[ 0.037569] pnp: PnP ACPI: disabled
[ 0.037569] xen_balloon: Initialising balloon driver.
[ 0.037569] PCI: System does not support PCI
[ 0.037569] PCI: System does not support PCI
[ 0.070047] NET: Registered protocol family 8
[ 0.070052] NET: Registered protocol family 20
[ 0.070085] NetLabel: Initializing
[ 0.070089] NetLabel: domain hash size = 128
[ 0.070092] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.070105] NetLabel: unlabeled traffic allowed by default
[ 0.070110] PCI-GART: No AMD northbridge found.
[ 0.070433] tracer: 1286 pages allocated for 65536 entries of 80 bytes
[ 0.070437] actual entries 65586
[ 0.070503] AppArmor: AppArmor Filesystem Enabled
[ 0.070895] NET: Registered protocol family 2
[ 0.160184] IP route cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.161365] TCP established hash table entries: 524288 (order: 11, 8388608 bytes)
[ 0.164014] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[ 0.164527] TCP: Hash tables configured (established 524288 bind 65536)
[ 0.164532] TCP reno registered
[ 0.190084] NET: Registered protocol family 1
[ 0.190167] checking if image is initramfs… it is
[ 0.208809] Freeing initrd memory: 28060k freed
[ 0.217885] platform rtc_cmos: registered platform RTC device (no PNP device found)
[ 0.218191] audit: initializing netlink socket (disabled)
[ 0.218206] type=2000 audit(1225392379.174:1): initialized
[ 0.222493] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.224779] VFS: Disk quotas dquot_6.5.1
[ 0.224856] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.224950] msgmni has been set to 8246
[ 0.225049] io scheduler noop registered
[ 0.225053] io scheduler anticipatory registered
[ 0.225057] io scheduler deadline registered (default)
[ 0.225174] io scheduler cfq registered
[ 0.252707] Linux agpgart interface v0.103
[ 0.252717] Serial: 8250/16550 driver4 ports, IRQ sharing enabled
[ 0.254426] brd: module loaded
[ 0.254485] input: Macintosh mouse button emulation as /devices/virtual/input/input0
[ 0.254632] PNP: No PS/2 controller found. Probing ports directly.
[ 0.255454] i8042.c: No controller found.
[ 0.270626] mice: PS/2 mouse device common for all mice
[ 0.270673] rtc_cmos: probe of rtc_cmos failed with error -16
[ 0.270747] cpuidle: using governor ladder
[ 0.270751] cpuidle: using governor menu
[ 0.270993] TCP cubic registered
[ 0.271009] IO APIC resources could be not be allocated.
[ 0.271167] registered taskstats version 1
[ 0.271177] XENBUS: Device with no driver: device/vbd/51712
[ 0.271180] XENBUS: Device with no driver: device/vif/0
[ 0.271184] XENBUS: Device with no driver: device/console/0
[ 0.271194] Magic number: 1:252:3141
[ 0.271259] /build/buildd/linux-2.6.27/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 0.271265] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 0.271269] EDD information not available.
[ 0.271289] Freeing unused kernel memory: 536k freed
[ 0.271435] Write protecting the kernel read-only data: 4344k
Loading, please wait…
Couldnt get a file descriptor referring to the console
Begin: Loading essential drivers… …
[ 0.334434] fuse init (API version 7.9)
[ 0.390929] 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… …
[ 0.641252] xvda: xvda1 xvda2
Done.
Begin: Running /scripts/local-premount …
Begin: Waiting for resume device… …
Done.
Done.
[ 6.359270] kjournald starting. Commit interval 5 seconds
[ 6.359284] EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/local-bottom …
Done.
Done.
Begin: Running /scripts/init-bottom …
Done.
* 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: Thu Oct 30 18:46:28 UTC 2008
* Starting basic networking… [ OK ]
* Starting kernel event manager… [ 10.102508] udevd version 124 started
[ OK ]
* Loading hardware drivers… [ 10.410203] input: PC Speaker as /devices/platform/pcspkr/input/input1
[ 10.473991] Initialising Xen virtual ethernet driver.
[ 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: Thu Oct 30 18:46:30 UTC 2008
* Loading kernel modules… * Loading manual drivers… [ 11.443347] loop: module loaded
[ 11.506793] lp: driver loaded but no devices found
[ OK ]
* Setting kernel variables (/etc/sysctl.conf)… [ OK ]
* Setting kernel variables (/etc/sysctl.d/10-console-messages.conf)… [ OK ]
* Setting kernel variables (/etc/sysctl.d/10-network-security.conf)… [ OK ]
* Setting kernel variables (/etc/sysctl.d/10-process-security.conf)… [ OK ]
* Setting kernel variables (/etc/sysctl.d/10-tcp-timestamps-workaround.c[ OK ]
* Setting kernel variables (/etc/sysctl.d/30-tracker.conf)… [ OK ]
* Activating swap… [ OK ]
* Checking root file system… fsck 1.41.3 (12-Oct-2008)
/dev/xvda1: clean, 108958/960992 files, 748148/3837519 blocks
[ OK ]
* Checking file systems… fsck 1.41.3 (12-Oct-2008)
[ OK ]
* Mounting local filesystems… [ OK ]
* Activating swapfile swap… [ OK ]
$Mounting securityfs on /sys/kernel/security: done.
Loading AppArmor profiles : done.
* Skipping firewall: ufw (not enabled)… [ OK ]
* Configuring network interfaces… [ OK ]
* Setting up console font and keymap… [ OK ]
* 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 Avahi mDNS/DNS-SD Daemon avahi-daemon [ OK ]
* Starting OpenBSD Secure Shell server sshd [ OK ]
* Starting Common Unix Printing System: cupsd [ OK ]
* Starting powernowd… * CPU frequency scaling not supported… [ OK ]
* Starting internet superserver xinetd [ OK ]
* Starting Hardware abstraction layer hald [ OK ]
* Starting bluetooth [ OK ]
* Starting NetworkManager… [ 23.332212]
pan0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
[ OK ]
* Starting GNOME Display Manager… [ OK ]
* Starting System Tools Backends system-tools-backends [ OK ]
* Starting anac(h)ronistic cron anacron [ OK ]
* Starting deferred execution scheduler atd [ OK ]
* Starting periodic command scheduler crond [ OK ]
* Enabling additional executable binary formats binfmt-support [ OK ]
* Checking battery state… [ OK ]

Ubuntu 8.10 INTR hvc0

INTR login: root
Password:
Last login: Thu Oct 30 14:26:52 EDT 2008 on hvc0
Linux INTR 2.6.27-7-server #1 SMP Fri Oct 24 07:20:47 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@INTR:~# uname -a
Linux INTR 2.6.27-7-server #1 SMP Fri Oct 24 07:20:47 UTC 2008 x86_64 GNU/Linux

Now install Ubuntu Desktop via tasksel and setup VNC at PV DomU



Install Ubuntu Intrepid Server PV DomU at Xen 3.3 (port via http://www.gitco.de) CentOS 5.2 Dom0

October 28, 2008

Using Ubuntu as a Xen guest is now a supported option included in the standard server kernel and is a choice when building virtual machines with python-vm-builder. Install Ubuntu Intrepid Server HVM DomU:-
[root@ServerCentOS52 isos]# virt-install
Would you like a fully virtualized guest (yes or no)? This will allow you to run unmodified operating systems. yes
What is the name of your virtual machine? IntrepidHVM
How much RAM should be allocated (in megabytes)? 2048
What would you like to use as the disk (file path)? /dev/sda9
Would you like to enable graphics support? (yes or no) yes
What is the virtual CD image, CD device or install location? /etc/xen/isos/intrepidsrv.iso
Starting install…
Creating domain… 0 B 00:00



When done create PV DomU profile:-
[root@ServerCentOS52 vm]# cat intrepid.cfg
memory = 2048
name = “IntrepidPV”
vif = [ 'mac=00:16:3e:00:00:00' ]
disk = [ 'phy:/dev/sda9,xvda,w!']
vfb = ['type=vnc,vncunused=1']
Start PV DomU:-
[root@ServerCentOS52 vm]# xm create intrepid.cfg
Using config file “./intrepid.cfg”.
Started domain IntrepidPV
[root@ServerCentOS52 vm]# vncviewer localhost:0
Nicely brings you to login prompt for Ubuntu Server Intrepid PV DomU.



Tasksel is running attempting to install “Ubuntu Desktop”:-



Reboot PV DomU and setup VNC per [1] , including workaround for Gnome Settings Daemon issue.





[root@ServerCentOS52 vm]# xm list -l IntrepidPV
(domain
(domid 2)
(on_crash restart)
(uuid 43c6427d-52d4-9dd5-a38c-5c7898a01762)
(bootloader_args )
(vcpus 1)
(name IntrepidPV)
(on_poweroff destroy)
(on_reboot restart)
(bootloader )
(maxmem 2048)
(memory 2048)
(shadow_memory 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(start_time 1225178132.64)
(cpu_time 39.664607359)
(online_vcpus 1)
(image
(linux
(kernel )
(device_model /usr/lib64/xen/bin/qemu-dm)
(notes
(HV_START_LOW 18446603336221196288)
(FEATURES ‘!writable_page_tables|pae_pgdir_above_4gb’)
(VIRT_BASE 18446744071562067968)
(GUEST_VERSION 2.6)
(PADDR_OFFSET 0)
(GUEST_OS linux)
(HYPERCALL_PAGE 18446744071564201984)
(LOADER generic)
(SUSPEND_CANCEL 1)
(PAE_MODE yes)
(ENTRY 18446744071569531392)
(XEN_VERSION xen-3.0)
)
)
)
(status 2)
(state -b—-)
(store_mfn 2233833)
(console_mfn 2233832)
(device
(vif
(mac 00:16:3e:00:00:00)
(script vif-bridge)
(uuid 150a194e-8c4c-d3b9-7142-a5dd768c809b)
(backend 0)
)
)
(device
(vbd
(protocol x86_64-abi)
(uuid 952c5b6a-896b-2a66-3b30-704ab5f692d0)
(dev xvda:disk)
(uname phy:/dev/sda9)
(mode ‘w!’)
(backend 0)
(bootable 1)
(VDI )
)
)
(device (vkbd (backend 0)))
(device
(vfb
(vncunused 1)
(uuid d8ab575f-80a8-7fd9-7c18-13351874db9a)
(location localhost:5900)
(type vnc)
(display :0.0)
(xauthority /tmp/.gdmY1JZJU)
)
)
(device
(console
(protocol vt100)
(location 2)
(uuid 512ee61a-d7f2-6a35-7411-6f94c81f402e)
)
)
)

*************************************
To replace vfb with seial console
*************************************
Copy vmlinuz-2.6.27-7-server,initrd.img-2.6.27-7-server
of image device to Dom0 and create profile as follows:-

[root@ServerCentOS52 vm]# cat intrepid.conf
memory = 4096
name = “IntrepidPVC”
kernel=”/etc/xen/vm/vmlinuz-2.6.27-7-server”
ramdisk=”/etc/xen/vm/initrd.img-2.6.27-7-server”
root=”/dev/xvda1 ro”
extra = ‘2 console=hvc0′
vif = [ 'mac=00:16:3e:00:00:00' ]
disk = [ 'phy:/dev/sdb14,xvda,w!']
**************************************
Modify /etc/event.d/tty1 at DomU :-
**************************************
# cat /etc/event.d/tty1
# tty1 – getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /sbin/getty 38400 hvc0
*********************
and run at Dom0 :-
*********************
# xm create -c intrepid.conf
Pygrub profile may be used for same purpose as well. View for instance:-
Pygrub&Loading Ubuntu Intrepid Server PV DomU via serial console at Xen 3.3 CentOS 5.2 Dom0
References.
1.Attempt of VNC setup on Ubuntu Hardy PV DomU at Xen 3.3 CentOS 5.2 Dom0 (all 64-bit)


Install Debian Etch PV DomU with VNC at Solaris Nevada (build 98) Dom0

October 26, 2008

This posting utilizes same image file for loading HVM and PV Debian Etch DomUs at SNV_98 Dom0. Due to ongoing issue with “rge” driver Solaris Nevada (98) causes faillure to run “apt-get install” at Debian PV DomUs, until checksums offloading at DomU will get disabled via “ethtool”. It also provides a simple way of VNC connection to Debian PV DomU. VNC setup on Debian PV DomU versus Ubuntu Hardy provides just one x-terminal session after connection via vncviewer. However, executing command “gnome-session” in this terminal immediately starts healthy Gnome Desktop with no problems (compare with [1]). Login to Debian HVM DomU console and run :-
# apt-get install linux-image-xen-amd64
# apt-get install vnc4server
********************************************
Add one more entry to /boot/grub/menu.lst
*********************************************
default 0
timeout 10

title Debian GNU/Linux, kernel 2.6.18-6-xen-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-6-xen-amd64 root=/dev/hda1 ro
initrd /boot/initrd.img-2.6.18-6-xen-amd64
savedefault

title Debian GNU/Linux, kernel 2.6.18-6-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-6-amd64 root=/dev/hda1 ro
initrd /boot/initrd.img-2.6.18-6-amd64
savedefault

:wq

Shutdown HVM DomU.
Create Debian Etch PV DomU profile at Dom0, referencing same image file as Debian Etch HVM DomU:-
bash-3.2# cat deb4.cfg
memory = 2048
name = “DEB4PV”
vif = [ 'mac=00:16:3e:00:00:00' ]
disk = [ 'file:/export/home/images/debdisk.img,hda,w!']
****************
Start PV DomU
****************
# xm create -c deb4.cfg





Started domain DEB4PV
Bootdata ok (command line is root=/dev/hda1 ro)
Linux version 2.6.18-6-xen-amd64 (Debian 2.6.18.dfsg.1-23) (dannf@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Wed Oct 15 11:49:51 UTC 2008
BIOS-provided physical RAM map:
Xen: 0000000000000000 – 0000000080800000 (usable)
No mptable found.
Built 1 zonelists. Total pages: 526336
Kernel command line: root=/dev/hda1 ro
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
Xen reported: 3005.554 MHz processor.
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Software IO TLB disabled
Memory: 2034432k/2105344k available (1949k kernel code, 62280k reserved, 878k data, 148k init)
Calibrating delay using timer specific routine.. 7515.18 BogoMIPS (lpj=15030372)
Security Framework v1.0.0 initialized
SELinux: Disabled at boot.
Capability LSM initialized
Mount-cache hash table entries: 256
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 6144K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 1
(SMP-)alternatives turned off
Brought up 1 CPUs
migration_cost=0
checking if image is initramfs… it is
Grant table initialized
NET: Registered protocol family 16
Brought up 1 CPUs
PCI: setting up Xen PCI frontend stub
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: System does not support PCI
PCI: System does not support PCI
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 8, 1048576 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)

TCP reno registered
audit: initializing netlink socket (disabled)
audit(1225021132.364:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
rtc: IRQ 8 is not free.
Linux agpgart interface v0.101 (c) Dave Jones
RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
Xen virtual console successfully installed as tty1
Event-channel device installed.
netfront: Initialising virtual ethernet driver.
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 8
NET: Registered protocol family 20
netfront: device eth0 has copying receive path.
Registering block device major 3
hda: hda1 hda2
XENBUS: Device with no driver: device/console/0
Loading, please wait…
Begin: Loading essential drivers… …
Done.
Begin: Running /scripts/init-premount …
FATAL: Error inserting fan (/lib/modules/2.6.18-6-xen-amd64/kernel/drivers/acpi/fan.ko): No such device
processor: Unknown symbol pm_idle
WARNING: Error inserting processor (/lib/modules/2.6.18-6-xen-amd64/kernel/drivers/acpi/processor.ko): Unknown symbol in module, or unknown parameter (see dmesg)
thermal: Unknown symbol acpi_processor_set_thermal_limit
FATAL: Error inserting thermal (/lib/modules/2.6.18-6-xen-amd64/kernel/drivers/acpi/thermal.ko): Unknown symbol in module, or unknown parameter (see dmesg)
Done.
Begin: Mounting root file system… …
Begin: Running /scripts/local-top …
Done.
Begin: Running /scripts/local-premount …
Done.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/local-bottom …
Done.
Done.
Begin: Running /scripts/init-bottom …
Done.
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events…done.
Waiting for /dev to be fully populated…input: PC Speaker as /class/input/input0
done.
Couldnt get a file descriptor referring to the console
KDGKBMODE: Bad file descriptor
loadkeys: error reading keyboard mode
* Problem when loading /etc/console/boottime.kmap.gz, use install-keymap
Activating swap…Adding 353388k swap on /dev/hda5. Priority:-1 extents:1 across:353388k
done.
Checking root file system…fsck 1.40-WIP (14-Nov-2006)
/dev/hda1: clean, 83743/851968 files, 580335/1702882 blocks
done.
EXT3 FS on hda1, internal journal
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.
Cleaning up ifupdown….
Loading kernel modules…loop: loaded (max 8 devices)
done.
Loading device-mapper supportdevice-mapper: ioctl: 4.7.0-ioctl (2006-06-24) initialised: dm-devel@redhat.com
.
Checking file systems…fsck 1.40-WIP (14-Nov-2006)
done.
Setting kernel variables…done.
Invalidating stale software suspend images… done.
Mounting local filesystems…done.
Activating swapfile swap…done.
Detecting hardware…Setting up networking….
Configuring network interfaces…Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth1/00:16:3e:00:00:01
Sending on LPF/eth1/00:16:3e:00:00:01
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPOFFER from 192.168.1.1
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.37 — renewal in 116741 seconds.
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
done.
Starting portmap daemon….
Setting console screen modes and fonts.
Setting up ALSA…done (none loaded).
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting portmap daemon…Already running..
Starting HP Linux Printing and Imaging System: hpiod hpssd.
Starting BitTorrent tracker: disabled in /etc/default/bittorrent.
Starting Common Unix Printing System: cupsdlp: driver loaded but no devices found
ppdev: user-space parallel port driver
.
Starting system message bus: dbus.
Starting Hardware abstraction layer: hald.
Starting DHCP D-Bus daemon: dhcdbd.
Starting network connection manager: NetworkManager.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting network events dispatcher: NetworkManagerDispatcher.
Starting MTA: exim4.
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
Starting internet superserver: inetd.
Starting GNOME Display Manager: gdm.
Starting NFS common utilities: statd.
Starting anac(h)ronistic cron: anacron.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: crond.

Debian GNU/Linux 4.0 DebianEtch tty1

DebianEtch login:

********************************
When logged in as root run :-
********************************
# /usr/local/sbin/ethtool -K eth1 tx off

Install of build-essentials and ethtool-6 has been done via apt-get install in Debian HVM DomU.
That’s a tricky place , because broken driver for RTL Gibatit NIC at SNV Dom0 have us to use same image file for HVM and PV DomUs to be able run “apt-get install build-essentials” and any other stuff until the point when “ethtool” gets built and checksums offloading may be disabled at PV DomU . It might appear impossible to run “apt-get install” at Debian PV DomU in case when NIC at SNV Dom0 has a broken driver like “rge”.

# su – boris
$ vnc4server
Login to Debian PV DomU via vncviewer from another terminal session:-





To start Gnome type :-
# gnome-session
In terminal window





References.
1. Install Ubuntu Hardy PV DomU with VNC at Solaris Nevada (build 98) Dom0


Setup VNC on Ubuntu Hardy PV DomU at Solaris Nevada Dom0 (build 98)

October 24, 2008

This posting mostly deals with utilizing same image file for loading HVM and PV Ubuntu Hardy DomUs at SNV_98 Dom0. Due to ongoing issue with “rge” driver Solaris Nevada (98) causes faillure to run “apt-get install” at Ubuntu (Debian) PV DomUs, until checksums offloading at DomU will get disabled via “ethtool” ( for instance). It also provides a workaround to get Gnome Desktop working stable at Ubuntu PV DomU no matter on Xen Release (>=3.1.2) and OS (Solaris,Linux) running at Dom0. Install Ubuntu Hardy HVM DomU via virt-manger. Login to HVM console and run as in [1] :-
# apt-get install linux-image-xen
# apt-get install vim
********************************************
Add one more entry to /boot/grub/menu.lst
*********************************************
default 0
# hidemenu
timeout 10

title Ubuntu 8.04.1, kernel 2.6.24-21-xen
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-21-xen root=UUID=d60fdbd1-29a5-452e-81b8-20af8423cb33 ro
initrd /boot/initrd.img-2.6.24-21-xen

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=d60fdbd1-29a5-452e-81b8-20af8423cb33 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
. . . . . .
:wq
Add a console on xvc0:
# sed -e ‘s/tty1/xvc0/’ /etc/event.d/tty1 | tee /etc/event.d/xvc0
Shutdown HVM DomU.
Create Ubuntu PV DomU profile at Dom0, referencing same image file as Ubuntu HVM DomU:-
bash-3.2# cat ub8.cfg
memory = 2048
name = “U8PV”
vif = [ 'mac=00:16:3e:00:00:00' ]
disk = [ 'file:/export/home/images/ubdisk.img,xvda,w!']
****************
Start PV DomU
****************
# xm create -c ub8.cfg





********************************
When logged in as root run :-
********************************
# apt-get remove network-manager
# vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
:wq
************************************************************
Obtain IP address for PV DomU without network-manager
************************************************************
# /etc/init.d/networking restart
Listening on LPF/eth0/00:16:3e:00:00:00
Sending on LPF/eth0/00:16:3e:00:00:00
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPOFFER of 192.168.1.60 from 192.168.1.1
DHCPREQUEST of 192.168.1.60 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.60 from 192.168.1.1
bound to 192.168.1.60 — renewal in 103564 seconds.
*********************************************************************
Next step is required if SNV Dom0 has RTL 8169SC,8110SC NIC
It disables checksums offloading at Ubuntu Hardy DomU
**********************************************************************
# /usr/local/sbin/ethtool -K eth0 tx off
Install of gcc,build-essentials and ethtool-6 has been done via apt-get install in Ubuntu HVM DomU.
That’s a tricky place , because broken driver for RTL Gibatit NIC at SNV Dom0 have us to use same image file for HVM and PV DomUs to be able run “apt-get install gcc build-essentials” and any other stuff until the point when “ethtool” gets built and checksums offloading may be disabled at PV DomU . It might appear impossible to run “apt-get install” at Ubuntu (Debian) PV DomU in case when NIC at SNV Dom0 has a broken driver like “rge”.
****************************************
Setup VNC at Ubuntu Hardy PV DomU
****************************************
# apt-get install vnc4server xinetd

# vi /etc/gdm/gdm.conf
Uncomment this line
RemoteGreeter=/usr/lib/gdm/gdmlogin
Enable xdmcp, look for [xdmcp] and change Enable to true.
[xdmcp]
Enable=true
************
Restart gdm
************
# /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

When connect via vncviewer from Dom0, getting Error Window “Gnome Setting Daemon failed to start”. To fix Gnome Setting Daemon failures to start, open vnc session with DomU ([2]) and run in gnome terminal ([3]):-
$ gconf-editor
and disable mouse and keyboard plugins.
Relogin to Ubuntu PV DomU via vncviewer.
Gnome Desktop should be working fine.







References.
1.http://blog.bashton.com/2008/running-an-ubuntu-hardy-xen-domu-under-a-centos-dom0/
2.http://lxer.com/module/newswire/view/110161/index.html
3.https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/199245


Install OpenSuse 11 PV DomU at Xen 3.2 Ubuntu Hardy Dom0 via local HTTP Server (all 64-bit)

October 21, 2008

Attempt to reproduce for OpenSuse 11 procedure worked so smoothly for RH’s PV DomUs , described in previous
post, appeared to be a bit more complicated. Pygrub installation profile reading data from HTTP source at Dom0 still worked fine, but Xen 3.2 Ubuntu’s 8.04.1 pygrub failed to read image had been created for OpenSuse 11 PV DomU (/dev/sda11) . Just an ordinary “xm” profile was required to finish configuration and load PV DomU when image was already created on block device, say /dev/sda11. Xenified kernel and ramdisk had to be copied of image device to Dom0 file system. There may be several ways of achieving this goal. I just selected the easiest for myself. Having already CentOS 5.2 PV DomU up and running attached /dev/sda11 via “xm block-attach” to running DomU as “hdb” , mounted /dev/hdb1 inside DomU and scp’ed suse’s xenified kernel and ramdisk to Dom0. Notice, that virtual frame buffer would work fine for OpenSuse 11 PV at Ubuntu Hardy Dom0 (2.6.24-21-xen). Setup Apache at Ubuntu Hardy Dom0.
# apt-get install apache2
# losetup /dev/loop0 /etc/xen/isos/suse11.iso
# mkdir -p /var/www/suse
# mount -o loop /etc//xen/isos/suse11.iso /var/www/suse
***********************
Installation profile :-
***********************
root@boris-desktop:/etc/xen/vm# cat suse11.cfg
name=”OpenSuse11PV”
memory=2048
disk = ['phy:/dev/loop0,hdc:cdrom,r','phy:/dev/sda11,hda,w' ]
vif = [ 'mac=00:16:3e:4a:f5:00, bridge=eth0', ]
vfb = [ 'type=vnc,vncunused=1' ]
bootloader = “/usr/bin/pygrub”
kernel = “/boot/x86_64/vmlinuz-xen”
ramdisk = “/boot/x86_64/initrd-xen”
vcpus=1
on_reboot = ‘restart’
on_crash = ‘restart’
**************
Start install:-
*************
# xm create suse11.cfg
# vncviewer localhost:0
Manage during initial configuration and installation phase for OpenSuse 11 PV DomU exactly as it was done in [1] for CentOS 5.2 DomU. Pygrub’s profiles performing this step are similar for both DomUs.
Only paths to distro’s vmlinuz-xen and initrd-xen are different.















When DomU would attempt to reboot run :-
# xm shutdown OpenSuse11PV
Now we need to copy of the image (/dev/sda11) created during first phase kernel-xen,initrd-xen and
menu.lst ( to write properly extra line for runtime profile) to Dom0. I did it this way :-
# xm create centos52.pyrun
# vncviewer localhost:0
What ,actually, provided login to CentOS PV DomU console.
At Dom0 ran :-
# xm block-attach CentOSP52PV phy:/dev/sda11 hdb
switched to CentOS52PV DomU X-console and mounted partition
with xenified kernel ,initrd and /boot/grub/menu.lst :-
# mount /dev/hdb1 /mnt
# scp /mnt/boot/*-xen /mnt/grub/menu.lst root@IP-Dom0:/etc/xen/vm
then created second phase configuration and runtime profile for OpenSuse 11 DomU as follows:-
**************************************************
Second phase configuration and runtime profile
**************************************************
name=”OpenSuse11PV”
memory=2048
disk = ['phy:/dev/sda11,hda,w']
vif =[ 'mac=00:16:3e:4a:f5:00, bridge=eth0']
vfb = [ 'type=vnc,vncunused=1' ]
kernel = “/etc/xen/vm/vmlinuz-2.6.25.5-1.1-xen”
ramdisk= “/etc/xen/vm/initrd-2.6.25.5-1.1-xen”
extra = “root=/dev/hda1 resume=/dev/hda2 splash=silent showopts”

To proceed with install , run :-
# xm create suse11.run
# vncviewer localhost:0











References
1. Pygrub & install CentOS 5.2 PV DomU at Xen 3.2 Ubuntu Hardy Dom0 via local HTTP Server (all 64-bit)


Pygrub & install CentOS 5.2 PV DomU at Xen 3.2 Ubuntu Hardy Dom0 via local HTTP Server (all 64-bit)

October 20, 2008

Due to known bug virt-install was broken on Ubuntu 8.04 since day of it’s GA and never has been fixed as far as to my knowledge. However, xen-enabled ISO’s like RH’s ones allow to perform PV Guest install via pygrub and repository placed on Apache Server running at Dom0. Notice, that virtual frame buffer would work fine for CentOS PV at
Ubuntu Hardy Dom0 (2.6.24-21-xen). Setup Apache at Ubuntu Hardy Dom0.
# apt-get install apache2
# losetup /dev/loop0 /etc/xen/isos/rhel52.iso
# mkdir -p /var/www/rhel
# mount -o loop /etc//xen/isos/rhel52.iso /var/www/rhel
Installation profile :-
root@boris-desktop:/etc/xen/vm# cat centos52.cfg
name=”RHEL52PV”
memory=2048
disk = ['phy:/dev/loop0,hdc:cdrom,r',
'phy:/dev/sdb14,xvda,w' ]
vif = [ 'mac=00:16:3e:4a:f5:00, bridge=eth0', ]
vfb = [ 'type=vnc,vncunused=1' ]
bootloader = “/usr/bin/pygrub”
kernel = “/images/xen/vmlinuz”
ramdisk = “/images/xen/initrd.img”
vcpus=1
on_reboot = ‘restart’
on_crash = ‘restart’
Proceed with install :-
# xm create centos52.cfg
# vncviewer localhost:0













When DomU will attempt to reboot run :-
# xm destroy RHEL52PV
and switch to runtime profile.
Runtime profile:-
root@boris-desktop:/etc/xen/vm# cat centos52.pyrun
name=”RHEL52PV”
memory=2048
disk = ['phy:/dev/sdb14,xvda,w' ]
vif = [ 'mac=00:16:3e:4a:f5:00, bridge=eth0', ]
vfb = [ 'type=vnc,vncunused=1' ]

Run :-
# xm create centos52.pyrun
# vncviewer localhost:0

Setup VNC at DomU as follows :-
# mkdir .vnc
# cd .vnc
# vncserver :1
Vnc password will be requested by the last command.
Edit ~/.vnc/xstartup and uncomment first two lines.
Make this file as follows bellow:
#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
twm &
Make following changes to /etc/sysconfig/vncservers file:-
VNCSERVERS=”1:root”
VNCSERVERARGS[1]=”-geometry 1024×768″
Then run:-
# chkconfig vncserver on
# reboot







Actually, vncserver setup is not required. Changing initdefault from 3 to 5 in /etc/inittab will start Gnome or KDE login automatically via vfb.
# xm create centos52.pyrun
# vncviewer localhost:0







Notice , that F7,F8 PV DomU may be setup at Xen 3.2 Ubuntu Hardy Dom0 in
similar way.


Install OpenSuse 11 DomU at Xen 3.3 CentOS 5.2 Dom0 via local HTTP Server (all 64-bit)

October 17, 2008

The procedure down here has been developed due to virt-install failure to handle OpenSuse 11 PV DomU
install at Xen 3.3 (3.2),(3.1) CentOS 5.2 Dom0 either via NFS or HTTP shared directory.
Perform initial connect to Apache Server running at Dom0 , deployment and configuration (until first DomU
reboot) via profile openSUSE11PV.cfg.

# cat openSUSE11PV.cfg
name=”OpenSuse11PV”
memory=2048
disk = ['file:/etc/xen/isos/suse11.iso,xvdb:cdrom,r',
'phy:/dev/sdb14,xvda,w' ]
vif = [ 'mac=00:16:3e:4a:f5:00, bridge=eth0', ]
vfb = [ 'type=vnc,vncunused=1' ]
bootloader = “/usr/bin/pygrub”
kernel = “/boot/x86_64/vmlinuz-xen”
ramdisk = “/boot/x86_64/initrd-xen”
vcpus=1
on_reboot = ‘restart’
on_crash = ‘restart’

# xm create openSUSE11PV.cfg
# vncviewer localhost:0
Press “Back” button on startup screen , then select system original setup via HTTP and point installer to Dom0’s IP as IP of HTTP Server, providing URL /suse/ corresponding directory /var/www/html/suse .
ISO image should be previously loop mounted as follows bellow:-
# mount -o loop suse11.iso /var/www/html/suse
Sequence of snapshots is actually step by step installation instruction.





















When OpenSuse DomU first time goes down for reboot, shutdown Suse DomU via “xm” and switch to profile:-
*******************************************************
Final configuration phase & runtime profile
*******************************************************
name=”OpenSuse11PV”
memory=2048

disk = ['phy:/dev/sdb14,xvda,w']
vif =[ 'mac=00:16:3e:4a:f5:00, bridge=eth0']
vfb = [ 'type=vnc,vncunused=1' ]
bootloader = “/usr/bin/pygrub”
kernel = “/boot/vmlinuz-2.6.25.5-1.1-xen”
ramdisk = “/boot/initrd-2.6.25.5-1.1-xen”
vcpus=1
on_reboot = ‘restart’
on_crash = ‘restart’

Run:-
# xm create openSUSE11PV.run
# vncviewer localhost:0
To commit final configuration phase and load PV DomU.








Follow

Get every new post delivered to your Inbox.