Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported configuration: Only the first console can be a serial port #8

Open
mshenhera opened this issue Mar 28, 2013 · 0 comments
Open

Comments

@mshenhera
Copy link

OZ dep package in packages directory installs Guest.py that generates wrong xml file. This leads to the next problem:

Putting the kickstart in place
Writing cpio to /var/lib/oz/icicletmp/centos60_x86_64/extra.cpio
Generating 10GB diskimage for centos60_x86_64
Running install for centos60_x86_64
Generate XML for guest centos60_x86_64 with bootdev None
Generated XML:
<?xml version="1.0"?>
<domain type="kvm">
  <name>centos60_x86_64</name>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <uuid>91333bf5-d4fe-4a67-aa74-8fbb5ef456c6</uuid>
  <clock offset="utc"/>
  <vcpu>1</vcpu>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <os>
    <type>hvm</type>
    <kernel>/var/lib/libvirt/images/centos60_x86_64-kernel</kernel>
    <initrd>/var/lib/libvirt/images/centos60_x86_64-ramdisk</initrd>
    <cmdline>method=http://mirror.rackspace.com/centos/6/os/x86_64/ ks=file:/ks.cfg</cmdline>
  </os>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <console device="pty"/>
    <graphics port="-1" type="vnc"/>
    <interface type="bridge">
      <source bridge="virbr0"/>
      <mac address="52:54:00:ab:88:52"/>
      <model type="virtio"/>
    </interface>
    <input bus="ps2" type="mouse"/>
    <console type="pty">
      <target port="0"/>
    </console>
    <serial type="tcp">
      <source mode="bind" host="127.0.0.1" service="12458"/>
      <protocol type="raw"/>
      <target port="1"/>
    </serial>
    <disk device="disk" type="file">
      <target dev="vda" bus="virtio"/>
      <source file="/var/lib/libvirt/images/centos60_x86_64.dsk"/>
    </disk>
  </devices>
</domain>

Cleaning up guest named centos60_x86_64
Cleaning up after install
Traceback (most recent call last):
  File "/usr/bin/oz-install", line 152, in <module>
    libvirt_xml = guest.install(timeout, force_download)
  File "/usr/lib/pymodules/python2.7/oz/Guest.py", line 1435, in install
    return self._do_install(timeout, force, 0)
  File "/usr/lib/pymodules/python2.7/oz/Guest.py", line 1416, in _do_install
    dom = self.libvirt_conn.createXML(xml, 0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2189, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirt.libvirtError: unsupported configuration: Only the first console can be a serial port
Thu Mar 28 10:00:11 EET 2013: 0: centos60_x86_64.qcow2: ERROR: Build failed
make[1]: *** [publish/centos60_x86_64.qcow2] Error 1
make[1]: Leaving directory `/root/oz-image-build'
make: *** [centos60_x86_64] Error 2

Problem can be solved by patching Guest.py:

--- /usr/lib/pymodules/python2.7/oz/Guest.py-orig       2013-03-28 10:01:57.165016710 +0200
+++ /usr/lib/pymodules/python2.7/oz/Guest.py    2013-03-28 10:02:22.480698450 +0200
@@ -362,9 +362,6 @@

         # create devices
         devices = domain.newChild(None, "devices", None)
-        # console
-        console = devices.newChild(None, "console", None)
-        console.setProp("device", "pty")
         # graphics
         graphics = devices.newChild(None, "graphics", None)
         graphics.setProp("port", "-1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant