Skip to main content

XEN-Boot problems




An Overview of Repository Based Installation


Linux distributions are essentially a collection of many different software packages combined with a Linux kernel. These packages are stored in repositories which may be accessed online to install and update Linux distributions. The key tools for performing these tasks on systems such as Red Hat Linux, Fedora and CentOS are called yum and rpm. Other Linux distributions (such as Debianand Ubuntu) use a different package management system which will be covered in Building a Debian or Ubuntu Xen Guest Root Filesystem using debootstrap.


In terms of creating a Xen guest domain the yum and rpm tools can be used to install the base root filesystem on a blank disk image or partition by downloading the necessary packages from an online repository. This contrasts with the approach described in previous chapters whereby the root filesystem is simply copied from the host operating system


Preparing to Create a Xen Guest Root Filesystem from Repositories


A Xen guest domain needs, at a minimum, a Xen configuration file, a root filesystem, a Linux kernel, an initial RAM Disk and ideally some swap space. In previous chapters we looked at a number of approaches to providing swap space and a root filesystem including the use of disk images, disk partitions and logical volume management. The remainder of this chapter assumes that suitable storage has been configured to hold the root filesystem, that swap space has been configured and a suitable Xen configuration file exists. If you have not yet configured a suitable filesystem for the root files refer to the following chapters (omitting the sections on cloning the host root filesystem) before proceeding with this chapter:
Building a Xen Virtual Guest Filesystem on a Disk Image (Cloning Host System)
Building a Xen Virtual Guest Filesystem on a Physical Disk Partition (Cloning Host System)
Building a Xen Virtual Guest Filesystem using Logical Volume Management (LVM)


Beginning the Installation


The first step in installing the base packages onto the root filesystem for the Xen guest domain is to mount the target filesystem so that it is accessible to the host system. The following steps assume that this filesystem has been mounted in /xen.


Initially, a number of directories and files need to be created in the filesystem in order for yum and rpm to function:mkdir -p /xen/var/lib/rpm mkdir -p /xen/var/log touch /xen/var/log/yum.log



Next the RPM database on the guest filesystem needs to be initialized:rpm --root /xen --initdb



Next the general release description RPM package for the Linux distribution needs to be downloaded and installed. To obtain this file go to the web site for your chosen distribution and look on the download mirrors for the file containing -release- in its name.


Once the package has been downloaded install it as follows:rpm -ihv --nodeps --root /xen centos-release-5-1.0.el5.centos.1.i386.rpm



Finally, use yum to install the full set of base packages for the operating system. The following command will download all required packages from the repository and install them:yum --installroot=/xen -y groupinstall Base



This process involves the download and installation of over 300 packages so may take some time to complete. Upon completion copy the appropriate directories from the /lib/modules directory of the host system to /xen/lib/modules. For example:cp -r /lib/modules/2.6.18-53.1.14.el5xen /xen/lib/modules



Configuring the Guest System using chroot


The next step is to configure the guest system so that it is ready to boot. This is achieved using chroot. For example:chroot /xen



This essentially creates a new shell for us to work on where the root (/) directory is changed to point to /xen. From this shell prompt create a new /etc/fstab which matches the device settings in the Xen configuration file created previously. Also take this opportunity to set up the root password and add any additional users that may be needed.


Booting the Xen Guest System


Now all that remains is to boot the guest operating system. Before issuing the command to do so it is important to note that the system may not boot for a number of reasons. If the system fails to boot be sure to read the Xen Guest Boot Problems section at the end of this chapter.


Before booting the guest system it is important to first unmount the guest root filesystem:umount /xen



With the set up and configuration complete we are now ready to start up the guest OS. This is achieved using the xm create command:xm create XenGuest1.cfg -c



The -c flag above instructs Xen to attach a console to the guest system so that we see output as the system boots.

Popular posts from this blog

HOW TO EDIT THE BCD REGISTRY FILE

The BCD registry file controls which operating system installation starts and how long the boot manager waits before starting Windows. Basically, it’s like the Boot.ini file in earlier versions of Windows. If you need to edit it, the easiest way is to use the Startup And Recovery tool from within Vista. Just follow these steps: 1. Click Start. Right-click Computer, and then click Properties. 2. Click Advanced System Settings. 3. On the Advanced tab, under Startup and Recovery, click Settings. 4. Click the Default Operating System list, and edit other startup settings. Then, click OK. Same as Windows XP, right? But you’re probably not here because you couldn’t find that dialog box. You’re probably here because Windows Vista won’t start. In that case, you shouldn’t even worry about editing the BCD. Just run Startup Repair, and let the tool do what it’s supposed to. If you’re an advanced user, like an IT guy, you might want to edit the BCD file yourself. You can do this

AD LDS – Syncronizing AD LDS with Active Directory

First, we will install the AD LDS Instance: 1. Create and AD LDS instance by clicking Start -> Administrative Tools -> Active Directory Lightweight Directory Services Setup Wizard. The Setup Wizard appears. 2. Click Next . The Setup Options dialog box appears. For the sake of this guide, a unique instance will be the primary focus. I will have a separate post regarding AD LDS replication at some point in the near future. 3. Select A unique instance . 4. Click Next and the Instance Name dialog box appears. The instance name will help you identify and differentiate it from other instances that you may have installed on the same end point. The instance name will be listed in the data directory for the instance as well as in the Add or Remove Programs snap-in. 5. Enter a unique instance name, for example IDG. 6. Click Next to display the Ports configuration dialog box. 7. Leave ports at their default values unless you have conflicts with the default values. 8. Click N

DNS Scavenging.

                        DNS Scavenging is a great answer to a problem that has been nagging everyone since RFC 2136 came out way back in 1997.  Despite many clever methods of ensuring that clients and DHCP servers that perform dynamic updates clean up after themselves sometimes DNS can get messy.  Remember that old test server that you built two years ago that caught fire before it could be used?  Probably not.  DNS still remembers it though.  There are two big issues with DNS scavenging that seem to come up a lot: "I'm hitting this 'scavenge now' button like a snare drum and nothing is happening.  Why?" or "I woke up this morning, my DNS zones are nearly empty and Active Directory is sitting in a corner rocking back and forth crying.  What happened?" This post should help us figure out when the first issue will happen and completely avoid the second.  We'll go through how scavenging is setup then I'll give you my best practices.  Scavenging s