Xen FAQ DomU

From Xen
Jump to navigationJump to search

My DomU does not fully start?

It shows the following output stopping at Continue...

$ sudo xm console test
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

Xen virtual console successfully installed as xvc0 Event-channel device installed. netfront: Initialising virtual ethernet driver. i8042.c: No controller found. mice: PS/2 mouse device common for all mice TCP bic registered NET: Registered protocol family 1

NET: Registered protocol family 17

Using IPI No-Shortcut mode xen-vbd: registered block device major 8 blkfront: sda2: barriers enabled XENBUS: Device with no driver: device/console/0 Freeing unused kernel memory: 140k freed kjournald starting. Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode.

***************************************************************

***************************************************************
** WARNING: Currently emulating unsupported memory accesses **
**	in /lib/tls glibc libraries. The emulation is	**
**	slow. To ensure full performance you should	**
**	install a 'xen-friendly' (nosegneg) version of   **
**	the library, or disable tls support by executing **
**	the following as root:	**
**	mv /lib/tls /lib/tls.disabled	**
** Offending process: modprobe (pid=663)	**
***************************************************************
*************************************************************** 
Continuing...


It might only be that you don't have a VPS physical console, and that your VPS is fully booted, but you can't see it. There are few things to check.

First, check that your VPS has a "console" device in /dev. Mount your domU filesystem in the dom0, go in /dev and do:/dev/MAKEDEV console

If you are using a modern Xen kernel and hypervisor, you should check the parameters of the startup file. Check that it has the following option:


extra = "4 TERM=xterm xencons=tty console=tty1"


Then start your VPS and watch it booting. Note that once it's booted up, you should check that it has a xen friendly libc6 installed (in Debian, you would do "apt-get install libc6-xen").

Is there a way to set the credit-scheduler's limits and weights per domU in the domU configuration file?

weight= in the xm config file works, unless you are using RHEL or CentOS.

How do I start an application from within a DomU?

Well, you could always just log in to that VM, open a terminal and run the program. Or you could SSH or telnet in to the VM, start a screen session and run the program.

A VM acts just like any other server, so the procedure for starting programs and executing commands locally and remotely are exactly the same as doing so on any computer.

Are DomU's shown in a permanent 'b' (blocked) status normal?

My domUs are in a permanent 'b' (blocked) status as shown by 'xm list', even though they are functioning just fine. That's not normal, is it?

It's normal for them to show as blocked when they aren't actively running something - in the same way that any process on a 'normal' machine will show as blocked when it's waiting for input, each guest will show as blocked when it's got nothing to do. Give something a processor intensive task to do and you'll find it changes state to running (at least some of the time).

Is there any way, to get the name of a domU from the network-common script?

hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----')


Is it possible to increase the screen resolution of my xen guest Windows Vista?

On current Xen, with stdvga=1 & videoram=16, resolutions up to 2048x1536x32 are possible. All that said, the RDP suggestion is probably a better way to access the guest in any case.

How to install Solaris via HTTP as a para guest?

Solaris 10 can only be used as HVM guest. OpenSolaris can be used as PV guest, installed from iso. You can't install it from http. Once you have it installed, you also need zfs support for pygrub (either that, or manually copying kernel and boot archive to dom0)

Boris provides some nice examples on his site : http://bderzhavets.wordpress.com/

Is it possible to find out the specific vnc Display Number of a domU?

virsh vncdisplay domU_name_or_id xenstore-ls /local/domain/domU_id/console

My guest domain does not create? What is wrong?

I am trying to create a guest domain. I specified the configurations in /etc/xen-tools/xen- tools.conf and I ran $sudo xen-create-image --hostname=virtualrouter1 --role=udev the output is: sudo: xen-create-image: command not found

Make sure you installed the Xen tools, for example: apt-get install xen-tools

I'm trying to assign a dynamic hostname to a xen instance as follows: Cfg file

kernel = "/root/vmlinuz-2.6.18-128.1.14.el5xen" ramdisk = "/root/initrd-2.6.18-128.1.14.el5xen.img" memory = 512
hostname = "uniquehostname"

#hostname = " uniquehostname.xen.org" name = "my-vm-name"
. . . . .

In both the cases, the instance is unable to get the correct hostname..

From "xm create --help_config" : hostname=NAME Set the kernel IP hostname. interface=INTF Set the kernel IP interface name. dhcp=off|dhcp Set the kernel dhcp option.

On most LInux distros, kernel hostname and IP address is ignored, making it somewhat useless. You need to use your normal distro method to set hostname on domU (/etc/sysconfig/network on RHEL)

What are the differences between 'xm_create' and 'xm_new' followed by 'xm_start'?

As far as I can see, there is something different between using 'xm create' and 'xm new' followed by 'xm start'. It's something to do with data being stored in XenStore. I couldn't suspend the one started with 'xm create'. Could someone please explain the effective difference between the two and when 'create' should be used instead of 'new' and vice-versa.

xm create -> domU configuration is NOT managed by xend. Usually using config files on /etc/xen. This is the easiest method to use for beginners, as you have a config file that you can edit manually. The default on RHEL5 (which uses Xen 3.1+).

"xm new" and "xm start" -> domU configuration is managed by xend. You change values using commands like "xm block-attach", which can modify settings online. No config file to edit manually. The default on current versions of Xen.

How can i synchronize a dom0 clock?

