Current protocol for installing Xen with as a Dom0?

5,122

Solution 1

What did you actually try? (can you provide details, authorative sources)

Something like: (to start with)

sudo apt-get install xen-hypervisor-4.1-amd64 xen-utils-4.1 xenwatch xen-tools xen-utils-common xenstore-utils

sudo apt-get install virtinst virt-viewer virt-manager

Solution 2

Here how it worked for me.

The lessons I learned:

I wanted to use xen as hypervisor so I can play around with different OS a software without ruining my primary system.

So first I downloaded the 64 bit client version from Ubuntu and followed Martins guide http://martincarstenbach.wordpress.com/2011/11/30/getting-started-with-xen-virtualisation-on-ubuntu-11-10/. Thanks Martin, great work.

A few things I had to figure out myself.

I had one problem with my Ubuntu 64 Bit client. Even though I installed on an Intel box I had to use the xen-hypervisor-4.1-amd64 package it seems also to cover the intel 64 Bit machines. The i386 package did not work.

Then I wanted to get the virtualisation GUI to work: To get virsh up and running I hat to add “export VIRSH_DEFAULT_CONNECT_URI=xen:///” to root .bashrc file. Then it started without problems.

Now xen is up and running. Just need to create a guest VM. Before I could do that I had to enable the virtualisation options im my EFI BIOS. After a reboot and changing the BIOS settings everything worked fine, but I could not see a virtual network bridge on my system.

I wanted my vm to share the network interface with the physical machine. I had to do the following to Configuring the network:

in /etc/network/interfaces

auto xenbr0
iface xenbr0 inet dhcp
bridge_ports eth0

one reboot later the bridge was up.

now I had to deal with some virt-manager errors.

I had to do an “ln -s qemu-linaro qemu” in /usr/share to get rid of some “Could not read keymap file: ‘/usr/share/qemu/keymaps/en-us” errors and to get rid of the problem.

cd /usr
mkdir lib64
cd lib64
ln -s ../lib/xen-4.1/ xen

A good idea is to monitor the xen logs in /var/log/xen for errors.

After these steps I could create a VM and install the guest OS.

Share:
5,122

Related videos on Youtube

Lexalt
Author by

Lexalt

Updated on September 18, 2022

Comments

  • Lexalt
    Lexalt almost 2 years

    I tried to install Xen a few weeks ago with Ubuntu 11.10 as the Dom0. At the time, I encountered too many problems to list here. And an internet search revealed that others were having similar problems. Although my searches revealed a few workarounds, ultimately I punted Ubuntu and used Fedora 16 as the Dom0. (The process for getting Fedora 16 up and running as the Dom0 for Xen was relatively painless.)

    Ubuntu is my preferred distro, and so I'd like to try again. But before I do so, could anyone kindly recommend a site that provides CURRENT and up-to-date tips, including a list dependencies that I'll need, for installing Xen with Ubuntu 11.10 as a Dom0? (I fear that many of the sites and answers that I previously found may be out of date.) Or better still, would someone kindly post a brief, but up-to-date, tutorial here?

    Thanks much!

    • david6
      david6 over 12 years
      32bit or 64bit?
    • Lexalt
      Lexalt over 12 years
      @david6 I'd prefer to use 64-bit. But I'll use 32-bit if that is more stable for any reason.
    • Lexalt
      Lexalt over 12 years
      @david6 At the time of my first attempt, I ran into many problems, including those described here. Following the tutorial on that page got things partially working, but not without other problems, so I bailed without putting much more time into it.
    • Lexalt
      Lexalt over 12 years
      As for installing with Fedora 16 as Dom0, I did that a few weeks ago, so I don't recall the details. However, if I remember correctly, simply using "yum install xen" took care of most everything, including installing virt-manager. Like I said, its been a while, so maybe the was more to it than that. But in any case, installing the hypervisor was comparatively painless. Dealing with SELinux was another story.
    • Lexalt
      Lexalt over 12 years
      @david6 - Thanks much for the list of dependencies to install. I tried again on a fresh install of Ubuntu 11.10 Desktop. Xen and Virtual Manager are both installed, but I seem to be having all the same problems that I had last time, most of which are discussed in the post by David Euler on beyondlinux.com. Like I said before, I was previously able to get Xen working following that tutorial. But I was hoping that Ubuntu had streamlined the process to be more like Fedora 16.
    • Lexalt
      Lexalt over 12 years
      @Todd Deshane - Thanks for the links. The bderzhavets post is one of the tutorials that I relied on in my first attempt. It was somewhat helpful, but it underscores the need for a streamlined approach to get Xen up and running on Ubuntu. But the zulcss link was new to me. It implies a simplicity that I didn't experience when attempting to get Xen running of Ubuntu DESKTOP running as Dom0. I'll install on Ubuntu SERVER next to see if it goes more smoothly.
    • david6
      david6 over 12 years
      Can you add details of your errors (or confirm if identical to David Euler's)? Did you try his fix? (eg. cp -r /usr/share/qemu-linaro/ /usr/share/qemu) This could probably be improved on, or correct at source.
  • Todd Deshane
    Todd Deshane over 12 years