5

I am following the installation/setup instructions at https://help.ubuntu.com/community/XenProposed to install ubuntu + xen. I was able to install a PV guest OS. However, when I got to the HVM guest OS part, I keep getting the statement:

error: domain 'ubuntu-hvm' does not exist

This error shows when I execute the following command:

sudo xm create /etc/xen/ubuntu-hvm.cfg

My ubuntu-hvm.cfg looks like the following:

builder = "hvm"
name = "ubuntu-hvm"
memory = "512"
vcpus = 1
vif = ['']
disk = ['phy:/dev/xenvg/ubuntu-hvm,hda,w','file:/home/jwayne/ubuntu-12.04-desktop-amd64.iso,hdc:cdrom,r']
vnc = 1
boot="dc"

I did some internet searches, and some site the dhcp = 'dhcp' line in the configuration file as the problem (which I do not have). I've also seen some variations of the configuration file where they set:

kernel = "/usr/lib/xen-4.1/boot/hvmloader"

which doesn't resolve the error message for me.

The way I create a logical volume is as follows:

sudo lvcreate -L 4G -n ubuntu-hvm /dev/xenvg

The logs at /var/log/xen/qemu-dm-ubuntu-hvm.log looks like the following.

Using file /dev/xenvg/ubuntu-hvm in read-write mode
Using file /home/jwayne/ubuntu-12.04-desktop-amd64.iso in read-only mode
Watching /local/domain/0/device-model/3/lodirty/cmd
Watching /local/domain/0/device-model/3/command
Watching /local/domain/3/cpu
qemu_map_cache_init nr_buckets = 10000 size 4194304
shared page at pfn feffd
buffered io page at pfn feffb
Guest uuid = d56fc9dd-0a2e-a797-8ebe-c4f0d7a4fae8
Time offset set 0
populating video RAM at ff000000
mapping video RAM at ff000000
Register xen platform.
Done register platform.
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.
xs_read(/local/domain/0/device-model/3/xen_extended_power_mgmt): read error
Could not read keymap file: '/usr/share/qemu/keymaps/en-us'

How can I fix this problem?

  • Take a look at your /var/log/xen/qemu-dm-* log. That message happens when QEMU doesn't start correctly for some reason. – Todd Deshane May 28 '12 at 15:56
  • thanks, it seems the directory, /usr/share/qemu, doesn't even exists. however, there is a directory, /usr/share/qemu-linaro. i simply copied the directory: cp -fr /usr/share/qemu-linaro /usr/share/qemu. now the VM starts. thanks for the pointer! – Jane Wayne May 29 '12 at 2:02
  • @ToddDeshane though the HVM guest OS is running now, i can't seem to connect to it via VNC (using VNC Viewer from a Windows box). Any ideas? – Jane Wayne May 29 '12 at 3:00
5

When I had this problem with the same example it was because the keymap files were not in the correct directory. The logs at /var/log/xen/qemu-dm-ubuntu-hvm1.log showed:

Could not read keymap file: '/usr/share/qemu/keymaps/en-us'

The quick solution was to make a symlink for, where the keymaps are now to where xen expects it:

ln -s /usr/share/qemu-linaro/ /usr/share/qemu/
0

It looks like the qemu keymap issue can be worked around in the code by adding to the qemu search path with -L <dir>. I think this github code change fixes it.

0

Please use this link ln -s /usr/share/qemu-linaro/ /usr/share/qemu/, but without /

correct: ln -s /usr/share/qemu-linaro /usr/share/qemu

After that HVM started successfully

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.