Comments (7)
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.
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.
@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 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.
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.
Can we close the issue now?
from virt-lightning.
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)
- Add delete function HOT 2
- CLI confusion HOT 1
- Snapshots / restore? HOT 2
- Use python2 in inventory for Trusty VM HOT 2
- Libvirt network config doesn't handle DHCP section HOT 1
- Failed to connect socket to '/opt/homebrew/var/run/libvirt/virtqemud-sock' HOT 2
- Mounts ? HOT 1
- setting staitc ip with ivp4 dosen't work HOT 3
- New release on pypi HOT 1
- testing the app locally without installing it each time HOT 1
- wrong resolve.conf values when using new libvirt network HOT 2
- 'vl start' has no option for disk configuration HOT 2
- vl doesn't seem to work with Python 3.10 HOT 1
- Live snapshot is not supported
- asyncio.Event loop parameter removal in Python 3.10 HOT 1
- pip3 install --user virt-lightning error: externally-managed-environment Debian-12 HOT 3
- better support VM image file extensions for config.ini private_hub= HOT 2
- How do I add my own images ? or better yet can we get debian-13 on the list ? HOT 3
- Enable Flake8-pyproject
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from virt-lightning.