[xen-tools] domU save-state issue with xen-tools & long hostnames

Graham Freeman graham.freeman at cernio.com
Sun Sep 30 00:54:20 CEST 2007


Howdy, folks,

So, I found a xen-tools-related domU save-state issue on one of my  
new Xen servers.

Here's a summary of my environment:

8-core 2GHz Xeon
16GB RAM
Ubuntu 6.06.1-LTS
Xen 3.1
Xen-Tools v3.7 installed from .tgz

example command used to create an image:
'xen-create-image --hostname amphibia.longcompanyname.com --memory  
2GB --size 25GB --dist dapper --ip 209.237.eli.ded'


This resulted in the hostname on the virtual machine being set to  
"amphibia.longcompanyname.com", which is also how Xen saw it for  
virtual machine management purposes.  Unfortunately, that's too long  
for Xen, and it handles the situation poorly.   Instead of  
complaining that the hostname is too long, it simply errors out in  
certain circumstances (e.g. rebooting the dom0) and instead of saving  
the state of the VM to disk, it triggers a clean shutdown of the VM.

However, a nearly-identical VM with hostname 'enable.short.com'  
worked fine, indicating that the length of the hostname was the issue.

The solution was to change the hostname from Xen's perspective by  
changing the file '/etc/xen/amphibia.longcompanyname.com.cfg' so that  
this line:


name        = 'amphibia.longcompanyname.com'


was shortened thus:


name        = 'amphibia'


One final clean shutdown of amphibia and then re-start (via 'xm  
create /etc/xen/amphibia.longcompanyname.com.cfg'), and now Xen  
properly saves the state of the VM when I run '/etc/init.d/xendomains  
stop'.



Graham Freeman
General Manager, Cernio Technology Cooperative
Email/Jabber:  graham.freeman at cernio.com
+1 415 462 2991
http://cernio.com/cooperative/





More information about the xen-tools-discuss mailing list