Results 1 to 1 of 1
Hey all - first post, long time reader - hopefully someone can help here! I'll try to give as much pertinent information in this post as possible, any more information ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-14-2010 #1Just Joined!
- Join Date
- Jul 2010
- Location
- Burlington, VT
- Posts
- 7
Fedora 8 -> 12 Upgrade, Xen Kernel & VM Issues
Hey all - first post, long time reader - hopefully someone can help here! I'll try to give as much pertinent information in this post as possible, any more information that will help please ask and I'll get it! I have very little experience with kernel building.. so please bear with me if I'm doing something really dumb here
I suspect it has something to do with hardware/kernel config, especially since on our live server we are running assorted RAID levels and on my test server I am not...
Scenario:
Our web server host is running Fedora 8 using the 2.6.21.7-5 xen kernel and xen dom0 as the hypervisor. This host acts as the hypervisor and a router (iptables) negotiating traffic to our webserver VM running centos5. I want to upgrade our host to Fedora 12, however support for dom0 hasn't been built in since Fedora 8. I have a parallel test server setup on a different machine running Fedora 12 x86_64. I have successfully compiled a dom0 kernel on the Fedora 12 test server and have virsh connected to the xen hypervisor. I am able to install VM's and it is otherwise behaving as expected. I have made a copy of the xml and img file of our webserver VM and put it on my test server, but it is having problems when trying to mount the filesystem.
Details below...
Servers:
Server 1 - Flyingdog - Live Webserver Host (Fedora
Server 2 - Snakedog - Web Server VM on Server 1 (CentOS 5)Code:uname -a Linux flyingdog 2.6.21.7-5.fc8xen #1 SMP Thu Aug 7 12:44:22 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux RAID Levels: [RAID1, /dev/md0, /boot], [RAID1, /dev/mapper/VolGroup00-LogVol00, /], [RAID1, /dev/mapper/VolGroup00-LogVol01, /usr], [RAID1, /dev/mapper/VolGroup00-LogVol02, /home], [RAID1, /dev/mapper/VolGroup00-LogVol03, /var], [RAID1, /dev/mapper/VolGroup00-LogVol04, /tmp], [RAID1, /dev/mapper/VolGroup00-LogVol05, /vm]
Server 3 - FlyerdogCode:uname -a Linux snakedog 2.6.18-xenU #1 SMP Tue May 13 16:30:10 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
-Test Webserver Host (Fedora 12)
Code:uname -a Linux flyerdog 2.6.31.13 #4 SMP Thu Jul 8 14:45:38 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Problem:
I need to get our webserver VM running on a Fedora 12 host. I copied the .xml file defining our web VM and the .img file of the harddisk over to the parallel server and defined the domain with "virsh define webserver.xml" which checks out OK- however when trying to virsh start webserver, I can connect to a console via virsh console webserver and see that the VM is unable to mount the filesystem and then shuts down.
Here's what I get when I try to start the VM Snakedog on test server Flyerdog
Code:XENBUS: Timeout connecting to device: device/vbd/2049 (state 3) XENBUS: Timeout connecting to device: device/vbd/2050 (state 3) XENBUS: Device with no driver: device/console/0 md: Autodetecting RAID arrays. md: autorun ... md: ... autorun DONE. VFS: Cannot open root device "sda1" or unknown-block(0,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Partitioning
LIVE SERVER
Code:[root-at-flyingdog ~]# cat /etc/fstab /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 /dev/VolGroup00/LogVol02 /home ext3 defaults 1 2 /dev/VolGroup00/LogVol04 /tmp ext3 defaults 1 2 /dev/VolGroup00/LogVol03 /var ext3 defaults 1 2 /dev/VolGroup00/LogVol01 /usr ext3 defaults 1 2 /dev/VolGroup00/LogVol05 /vm ext3 defaults 1 2 /dev/md0 /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 LABEL=SWAP-sda3 swap swap defaults 0 0 [root-at-flyingdog ~]# cat /proc/partitions major minor #blocks name 8 0 244140625 sda 8 1 120456 sda1 8 2 8385930 sda2 8 3 6289447 sda3 8 4 1 sda4 8 5 5245191 sda5 8 6 2096451 sda6 8 7 2096451 sda7 8 8 1574338 sda8 8 9 58605088 sda9 8 16 488386584 sdb 8 17 120456 sdb1 8 18 8385930 sdb2 8 19 5245222 sdb3 8 20 1 sdb4 8 21 2096451 sdb5 8 22 2096451 sdb6 8 23 1574338 sdb7 8 24 58605088 sdb8 9 1 1574272 md1 9 2 8385856 md2 9 3 5245120 md3 9 4 2096384 md4 9 5 2096384 md5 9 6 58604992 md6 253 0 1540096 dm-0 253 1 5210112 dm-1 253 2 2031616 dm-2 253 3 2031616 dm-3 253 4 8454144 dm-4 253 5 58605568 dm-5 9 0 120384 md0
TEST SERVER
Code:[root-at-flyerdog ~]# cat /etc/fstab # # /etc/fstab # Created by anaconda on Thu Jul 1 13:56:23 2010 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # /dev/mapper/vg_flyerdog-lv_root / ext4 defaults 1 1 UUID=0af1bd4c-c727-4290-8adc-bead41b909f6 /boot ext3 defaults 1 2 /dev/mapper/vg_flyerdog-lv_swap swap swap defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 [root-at-flyerdog ~]# cat /proc/partitions major minor #blocks name 8 0 244198584 sda 8 1 204800 sda1 8 2 243991201 sda2 8 16 244198584 sdb 8 17 244196001 sdb1 252 0 482861056 dm-0 252 1 5324800 dm-1
WEBSERVER VM
Code:[Wed Jul 14 15:16:24 root-at-snakedog:~ ] # cat /etc/fstab /dev/sda1 / ext3 defaults 1 1 /dev/sda2 none swap sw 0 0 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 [Wed Jul 14 15:20:24 root-at-snakedog:~ ] # cat /proc/partitions major minor #blocks name 8 1 20481024 sda1 8 2 65536 sda2 8 17 10485760 sdb1
Grub Config
LIVE SERVER
Code:[root-at-flyingdog ~]# cat /boot/grub/grub.conf # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00 # initrd /initrd-version.img #boot=/dev/md0 default=0 timeout=5 insmod raid insmod lvm splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Fedora (2.6.21.7-5.fc8xen) root (hd0,0) kernel /xen.gz-2.6.21.7-5.fc8 module /vmlinuz-2.6.21.7-5.fc8xen ro root=/dev/VolGroup00/LogVol00 module /initrd-2.6.21.7-5.fc8xen.img title Fedora (2.6.21.7-3.fc8xen) root (hd0,0) kernel /xen.gz-2.6.21.7-3.fc8 module /vmlinuz-2.6.21.7-3.fc8xen ro root=/dev/VolGroup00/LogVol00 module /initrd-2.6.21.7-3.fc8xen2.img [root-at-flyingdog ~]#
TEST SERVER
Code:[root-at-flyerdog ~]# cat /boot/grub/grub.conf # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/mapper/vg_flyerdog-lv_root # initrd /initrd-[generic-]version.img #boot=/dev/sda default=o timeout=0 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Xen 3.4.2 - Fedora (2.6.31.13) root (hd0,0) kernel /xen-3.4.3.gz console=vga vga=normal noreboot module /vmlinuz-2.6.31.13 noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet module /initrd-2.6.31.13.img title Fedora (2.6.32.14-127.fc12.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32.14-127.fc12.x86_64 ro root=/dev/mapper/vg_flyerdog-lv_root LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet initrd /initramfs-2.6.32.14-127.fc12.x86_64.img
Here is the XML file that I am using to define the "snakedog" webserver VM. I have it slightly modified from the live server on the test server - I have included both below... again I have used "virsh define" to define the domain using these XML files. The .img files are the exact same thing, I just renamed it on the test server for my own sanity.
LIVE SERVER VM XML DEFINITION FILE
TEST SERVER VM XML DEFINITION FILECode:[root-at-flyingdog ~]# cat /vm/centos5-web/centos5-web.xml <domain type='xen'> <name>centos5-snakedog</name> <uuid>e0c889c2-2829-a5a6-b9e4-2506bb244989</uuid> <os> <type>linux</type> <kernel>/boot/vmlinuz-2.6.18-xenU</kernel> <cmdline>root=/dev/sda1 fastboot</cmdline> </os> <memory>3097152</memory> <vcpu>2</vcpu> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <interface type='bridge'> <source bridge='virbr0'/> <script path='vif-bridge'/> <mac address='00:16:3E:5A:3F:92'/> </interface> <disk type='file' device='disk'> <driver name='tap' type='aio'/> <source file='/vm/centos5-web/centos.5-1.64.img'/> <target dev='sda1'/> </disk> <disk type='file' device='disk'> <driver name='tap' type='aio'/> <source file='/vm/centos5-web/centos.swap'/> <target dev='sda2'/> </disk> <serial type='pty'> <source path='/dev/pts/4'/> <target port='0'/> </serial> <console type='pty' tty='/dev/pts/4'> <source path-'/dev/pts/4'/> <target port='0'/> </console> </devices> </domain>
Code:[root-at-flyerdog]# cat centos5-snakedog.xml <domain type='xen'> <name>centos5-snakedog</name> <os> <type>linux</type> <kernel>/boot/vmlinuz-2.6.18-xenU</kernel> <cmdline>root=/dev/sda1</cmdline> </os> <memory>1548576</memory> <vcpu>2</vcpu> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <interface type='bridge'> <source bridge='virbr0'/> <script path='vif-bridge'/> <mac address='DA:C1:70:82:0A:BC'/> </interface> <disk type='file' device='disk'> <driver name='tap' type='aio'/> <source file='/vm/snakedog/centos5-snakedog.img'/> <target dev='sda1'/> </disk> <disk type='file' device='disk'> <driver name='tap' type='aio'/> <source file='/vm/snakedog/centos.swap'/> <target dev='sda2'/> </disk> <console tty='/dev/pts/0'/> </devices> </domain>
XM Info Output
LIVE SERVER
TEST SERVERCode:[root-at-flyingdog ~]# xm info host : flyingdog release : 2.6.21.7-5.fc8xen version : #1 SMP Thu Aug 7 12:44:22 EDT 2008 machine : x86_64 nr_cpus : 4 nr_nodes : 1 sockets_per_node : 2 cores_per_socket : 1 threads_per_core : 2 cpu_mhz : 2793 hw_caps : bfebfbff:20000800:00000000:00000180:0000641d total_memory : 6078 free_memory : 14 xen_major : 3 xen_minor : 1 xen_extra : .4 xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : unavailable cc_compiler : gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) cc_compile_by : mockbuild cc_compile_domain : (none) cc_compile_date : Thu Aug 7 12:42:27 EDT 2008 xend_config_format : 4
Code:[root-at-flyerdog]# xm info host : flyerdog release : 2.6.31.13 version : #4 SMP Thu Jul 8 14:45:38 EDT 2010 machine : x86_64 nr_cpus : 2 nr_nodes : 1 cores_per_socket : 2 threads_per_core : 1 cpu_mhz : 2524 hw_caps : bfebfbff:20000800:00000000:00000140:0000e3bd:00000000:00000001:00000000 virt_caps : hvm total_memory : 3199 free_memory : 1518 node_to_cpu : node0:0-1 node_to_memory : node0:1518 xen_major : 3 xen_minor : 4 xen_extra : .3 xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : unavailable cc_compiler : gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC) cc_compile_by : mockbuild cc_compile_domain : (none) cc_compile_date : Tue Jun 1 20:59:17 UTC 2010 xend_config_format : 4
Attached is the config file that I used when building the kernel on my test server - I downloaded kernel-xen-2.6.31.13.tar.bz2, extracted, entered the new kernel-2.6-xen directory and followed the directions on a pkill article titled setting-up-xen-pvops-dom0-on-fedora-xen-3-4-2-kernel-2-6-31-with-paravirt_ops-in-fedora-12 (can't post links to external sites yet...) to build my kernel on my test server. I have successfully booted to this kernel and connected to the xen hypervisor
TEST SERVER
Alrighty! I hope I included sufficient information, but probably not! So - please ask if there is anything you need in order to help me solve this problem. It may be something painfully obvious here, which I hope it is, I just don't have the knowledge for this to be a quick fix for meCode:[root-at-flyerdog xen_setup]# virsh uri xen:/// [root-at-flyerdog xen_setup]# ps -ef | grep xen root 15 2 0 09:46 ? 00:00:00 [xenwatch] root 16 2 0 09:46 ? 00:00:00 [xenbus] root 1478 1 0 09:47 ? 00:00:00 /usr/sbin/xenstored --pid-file /var/run/xenstore.pid root 1498 1 0 09:47 ? 00:00:00 /usr/sbin/xenconsoled --log=none --log-dir=/var/log/xen/console root 1573 1 0 09:47 ? 00:00:06 /usr/bin/python2.6 /usr/sbin/xend

I have additional concerns that even if I do get this VM up and running on my test server, I'll run into the same problem when doing the update to our live server. I plan on doing a cold-install of F12, reconfiguring our RAID setup, then building the kernel, but I'm worried that the VM won't want to mount similar to the problem I'm currently having. Any information on this concern would also be GREATLY appreciated as I have never performed such an operation before.
Thanks so much, I really appreciate any help or additional information/pointers-
John


Reply With Quote
