After commenting out the stuffs related to VGA according to your instruction, the console module is configured successfullly when creating the VM. Something related to GENERIC device went wrong. dmesg shows "generic (generic): can't hook port 0x3b4 (already hooked?)". As I had borrowed and adapted the XML config file from default.xml, I merely commented out the part (marking in red as follows, note it's related to graphic card) to smooth the setup process.
Then I launched the VM with delight and used v3_cons to monitor the bootup process. While the terminal displays,
And the prompt "boot:" started to repeat endlessly. After googling for a while, I came to the conclusion that the problem is most common when booting up Ubuntu, rather than other Linux distribution, and is related to the underlying hardware (graphic card) on which the guest OS (Ubuntu Server) is booting. I'm not sure if it has something to do with the action that I commented out the graphic-cards-related stuffs in the config file. I am also trying to boot up a lightweight guest OS instead of Ubuntu to bypass the error. Or maybe there is some workaround to preserve the stufff related to graphic cards in the XML config file?
I have received enough support and valuable help from you and thank you very much for your time. It'll be great if you have any suggestion on this Ubuntu specific problem. Or do you experience the similar situation when deploying on Ubuntu? Thank you.
Appendix: part of the XML config file
<device class="GENERIC" id="generic">
<ports>
<start>0x00</start>
<end>0x07</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<start>0xc0</start>
<end>0xc7</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- DMA 1 page registers -->
<start>0x81</start>
<end>0x87</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- DMA 2 page registers -->
<start>0x88</start>
<end>0x8f</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- DMA 1 Misc Registers -->
<start>0x08</start>
<end>0x0f</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- DMA 2 Misc Registers -->
<start>0xd0</start>
<end>0xde</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- Serial COM 1 -->
<start>0x3f8</start>
<end>0x3ff</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- Serial COM 2 -->
<start>0x2f8</start>
<end>0x2ff</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- Serial COM 3 -->
<start>0x3e8</start>
<end>0x3ef</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- Serial COM 4 -->
<start>0x2e8</start>
<end>0x2ef</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- Parallel Port -->
<start>0x378</start>
<end>0x37f</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<!--
<ports>
-->
<!-- Graphics Card modeerations -->
<!--
<start>0x3b0</start>
<end>0x3bb</end>
<mode>PRINT_AND_PASSTHROUGH</mode>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
-->
<!-- Graphics Card modeerations -->
<!--
<start>0x3c0</start>
<end>0x3df</end>
<mode>PRINT_AND_PASSTHROUGH</mode>
<mode>PRINT_AND_IGNORE</mode>
</ports>
-->
<ports>
<!-- ISA PNP -->
<start>0x274</start>
<end>0x277</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- ISA PNP -->
<start>0x279</start>
<end>0x279</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
<ports>
<!-- ISA PNP -->
<start>0xa79</start>
<end>0xa79</end>
<mode>PRINT_AND_IGNORE</mode>
</ports>
</device>
</devices>
</vm>
==========
Shi FENG (冯时)
PACMAN Group
Institute of High Performance Computing
Department of Computer Science and Technology
Tsinghua University
Haidian District, Beijing, China