ovirt-engine
ovirt-engine copied to clipboard
HostedEngine lost xml param in conf file
log
2022-05-05 05:54:47,742+0300 INFO (jsonrpc/1) [api.virt] START create(vmParams={'vmId': 'f75316cb-6e94-445e-ad01-09219be02031', 'memSize': '16384', 'display': 'vnc', 'vmName': 'HostedEngine', 'spiceSecureChannels': 'smain,sdisplay,sinputs,scursor,splayback,srecord,ssmartcard,susbredir', 'smp': '4', 'maxVCpus': '32', 'cpuType': 'SandyBridge,+pcid,+spec-ctrl,+ssbd,+md-clear', 'emulatedMachine': '', 'devices': [{'index': '2', 'iface': 'ide', 'address': {'controller': '0', 'target': '0', 'unit': '0', 'bus': '1', 'type': 'drive'}, 'specParams': {}, 'readonly': 'true', 'deviceId': '', 'path': '', 'device': 'cdrom', 'shared': 'false', 'type': 'disk'}, {'index': '0', 'iface': 'virtio', 'format': 'raw', 'poolID': '00000000-0000-0000-0000-000000000000', 'volumeID': 'ba019898-807e-4c64-ab58-e7d4e770602d', 'imageID': 'e9eb058b-acba-4e9c-97fa-73366c5f74d1', 'specParams': {}, 'readonly': 'false', 'domainID': '989e8f8e-3f3e-4757-a305-4c4f3fa3ceef', 'optional': 'false', 'deviceId': 'ba019898-807e-4c64-ab58-e7d4e770602d', 'address': {'bus': '0x00', 'slot': '0x06', 'domain': '0x0000', 'type': 'pci', 'function': '0x0'}, 'device': 'disk', 'shared': 'exclusive', 'propagateErrors': 'off', 'type': 'disk', 'bootOrder': '1'}, {'device': 'scsi', 'model': 'virtio-scsi', 'type': 'controller'}, {'nicModel': 'pv', 'macAddr': '00:16:3e:14:e2:f9', 'linkActive': 'true', 'network': 'ovirtmgmt', 'specParams': {}, 'deviceId': '', 'address': {'bus': '0x00', 'slot': '0x03', 'domain': '0x0000', 'type': 'pci', 'function': '0x0'}, 'device': 'bridge', 'type': 'interface'}, {'device': 'console', 'type': 'console'}, {'device': 'vga', 'alias': 'video0', 'type': 'video'}, {'device': 'vnc', 'type': 'graphics'}, {'device': 'virtio', 'specParams': {'source': 'urandom'}, 'model': 'virtio', 'type': 'rng'}]}) from=127.0.0.1,35216, vmId=f75316cb-6e94-445e-ad01-09219be02031 (api:48)
2022-05-05 05:54:47,742+0300 ERROR (jsonrpc/1) [api] FINISH create error='xml' (api:134)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/vdsm/common/api.py", line 124, in method
ret = func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/vdsm/API.py", line 194, in create
xml = vmParams.get('_srcDomXML') or vmParams['xml']
KeyError: 'xml'
2022-05-05 05:54:47,742+0300 INFO (jsonrpc/1) [api.virt] FINISH create return={'status': {'code': 100, 'message': 'General Exception: ("\'xml\'",)'}} from=127.0.0.1,35216, vmId=f75316cb-6e94-445e-ad01-09219be02031 (api:54)
workaround ("/usr/lib/python3.6/site-packages/vdsm/API.py", line 194):
# self._UUID is None in this call, it must be retrieved from XML
try:
xml = vmParams.get('_srcDomXML') or vmParams['xml']
except:
xml = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<domain xmlns:ovirt-tune="http://ovirt.org/vm/tune/1.0" xmlns:ovirt-vm="http://ovirt.org/vm/1.0" type="kvm"><name>HostedEngine</name><uuid>f75316cb-6e94-445e-ad01-09219be02031</uuid><memory>16777216</memory><currentMemory>16777216</currentMemory><iothreads>1</iothreads><maxMemory slots="16">67108864</maxMemory><vcpu current="4">32</vcpu><sysinfo type="smbios"><system><entry name="manufacturer">oVirt</entry><entry name="product">OS-NAME:</entry><entry name="version">OS-VERSION:</entry><entry name="family">oVirt</entry><entry name="serial">HOST-SERIAL:</entry><entry name="uuid">f75316cb-6e94-445e-ad01-09219be02031</entry></system></sysinfo><clock offset="variable" adjustment="0"><timer name="rtc" tickpolicy="catchup"/><timer name="pit" tickpolicy="delay"/><timer name="hpet" present="no"/></clock><features><acpi/><vmcoreinfo/></features><cpu match="exact"><model>SandyBridge</model><topology cores="8" threads="2" sockets="2"/><numa><cell id="0" cpus="0-31" memory="16777216"/></numa></cpu><cputune/><devices><input type="tablet" bus="usb"/><channel type="unix"><target type="virtio" name="org.qemu.guest_agent.0"/><source mode="bind" path="/var/lib/libvirt/qemu/channels/f75316cb-6e94-445e-ad01-09219be02031.org.qemu.guest_agent.0"/></channel><graphics type="spice" port="-1" autoport="yes" passwd="*****" passwdValidTo="1970-01-01T00:00:01" tlsPort="-1"><channel name="main" mode="secure"/><channel name="inputs" mode="secure"/><channel name="cursor" mode="secure"/><channel name="playback" mode="secure"/><channel name="record" mode="secure"/><channel name="display" mode="secure"/><channel name="smartcard" mode="secure"/><channel name="usbredir" mode="secure"/><listen type="network" network="vdsm-ovirtmgmt"/></graphics><controller type="pci" model="pcie-root-port" index="13"><address bus="0x00" domain="0x0000" function="0x4" slot="0x03" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="4"><address bus="0x00" domain="0x0000" function="0x3" slot="0x02" type="pci"/></controller><controller type="sata" index="0"><address bus="0x00" domain="0x0000" function="0x2" slot="0x1f" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="16"><address bus="0x00" domain="0x0000" function="0x7" slot="0x03" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="10"><address bus="0x00" domain="0x0000" function="0x1" slot="0x03" type="pci"/></controller><controller type="usb" model="qemu-xhci" index="0" ports="8"><alias name="ua-42ee5e88-3ac9-4a80-b127-49967506cd54"/><address bus="0x04" domain="0x0000" function="0x0" slot="0x00" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="11"><address bus="0x00" domain="0x0000" function="0x2" slot="0x03" type="pci"/></controller><rng model="virtio"><backend model="random">/dev/urandom</backend><alias name="ua-4f26a36f-8521-4086-8a5f-5efc37ffcea3"/></rng><memballoon model="virtio"><stats period="5"/><alias name="ua-5e362997-092a-4979-ac2d-a45c42df6287"/><address bus="0x07" domain="0x0000" function="0x0" slot="0x00" type="pci"/></memballoon><controller type="pci" model="pcie-to-pci-bridge" index="18"><address bus="0x01" domain="0x0000" function="0x0" slot="0x00" type="pci"/></controller><video><model type="qxl" vram="32768" heads="1" ram="65536" vgamem="16384"/><alias name="ua-6ff57534-3157-49a3-bf7d-0ce9b50cf37e"/><address bus="0x00" domain="0x0000" function="0x0" slot="0x01" type="pci"/></video><controller type="pci" model="pcie-root-port" index="2"><address bus="0x00" domain="0x0000" function="0x1" slot="0x02" type="pci"/></controller><controller type="virtio-serial" index="0" ports="16"><alias name="ua-8462b99d-4fa6-46b8-bb55-c932178c7552"/><address bus="0x05" domain="0x0000" function="0x0" slot="0x00" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="12"><address bus="0x00" domain="0x0000" function="0x3" slot="0x03" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="6"><address bus="0x00" domain="0x0000" function="0x5" slot="0x02" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="8"><address bus="0x00" domain="0x0000" function="0x7" slot="0x02" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="5"><address bus="0x00" domain="0x0000" function="0x4" slot="0x02" type="pci"/></controller><console type="unix"><source path="/var/run/ovirt-vmconsole-console/f75316cb-6e94-445e-ad01-09219be02031.sock" mode="bind"/><target type="serial" port="0"/><alias name="ua-ad39220f-68fb-41e9-a7dc-99b5dfca5de5"/></console><controller type="pci" model="pcie-root-port" index="9"><address bus="0x00" domain="0x0000" function="0x0" slot="0x03" type="pci" multifunction="on"/></controller><controller type="pci" model="pcie-root-port" index="17"><address bus="0x00" domain="0x0000" function="0x0" slot="0x04" type="pci"/></controller><controller type="scsi" model="virtio-scsi" index="0"><driver iothread="1"/><alias name="ua-c40d974b-3b2d-4aa8-98c6-c54d9b680cf6"/><address bus="0x03" domain="0x0000" function="0x0" slot="0x00" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="1"><address bus="0x00" domain="0x0000" function="0x0" slot="0x02" type="pci" multifunction="on"/></controller><controller type="pci" model="pcie-root-port" index="3"><address bus="0x00" domain="0x0000" function="0x2" slot="0x02" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="14"><address bus="0x00" domain="0x0000" function="0x5" slot="0x03" type="pci"/></controller><controller type="pci" model="pcie-root-port" index="15"><address bus="0x00" domain="0x0000" function="0x6" slot="0x03" type="pci"/></controller><graphics type="vnc" port="-1" autoport="yes" passwd="*****" passwdValidTo="1970-01-01T00:00:01" keymap="en-us"><listen type="network" network="vdsm-ovirtmgmt"/></graphics><sound model="ich6"><alias name="ua-f3ee4079-98cd-46a3-a384-340e449316ab"/><address bus="0x12" domain="0x0000" function="0x0" slot="0x01" type="pci"/></sound><controller type="pci" model="pcie-root-port" index="7"><address bus="0x00" domain="0x0000" function="0x6" slot="0x02" type="pci"/></controller><serial type="unix"><source path="/var/run/ovirt-vmconsole-console/f75316cb-6e94-445e-ad01-09219be02031.sock" mode="bind"/><target port="0"/></serial><channel type="spicevmc"><target type="virtio" name="com.redhat.spice.0"/></channel><controller type="pci" model="pcie-root"/><interface type="bridge"><model type="virtio"/><link state="up"/><source bridge="ovirtmgmt"/><driver queues="4" name="vhost"/><alias name="ua-18a81fa3-0a0f-4990-a967-5b712af6be9b"/><address bus="0x02" domain="0x0000" function="0x0" slot="0x00" type="pci"/><mac address="00:16:3e:14:e2:f9"/><mtu size="1500"/><filterref filter="vdsm-no-mac-spoofing"/><bandwidth/></interface><disk type="file" device="cdrom" snapshot="no"><driver name="qemu" type="raw" error_policy="report"/><source file="" startupPolicy="optional"><seclabel model="dac" type="none" relabel="no"/></source><target dev="sdc" bus="sata"/><readonly/><alias name="ua-9044898d-7a17-446f-8245-96fcd02c85c6"/><address bus="0" controller="0" unit="2" type="drive" target="0"/></disk><disk snapshot="no" type="file" device="disk"><target dev="vda" bus="virtio"/><source file="/rhev/data-center/00000000-0000-0000-0000-000000000000/989e8f8e-3f3e-4757-a305-4c4f3fa3ceef/images/e9eb058b-acba-4e9c-97fa-73366c5f74d1/ba019898-807e-4c64-ab58-e7d4e770602d"><seclabel model="dac" type="none" relabel="no"/></source><driver name="qemu" iothread="1" io="threads" type="raw" error_policy="stop" cache="none"/><alias name="ua-e9eb058b-acba-4e9c-97fa-73366c5f74d1"/><address bus="0x06" domain="0x0000" function="0x0" slot="0x00" type="pci"/><serial>e9eb058b-acba-4e9c-97fa-73366c5f74d1</serial></disk><lease><key>ba019898-807e-4c64-ab58-e7d4e770602d</key><lockspace>989e8f8e-3f3e-4757-a305-4c4f3fa3ceef</lockspace><target offset="LEASE-OFFSET:ba019898-807e-4c64-ab58-e7d4e770602d:989e8f8e-3f3e-4757-a305-4c4f3fa3ceef" path="LEASE-PATH:ba019898-807e-4c64-ab58-e7d4e770602d:989e8f8e-3f3e-4757-a305-4c4f3fa3ceef"/></lease></devices><pm><suspend-to-disk enabled="no"/><suspend-to-mem enabled="no"/></pm><os><type arch="x86_64" machine="pc-q35-rhel8.4.0">hvm</type><smbios mode="sysinfo"/><bios useserial="yes"/></os><metadata><ovirt-tune:qos/><ovirt-vm:vm><ovirt-vm:minGuaranteedMemoryMb type="int">1024</ovirt-vm:minGuaranteedMemoryMb><ovirt-vm:clusterVersion>4.6</ovirt-vm:clusterVersion><ovirt-vm:custom/><ovirt-vm:device alias="ua-18a81fa3-0a0f-4990-a967-5b712af6be9b" mac_address="00:16:3e:14:e2:f9"><ovirt-vm:custom/></ovirt-vm:device><ovirt-vm:device devtype="disk" name="vda"><ovirt-vm:poolID>00000000-0000-0000-0000-000000000000</ovirt-vm:poolID><ovirt-vm:volumeID>ba019898-807e-4c64-ab58-e7d4e770602d</ovirt-vm:volumeID><ovirt-vm:shared>exclusive</ovirt-vm:shared><ovirt-vm:imageID>e9eb058b-acba-4e9c-97fa-73366c5f74d1</ovirt-vm:imageID><ovirt-vm:domainID>989e8f8e-3f3e-4757-a305-4c4f3fa3ceef</ovirt-vm:domainID></ovirt-vm:device><ovirt-vm:launchPaused>false</ovirt-vm:launchPaused><ovirt-vm:resumeBehavior>auto_resume</ovirt-vm:resumeBehavior><ovirt-vm:ballooningEnabled>true</ovirt-vm:ballooningEnabled><ovirt-vm:cpuPolicy>none</ovirt-vm:cpuPolicy></ovirt-vm:vm></metadata></domain>'
vmParams['xml'] = xml
self._UUID = DomainDescriptor(xml, xml_source=XmlSource.INITIAL).id
vmParams['vmId'] = self._UUID
confim on 4.4.10, 4.5.0