# Can't create HVM domU with Xen

## stof

Hi,

i'm using Xen 3.3.0 with different paravirtualized gentoo hosts that work fine. I have a Intel Xeon E3110 @3.00 GHz CPU with VT enabled and my setup is based on a LVM on top of a RAID-0.

Now i need a HVM domU and can't get it to work. hvm use flag is set. I tried different xen-sources: 

2.6.18-r12

2.6.12 

2.6.27-r2 (from the other thread)

I'm using the routed approach from the Gentoo Xen docs. I also tried the bridged approach, still no result. I also tried different disk, network, vnc etc. configurations in my domUs config file. Its always the same.

All i see in qemu-dm-win0.log is this:

```
domid: 4

qemu: the number of cpus is 1

config qemu network with xen bridge for  tap4.0 xenbr0

Watching /local/domain/0/device-model/4/logdirty/next-active

Watching /local/domain/0/device-model/4/command

qemu_map_cache_init nr_buckets = 4000 size 196608

shared page at pfn 3ffe

buffered io page at pfn 3ffc

Time offset set 0

Register xen platform.

Done register platform.

I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0

```

Since all this HVM stuff is hardly documented i can only guess. 

Some output from xm dmesg:

```
...

(XEN) HVM: VMX enabled

...

(XEN) I/O virtualisation disabled

...

```

Should I/O virtualisation be enabled? If so: how? Do i need additional kernel parameters (iommu=1) or something? And does anybode use this CPU with HVM? 

Any hint is greatly appreciated.

----------

## bbgermany

Hi,

can you post your cfg-file for your HVM (located in /etc/xen).

thx, bb

----------

## stof

Sure. As i said, i played a lot with different configs (see commented lines).

```
kernel = "/usr/lib/xen/boot/hvmloader"

builder="hvm"

memory = 64

name = "win0"

vif = [ "type=ioemu, ip=ww.xx.yy.zz" ]

#vif = [ "type=ioemu, bridge=eth0" ]

#vif = ["mac=00:0C:29:13:78:15"]

#disk = ["phy:vg/win0_system,ioemu:hda,w", "file:/misc/images/windows_2003/w2003web.iso,ioemu:hdc:cdrom,r" ]

disk = ["phy:vg/win0_system,ioemu:hda,w"]

# enable VNC library for graphics, default = 1

#vnc=0

vnc=1

vncpasswd='topsecret'

vncdisplay=1

# disable SDL library for graphics

sdl=0

#sdl=1

```

I've now also tried to add a iommu=1 to my grub.conf to get this I/O virtualisation enabled (not sure if this is related at all):

```
title Gentoo XEN (Kernel 2.6.27-r2)

root (hd0,0)

kernel /boot/xen.gz iommu=1

module /boot/kernel-2.6.27-xen0 root=/dev/md3

```

Still xm dmesg shows I/O Virtualisation disabled.

(Edit: scrambled IPs...)

----------

## bbgermany

have you tried to start the DomU by hand or by the init script. does any error occure when you start it by hand?

```

xm create hvm.cfg

```

maybe if you have an X-server running on that machine "-c" could be added to open up the "console".

bb

----------

## stof

Thanks for your - really quick - answers.

I only tried it by hand. 

```
[xen0 xen]# xm create win0

Using config file "/etc/xen/win0".

Started domain win0

```

But the win0 doesn't get started and is not shown in xm list.

```
[xen0 xen]# tail /var/log/xen/xend.log

[2008-11-04 15:21:44 5494] WARNING (image:472) domain win0: device model failure: no longer running; see /var/log/xen/qemu-dm-win0.log

[2008-11-04 15:21:44 5494] DEBUG (XendDomainInfo:1946) Releasing devices

[2008-11-04 15:21:44 5494] DEBUG (XendDomainInfo:1952) Removing vif/0

[2008-11-04 15:21:44 5494] DEBUG (XendDomainInfo:888) XendDomainInfo.destroyDevice: deviceClass = vif, device = vif/0

[2008-11-04 15:21:44 5494] DEBUG (XendDomainInfo:1952) Removing vbd/768

[2008-11-04 15:21:44 5494] DEBUG (XendDomainInfo:888) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/768

[2008-11-04 15:21:44 5494] DEBUG (XendDomainInfo:1952) Removing vfb/0

[2008-11-04 15:21:44 5494] DEBUG (XendDomainInfo:888) XendDomainInfo.destroyDevice: deviceClass = vfb, device = vfb/0

[2008-11-04 15:21:44 5494] DEBUG (XendDomainInfo:1952) Removing console/0

[2008-11-04 15:21:44 5494] DEBUG (XendDomainInfo:888) XendDomainInfo.destroyDevice: deviceClass = console, device = console/0

```

The machine doesn't have X. It's a remote only server with no screen attached. (I have IPMI access though.) The HVM guests should be made available via vnc. But as i said: no matter if i enable/disable vnc or even disable graphical output at all: I always end with this line in the qemu log:

```
I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0 
```

----------

## bbgermany

Hi,

seems it wrote a logfile. Whats written there: /var/log/xen/qemu-dm-win0.log 

bb

EDIT: have you tried:

```

disk = ['phy:/dev/vg//win0_system,sda1,w']

```

instead of 

```

disk = ["phy:vg/win0_system,ioemu:hda,w"] 

```

----------

## stof

Yes, please see my first post above for the logfile.

Do you have HVM running? What is your output for

```
xm dmesg | grep virtualisation
```

Is it enabled or disabled for you?

----------

## bbgermany

I need to check my server at home. But its offline atm. Havent tried it for ages now  :Very Happy: 

bb

EDIT: i rechecked a german howto for HVM. you MUST use a full path at phy: in your config file. otherwise lotsa users reported it wont work.

EDIT2: check out this ubuntu howto: https://help.ubuntu.com/community/Xen this helped me a lot as well in the past.

----------

## stof

Thanks, that actually was the problem. I already found out that it works, if i specified a image file with file: in my config. But it also works with an absolute path to my logical LVM volume:

```
disk = ["phy:/dev/vg/win0_system,ioemu:hda,w", "file:/misc/images/windows_2003/w2003web.iso,ioemu:hdc:cdrom,r" ]

```

I also had to make sure that boot="d", since c doesn't contain anything bootable yet. So boot="cd" also didn't work with an empty image.

Thanks again!

----------

## bbgermany

Hi,

glad to see you got it working. IIRC boot="dc" should work as well.

bb

----------

