# Xen Dom0 boots, runs, but not really? [solved]

## dvh

I am totally new to Xen, but I have been using Gentoo for several years.  Just created a new 64-bit Gentoo machine using the xen-sources (2.6.34).  I followed this guide (http://www.gentoo.org/doc/en/xen-guide.xml).  The xen kernel boots just fine, and appears to function *normally* as I am able to work in dom0 without issues.

so, just to verify that the xen hypervisor was alive and well, I did this: 

```
gentoo-64 dvh # xm list

Error: Unable to connect to xend: No such file or directory. Is xend running?"
```

  as you can see, there was an issue connecting to the xend daemon.  I checked my process list (ps aux) and did not see the xen daemon.  strange.  so next I did this: 

```
gentoo-64 dvh # /etc/init.d/xend restart

Error: Unable to connect to xend: No such file or directory. Is xend running?

 * Stopping Xen control daemon ...                                                                                    [ ok ]

 * Starting Xen control daemon ...                                                                                    [ ok ]
```

  looks like the xen daemon should now be running.  but a quick process check shows

```
root     29733  0.0  0.4 116332 11932 ?        S    09:21   0:00 /usr/bin/python2.6 /usr/sbin/xend start

root     29734  0.0  0.4 133644 13964 ?        SLl  09:21   0:00 /usr/bin/python2.6 /usr/sbin/xend start
```

  it looks like the python script which should start the xend is still running, but the daemon is not.  back to the web, and I found someone who had a similar problem, and fixed it by updating python.  I checked python:

```
gentoo-64 dvh # eselect python list

Available Python interpreters:

  [1]   python2.6 *

  [2]   python3.1
```

 and thought I would try setting the default to the latest (3.1), and running python-updater.  when I do that, the emerge for alsa-lib fails.  also, the emerge for xen-tools fails (during some check for python > 2.2...strange!).

as I said, I am new to xen, and so now I have no idea where to go next.  please help if you can...

-dvhLast edited by dvh on Sun Aug 15, 2010 11:34 pm; edited 1 time in total

----------

## idella4

dvh,

this won't be hard.

Forget about python.  It's not that.  Go to your xen kernel end enter and post

grep EVTCHN .config

Do you have libvirt installed?  Which version of xen?  xen can be tender. Won't take too much  Also, have a look at your /etc/xen/xend-config.sxp and describe the settings.  Don't post it it's too long.  There's only a handful of settings in between all the commented text.

----------

## dvh

thanks for the quick response, idella4.  here is what you asked for:

```
gentoo-64 dom0 # grep EVTCHN .config 

CONFIG_XEN_DEV_EVTCHN=m

```

xen version is 4.0.0

no libvirt installed

-dvh

----------

## idella4

right,

lsmod

look for evtchn

My guess it's not there.  If not

modprobe evtchn

Post that xend-config if you're not there yet but it won't be long

----------

## dvh

oops, missed you last request.  Here are the only lines in xend-config:

```
(xend-relocation-server yes)

(xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$')

(network-script network-bridge)

(vif-script vif-bridge)

(dom0-min-mem 196)

(enable-dom0-ballooning yes)

(total_available_memory 0) 

(dom0-cpus 0)

(vncpasswd '')

```

-dvh

----------

## dvh

you are correct.  no evtchn shown by lsmod.  after doing the modprobe, I now get this response:

```
gentoo-64 xen # xm list

Name                                        ID   Mem VCPUs      State   Time(s)

Domain-0                                     0  2873     2     r-----   1623.3

```

so something is better.  trying to restart the xend still results in this:

```
root     30169  0.0  0.4 116320 11924 ?        S    10:54   0:00 /usr/bin/python2.6 /usr/sbin/xend start

root     30170  2.9  0.5 242592 16348 ?        SLl  10:54   0:00 /usr/bin/python2.6 /usr/sbin/xend start

```

I'm guessing it should not look like this.  do you recommend that I build the evtchn into the kernel, as opposed to being a module?  I certainly can do that.

-dvh

----------

## idella4

dvh

Uhhhh, it's fixed.

gentoo-64 xen # xm list

Name                                        ID   Mem VCPUs      State   Time(s)

Domain-0

is exactly right.  xm has listed the running domains.  There is only Domain-0,  your gentoo.

Module or builtin, either way.  your choice, both are fine.  Leave as a module, add the module to autoloading on boot, is fine.

what is wrong with your second cited output?

----------

## dvh

ok.  thanks again.  you were right, that was easy.  I guess I was still thrown off by the xend process listing, but I guess that will change when xend is started using the rc process.  you asked about libvirt...do I need this, and what value will it add?

-dvh

----------

## idella4

well, depends what you are aiming to do.  My preference is using virt-manager to run vms.  The vms are listed in the manager gui.

It pulls in libvirt and virtinst and some more python packages, and they really need the right use flags.

It's an option, not a required component.  Chances are if you have a clear plan to do, settle for it and don't worry about the others.

I find running bare xen is very manual.

If you go for virt-manager, fine.  It means you might be back for more to support ti get libvirt straightened out, maybe.

virtinst is very good, if you want to do some installing of vms.  If not and you have a plan, just as well do that.

Just add [solved] in your thread title.

----------

## dvh

guess I don't know WHAT I am aiming to do.  I'm just getting started with this.  I have been using Virtualbox on Mac OSX to run both gentoo and arch linux VMs.  I have stability issues with those VMs.  I have installed now (for dual boot) my gentoo-64 onto the Mac mini, and I want to investigate Xen, so that I can compare vs. Virtuabox.  I don't have a corporate need or any real reason to need virtualization, but I do want to learn, and gentoo has helped me learn in the past, so I thought I would try this for me second approach to virtualization.

With Virtualbox, I can and do run windows and linux guests, and for the most part, they are unmodified from their normal configurations (I do add something called "guest additions", which provide 3D graphics accel, mouse and keyboard integration, and shared folders).  I don't know enough about xen yet, but it looks to me like I will need specifically configured guests, as opposed to just their plain variants.  read just a bit about "HVM" kernels, but I don't yet know enough about those to be dangerous.

I quite obviously have a lot to learn.  thanks again for your help, and for pointing me towards virt-manager.  I will be checking that out.

-dvh

----------