I have problem with domU clock. It lose 30 minutes each day. How can i synchronize it with dom0 clock?

Is this PV domU? If yes, setting /proc/sys/xen/independent_wallclock to 0 (the default) should make it sync with dom0. You only need ntp on dom0, and domUs will follow.

The alternative, set /proc/sys/xen/independent_wallclock to 1 and run ntp on domU. If this is a HVM dom0, running ntp on domU is your friend.

Also, check http://tuttodebian.blogspot.com/2008/05/xen-clocksource0-time-went-backwards.html to see if your system experience similar symptoms.

To resume:

       -------------------------------------------------------------------------------------------------------------------
       |   Classic XenoLinux Kern (up to 2.6.37)           |               Paravirt Ops Linux Kern (from 3.0)            |
--------------------------------------------------------------------------------------------------------------------------
 PV    | set independent_wallclock = 0 or 1                | set independent_wallclock =  1                              |
--------------------------------------------------------------------------------------------------------------------------
 HVM   | -> no PV timesource, no ind. wallclock, run NTP   | -> w/o PV time PVHVM extensions, no ind. wallclock, run NTP |
       |                                                   | -> /w PV time source, ind. wallclock always 1, run NTP      |
--------------------------------------------------------------------------------------------------------------------------

I would like to set sched-cred parameters on my domU configuration file. How can i do that?

cpu_cap & cpu_weight


Run "xm create --help_config" for details, and read http://wiki.xensource.com/xenwiki/CreditScheduler

Is it possible to increase guest memory without reboot?

You can do a "xm mem-set <Domain> <memory>" for a PV domU, but you had to set maxmem higher than current assignment beforehand.

Is it possible to take an already created domU sparse file and make it a non sparse file?

cp --sparse=never orig.img new.img


How do I change CD ISO images during a HVM install?

I have tried to change CD ISO images during a HVM install using the following commands but it doesn't work. After changing the CD ISO image, it doesn't detect the new ISO image.


(qemu) eject -f hdc (qemu) change hdc /media/hitachi/cd-rom-image.iso


se xm block-list <domid> to find the cdrom be-path for the domain, for example:


xm block-list 5 Vdev BE handle state evt-ch ring-ref BE-path 768 0 0 4 9 16383
/local/domain/0/backend/vbd/5/768 5632 0 0 1 -1 -1 /local/domain/0/backend/vbd/5/5632


Having identified the cdrom device (5632) you can check what iso image it is connected to:


xenstore-read /local/domain/0/backend/vbd/5/5632/params

(nothing returned)

To connect a new iso image:


xenstore-write /local/domain/0/backend/vbd/5/5632/params /mnt/gl3- tb1_store/MWWin2003R2SvrStdx86_BX2SVOL_EN.iso


And you can now see that it is connected:


xenstore-read /local/domain/0/backend/vbd/5/5632/params /mnt/gl3- tb1_store/MWWin2003R2SvrStdx86_BX2SVOL_EN.iso


This method works with both emulated devices and with gplpv drivers.

Is it possible to set the xen to boot the domU one by one when server starts?

Currently we have 20 domU, and if we boot them together, the the hard disk will be very very slow.

cd /etc/xen/config/........ && for i in * do ...... (start VM, .....)...... sleep 60 (or whatever time you think is right to start a VM) done

How do I create config files for VMs while they are running?

I use FluidVM on some of our VPS host nodes, and the management server has crashed, so now I need to recover the running VM's, somehow. FluidVM deploys the domU's on the hostnode dynamically from a database, i.e. there's no /etc/xen/vps1 (for example) config files. The domU's are still running on the servers, and I now want to create config files for them, while they're running. How would I be able todo this?

For example, here's a list of running VM's from one of the servers:


root@usaxen02:[~]$ xm list
Name	ID Mem(MiB) VCPUs State   Time(s) AndriesBurger_39_cronos		90	255	1 -b----	42.4
Bruce_18_carmen	60	255	1 r----- 3528327.5
Domain-0	0	3433	4 r----- 1116681.7
Rudi_14_mars	40	3007	2 -b---- 953036.3
Rudi_44_vps2	93	255	1 -b----	22.9


Is there any way to create a config file, /etc/xen/AndriesBurger_39_cronos, from the running domU AndriesBurger_39_cronos ?

You can use "xm list -l" to dump the configuration in SXP format; then you should be able to use "xm new" or "xm create" with the "-F" option to load an SXP-based config file. See the "xm" man page for more info - that's where I dug up this.

How to set up Xen DomU as Windows 2008 Server on a CentOS Dom0 machine?

Start using the normal way that you usually do when you install a HVM domU, whether it's virt-manager/virt-install or using manually-created config file. One additional thing to note is that for 64bit HVM domUs you need to make sure that acpi, apic, and pae is set to 1 on domU config file.

Once you get that Win2008 fully installed, you can install GPLPV driver later to improve performance.

dhclient fails in a domU with invalid UDP checksum error

This dhclient bug can be triggered if you are running your dhcp server in your dom0. The issue is not Xen specific.

The bug is that dhclient is incorrectly trying to validate the UDP checksum and discarding the packets. There is a patch to dhclient which fixes this issue. If you are seeing this you are encouraged to report the bug to your Linux distro.

As a workaround you can disable tx checksum offload on the vifX.Y device(s) in dom0.

References:

Where do I find more DomU FAQs?

See Xen Common Problems#Guest / DomU