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

Fixing Tanzu Kubernetes Pod to External Services Connectivity Issues with NSX-T

Fixing Tanzu Kubernetes Pod to External Services Connectivity Issues with NSX-T Last month I got a call from a customer who was pulling their hair out over a networking issue. They had just deployed VMware Tanzu Kubernetes Grid on their vSphere with Tanzu environment, everything looked good in the dashboards, all pods were running, but their applications inside the pods could not reach external databases running on traditional VMs in the same datacenter. The frustrating part was that some pods could reach external services perfectly fine, while others would just timeout. There was no clear pattern. Let me tell you how we figured this out and fixed it. The Initial Problem Here is what the customer setup looked like: vSphere 8.0 with Tanzu enabled NSX-T 4.1.2 for networking Three Tanzu Kubernetes clusters running different microservices applications External PostgreSQL database running on traditional VMs (non-Kubernetes) External API services running on another se...

Troubleshooting vSAN Storage Policy Migration Failures in VMware Cloud Foundation 9.0

Recently I had a customer who migrated their VMware infrastructure from vSphere 7.0 to VMware Cloud Foundation 9.0. After the migration, they wanted to update their vSAN storage policies to take advantage of the new vSAN ESA (Express Storage Architecture) features. However, when they tried to change the storage policy for their production VMs, the operation kept failing with a cryptic error message. The error they were getting was: "Cannot complete operation due to insufficient resources to satisfy current storage policy." This was strange because they had plenty of disk space available. The vSAN cluster was only at 45% capacity, and all the hosts were healthy. Let me walk through how we troubleshooted and fixed this issue. Understanding the Problem First, let's understand what was happening in their environment: They had a 6-node vSAN cluster running VCF 9.0 vSAN was configured with the new ESA architecture They were trying to migrate VMs fro...

Unlocking VMware Cloud Foundation 9.0: A Strategic Blueprint for Enterprise Transformation

The evolution of VMware under Broadcom represents not disruption, but clarification—a focused vision toward unified private cloud excellence. As organizations navigate this transformation, the opportunity has never been greater to build truly modern, efficient, and powerful infrastructure with VMware Cloud Foundation. After architecting VMware solutions across diverse enterprise environments, I've observed a pattern: organizations that embrace VMware Cloud Foundation (VCF) strategically—rather than viewing the transition as a burden—emerge with significantly more capable, cost-effective, and future-ready infrastructure. This post shares a practical framework for successfully modernizing your VMware environment, maximizing your investment, and positioning your organization for the AI-driven, cloud-native future. Understanding the VMware Cloud Foundation Vision Let's start with clarity about what Broadcom and VMware are building: VMware Cloud Foundati...