All,
I post this issue since I couldn't find anybody report a similar one before. If it is a known issue, please let me know.
1. Problem
If the configuration of a PV VM contains following line, the VM won't be able to restart if it is under xend domain management.
vfb = [ "type=vnc, vncunused=0, vncdisplay=10" ]
2. Environment
Xen Version: Xen-3.4.2-2, 64 bit.
Domain-0 OS: Linux version 2.6.18-194.11.4.el5xen (
mockbuild@xxxxxxxxxxxxxxxxxxxx) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Sep 21 05:40:24 EDT 2010
PV-VM OS: Linux version 2.6.18-194.11.4.el5xen (
mockbuild@xxxxxxxxxxxxxxxxxxxx) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Sep 21 05:40:24 EDT 2010
3. Steps to reproduce
VM Configuration: /etc/xen/abc
name = "abc"
uuid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
maxmem = "3072"
memory = "3072"
vcpus = "4"
bootloader = "/usr/bin/pygrub"
>
>>vfb = [ "type=vnc, vncunused=0, vncdisplay=10" ]
disk = [ "phy:/dev/VolGroup00/lv_xxx,xvda,w", ]
vif = ["mac=xx:xx:xx:xx:xx:xx,bridge=abcd", "mac=xx:xx:xx:xx:xx:xx,bridge=def" ]
Once the VM is created, the problem can be consistently reproduced using following commands,
#xm new abc
#xm start abc
Connecting to VM's console at this moment will see following messages, as expected.
Turning off swap:
Unmounting file systems:
Please stand by while rebooting the system...
Restarting system.
However, the VM won't start up even though it says "Restaring system". Connecting to the console at this time, the console shows nothing. xm list displays the state of the vm as following,
mss 31 3072 4 -b---- 1.5
Instead of using "xm reboot abc", the problem can also be reproduced if ssh to the VM and issues a reboot command.
4. Further findings:
a) Replace vfb = [ "type=vnc, vncunused=0, vncdisplay=10" ] with vfg = [ ] in /etc/xen/abc can solve the problem. However, we have to enable VNC.
b) Following methods can be used to start the VM after the VM is in problem,
Method 1:
# xm destroy abc
# xm new abc
# xm start abc
Method 2:
# xm destroy abc
# xm creat abc
Method 3:
# xm destroy abc
# service xend stop
Remove following line from /var/lib/xend/domains/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/config.sxp
(device
(console
(protocol vt100)
(location 2)
(uuid e0ad7f84-107b-4ff7-0378-43f40442d8f7)
)
)
Be noted that above lines are added by xend when executing "xm destroy abc" or "service xend stop". When the file is created when running "xm new abc", it doesn't have above lines. Are these new added lines conflict with VNC configuration, somehow?
After removing above lines, the VM can be started using following commands,
# service xend start
# xm start abc
5. Any suggestion?
Is there any solution if we have to support all of following features?
a) have to configure VNC for the VM
b) have to add VM under Xend management by using "xm new"
c) have to allow a VM rebooting itself