# Can't start xend - this is not a privileged domain.

## darthazad

I am running 3.2.1-gentoo-r2 and have installed xen-4.1.1-r2 and xen-tools-4.1.1-r6 via portage. when I try to start xend I get: 

```
/etc/init.d/xend start

 * Use of the opts variable is deprecated and will be

 * removed in the future.

 * Please use extra_commands, extra_started_commands or extra_stopped_commands.

 * Can't start xend - this is not a privileged domain.

 * ERROR: xend failed to start

```

My curent kernel config for xen is:

```
grep XEN /usr/src/linux/.config

CONFIG_XEN=y

CONFIG_XEN_DOM0=y

CONFIG_XEN_PRIVILEGED_GUEST=y

CONFIG_XEN_PVHVM=y

CONFIG_XEN_MAX_DOMAIN_MEMORY=128

CONFIG_XEN_SAVE_RESTORE=y

CONFIG_PCI_XEN=y

CONFIG_XEN_PCIDEV_FRONTEND=y

CONFIG_XEN_BLKDEV_FRONTEND=y

CONFIG_XEN_BLKDEV_BACKEND=y

CONFIG_NETXEN_NIC=m

CONFIG_XEN_NETDEV_FRONTEND=y

CONFIG_XEN_NETDEV_BACKEND=y

CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y

CONFIG_HVC_XEN=y

CONFIG_XEN_FBDEV_FRONTEND=y

CONFIG_XEN_BALLOON=y

CONFIG_XEN_SCRUB_PAGES=y

CONFIG_XEN_DEV_EVTCHN=y

CONFIG_XEN_BACKEND=y

CONFIG_XENFS=y

CONFIG_XEN_COMPAT_XENFS=y

CONFIG_XEN_SYS_HYPERVISOR=y

CONFIG_XEN_XENBUS_FRONTEND=y

CONFIG_XEN_GNTDEV=y

CONFIG_XEN_GRANT_DEV_ALLOC=y

CONFIG_SWIOTLB_XEN=y

CONFIG_XEN_PCIDEV_BACKEND=y

```

My googleing has been fruitless, can anyone provide me with inspiration as to where to start troubleshooting this? 

N.B. I also tried linux-2.6.38-xen but could not for the life of me get it to actually compile without errors.

Edit:spelling

----------

## BillWho

darthazad,

Did you boot to the hypervisor? That error sounds like you just booted the kernel.  I'm not a xen expert, but I don't think you should have any frontend settings enabled for the dom0 kernel.

I installed this a few weeks ago and can tell you from experience that it's the most confusing configuration I've encountered so far. It seems the more you dig the more confusing it gets with conflicting and often outdated documentation.

I haven't done much with it since booting a Backtrack iso in the domu. As a matter of fact I imaged it to take it up another day. 

I can tell you that this is just the beginning of your headaches.

Good luck with it   :Cool: 

----------

## darthazad

Thank you for the response!

 *BillWho wrote:*   

> darthazad,
> 
> Did you boot to the hypervisor?
> 
> 

 

Now I just have to do some googleing and hopefully find out what that means.

----------

## BillWho

darthazad,

Just to clarify you have to start the xen hypervisor then load the linux kernel. Here's my grub.cfg entry. I'm using grub 2 so .97 will be different.

menuentry "Gentoo Linux-Xen (on /dev/sda13)" --class gnu-linux --class gnu --class os {

	insmod part_msdos

	insmod ext2

	set root='(hd0,msdos12)'

	search --no-floppy --fs-uuid --set=root 2403e6b1-caa5-4d5b-95be-cd7e9a07daf1  

	multiboot /xen.gz placeholder

	module  /xen0 placeholder root=/dev/sda13  rootfstype=ext3 ro vga=794 

	module  /xenram

}

Notice the line multiboot - that's the hypervisor (xen.gz) and the next two lines load your dom0 kernel and initramfs if you have one. I use a separate boot partition and use symlinks xen0 and xenram.

Also be aware that this not the sys-kernel/xen-sources - I'm using linux-3.0.8. 

If you enter 'xm info'  you should get a response of:

root@gentoo-ws490 ~ # xm info

host                   : gentoo-ws490

release                : 3.0.8

version                : #13 SMP Sat Mar 10 16:58:56 EST 2012

machine                : x86_64

nr_cpus                : 4

nr_nodes               : 1

cores_per_socket       : 2

threads_per_core       : 1

cpu_mhz                : 2992

hw_caps                : bfebfbff:20100800:00000000:00000940:0004e3bd:00000000:00000001:00000000

virt_caps              : hvm

total_memory           : 8189

free_memory            : 1110

free_cpus              : 0

xen_major              : 4

xen_minor              : 1

xen_extra              : .2

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

xen_commandline        : placeholder

cc_compiler            : gcc version 4.5.3 (Gentoo 4.5.3-r2 p1.0, pie-0.4.6) 

cc_compile_by          : root

cc_compile_domain      : home

cc_compile_date        : Mon Feb 27 20:58:11 EST 2012

xend_config_format     : 4

If you want the dom0 .config, just let me know

Good luck    :Cool: 

----------

## airwalk520

hi, Problem solved? I have a similar problem too,"Can't start xend - this is not a privileged domain".If the problem is solved, can give a hint what

thanks!

----------

