Giter Club home page Giter Club logo

Comments (7)

ooraini avatar ooraini commented on June 4, 2024

I was able to get things working with the following template:

DOMAIN_VNC_XML = """
<domain type='kvm'>
  <name></name>
  <memory unit='KiB'>786432</memory>
  <currentMemory unit='KiB'>786432</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state='off'/>
  </features>
  <cpu mode='host-model' check='partial'>
    <model fallback='allow'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <controller type='usb' index='0' model='ich9-ehci1'></controller>
    <controller type='pci' index='0' model='pci-root'/>
    <console type='pty'>
      <target type='serial'/>
    </console>
    <console type='pty'>
      <target type='virtio'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type="vnc" port="-1" autoport="yes" listen="127.0.0.1" keymap="en-us">
      <listen type="address" address="127.0.0.1"/>
    </graphics>
    <audio id="1" type="none"/>
    <video>
      <model type="virtio" heads="1" primary="yes">
        <acceleration accel3d="no"/>
      </model>
    </video>
    <memballoon model='virtio'></memballoon>
  </devices>
</domain>
"""  # NOQA

After looking at libvirt documentation, I removed <address> elements and it's working fine.

from virt-lightning.

goneri avatar goneri commented on June 4, 2024

Thank you for the bug report. I'm surprised qxl is not supported.

According to https://libvirt.org/formatdomain.html#video-devices

The video element is the container for describing video devices. For backwards compatibility, if no video is set but there is a graphics in domain xml, then libvirt will add a default video according to the guest type.

So maybe it's even better to just drop the <video /> section and let Libvirt handle it.

from virt-lightning.

ooraini avatar ooraini commented on June 4, 2024

@goneri
I removed the video section and indeed a default one was added:

    <video>
      <model type="cirrus" vram="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
    </video>

Please note that I had to also change the <graphics> section to VNC. The spice-server package is no longer included in Stream 9, and for that matter RHEL 9.

We can also make the template string itself configurable and that way the user can supply their own custom XML.

from virt-lightning.

goneri avatar goneri commented on June 4, 2024

@goneri I removed the video section and indeed a default one was added:

    <video>
      <model type="cirrus" vram="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
    </video>

Please note that I had to also change the <graphics> section to VNC. The spice-server package is no longer included in Stream 9, and for that matter RHEL 9.

I would suggest to:

  • default on VNC, it should work well enough for everybody.
  • add a configuration key to pass a different driver.

We can also make the template string itself configurable and that way the user can supply their own custom XML.

Yes, it's a good idea.

Would you like to submit a patch for one of these features?

from virt-lightning.

ooraini avatar ooraini commented on June 4, 2024

To summarize:

  • VNC for graphics section.
  • No video section(Defaulted by libvirt)
  • Two consoles, emulated and accelerated
  • QEMU agent connection channel.
  • Configurable XML snippets.

from virt-lightning.

goneri avatar goneri commented on June 4, 2024

Can we close the issue now?

from virt-lightning.

ooraini avatar ooraini commented on June 4, 2024

I did try to work on configurable XML snippet, but I faced some issues on the way I propagated the configuration across all classes. I ended up with a lot of changes and not-so clean code. I will close this for now.

from virt-lightning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.