[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GUI-Login on bookworm-VM in a cloud



Christoph,

Not sure if this is relevant or not, sadly probably not useful.

https://libvirt.org/formatdomain.html
https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines
https://www.linux-kvm.org/page/VMchannel_Requirements
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-guest_virtual_machine_device_configuration-usb_devices#sect-USB_devices-Setting_a_limit_on_USB_device_redirection

https://www.spice-space.org/usbredir.html
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/chap-qemu_guest_agent#sect-QEMU_Guest_Agent-Set_Up_Communication_between_Guest_Agent_and_Host-Linux
Chapter 11. Enhancing Virtualization with the QEMU Guest Agent

 Add the following to the guest's XML file and save the changes:

<channel type='unix'>
   <target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>


Below is what Virt-Manager created:

<channel type="unix">
  <source mode="bind" path="/var/lib/libvirt/qemu/channel/target/domain-7-01-01-Deb-KDE-VNC/org.qemu.guest_agent.0"/>
  <target type="virtio" name="org.qemu.guest_agent.0" state="connected"/>
  <alias name="channel0"/>
  <address type="virtio-serial" controller="0" bus="0" port="1"/>
</channel>

My test VM would need this port open "5900"
<graphics type="vnc" port="5900" autoport="yes" listen="127.0.0.1">
  <listen type="address" address="127.0.0.1"/>
</graphics>


I added a channel as per below, but I do not really know what it does. I am not able to copy to/from clipboard, maybe I need to enable something else as well?  I check the VM and it does have qemu-guest-agent installed. 

<channel type="qemu-vdagent">
  <source>
    <clipboard copypaste="yes"/>
  </source>
  <target type="virtio" name="org.libguestfs.channel.0" state="disconnected"/>
  <alias name="channel1"/>
  <address type="virtio-serial" controller="0" bus="0" port="2"/>
</channel>


https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-manipulating_the_domain_xml-devices#sect-Devices-Redirected_devices

redirdev 
This is the main container for describing redirected devices. bus must be usb for a USB device. An additional attribute type is required, matching one of the supported serial device types, to describe the host physical machine side of the tunnel: type='tcp' or type='spicevmc' (which uses the usbredir channel of a SPICE graphics device) are typical. 






On Thursday, 04-07-2024 at 11:08 George at Clug wrote:
> Christoph,
> 
> I do not have access to OpenNebula with which I could test.
> 
> I do have access to Virt-Manager and so I built up a Virtual Machine of Bookworm (Debian 12) with KDE so that I would have the sddm display manger.
> 
> Then I set the "graphics type" to VNC, but I could not start the VM until I removed any mention to spice (or otherwise I could not set the graphics type to VNC).
> 
> The below configuration for the VM I created, runs KDE display very well. I presume sound does not work with VNC.
> 
> Have you been able to try Virt-Manager to run your Debian VMs? 
> 
> FYI: I have found that Virt-Manger prefers to use use Spice more than VNC, and as spice gives me sound I normally use Spice for USB redirection and for Display with the display type.
> 
> I hope this information might be may be of help to you.
> 
> Regards,
> 
> George.
> 
> 
> <domain type="kvm">
>   <name>01-01-Deb-KDE-VNC</name>
>   <uuid>4280bdf6-667b-407a-975d-3caea376172d</uuid>
>   <metadata>
>     <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0";>
>       <libosinfo:os id="http://debian.org/debian/12"/>
>     </libosinfo:libosinfo>
>   </metadata>
>   <memory unit="KiB">8388608</memory>
>   <currentMemory unit="KiB">8388608</currentMemory>
>   <vcpu placement="static">4</vcpu>
>   <os>
>     <type arch="x86_64" machine="pc-q35-7.2">hvm</type>
>     <boot dev="hd"/>
>   </os>
>   <features>
>     <acpi/>
>     <apic/>
>     <vmport state="off"/>
>   </features>
>   <cpu mode="host-passthrough" check="none" migratable="on"/>
>   <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-system-x86_64</emulator>
>     <disk type="file" device="disk">
>       <driver name="qemu" type="qcow2" discard="unmap"/>
>       <source file="/var/lib/libvirt/images/01-01-Deb-KDE-VNC.qcow2"/>
>       <target dev="vda" bus="virtio"/>
>       <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
>     </disk>
>     <disk type="file" device="cdrom">
>       <driver name="qemu" type="raw"/>
>       <target dev="sda" bus="sata"/>
>       <readonly/>
>       <address type="drive" controller="0" bus="0" target="0" unit="0"/>
>     </disk>
>     <controller type="usb" index="0" model="qemu-xhci" ports="15">
>       <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
>     </controller>
>     <controller type="pci" index="0" model="pcie-root"/>
>     <controller type="pci" index="1" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="1" port="0x10"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
>     </controller>
>     <controller type="pci" index="2" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="2" port="0x11"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
>     </controller>
>     <controller type="pci" index="3" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="3" port="0x12"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
>     </controller>
>     <controller type="pci" index="4" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="4" port="0x13"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
>     </controller>
>     <controller type="pci" index="5" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="5" port="0x14"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
>     </controller>
>     <controller type="pci" index="6" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="6" port="0x15"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
>     </controller>
>     <controller type="pci" index="7" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="7" port="0x16"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
>     </controller>
>     <controller type="pci" index="8" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="8" port="0x17"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
>     </controller>
>     <controller type="pci" index="9" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="9" port="0x18"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
>     </controller>
>     <controller type="pci" index="10" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="10" port="0x19"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
>     </controller>
>     <controller type="pci" index="11" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="11" port="0x1a"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
>     </controller>
>     <controller type="pci" index="12" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="12" port="0x1b"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
>     </controller>
>     <controller type="pci" index="13" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="13" port="0x1c"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
>     </controller>
>     <controller type="pci" index="14" model="pcie-root-port">
>       <model name="pcie-root-port"/>
>       <target chassis="14" port="0x1d"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
>     </controller>
>     <controller type="sata" index="0">
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
>     </controller>
>     <controller type="virtio-serial" index="0">
>       <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
>     </controller>
>     <interface type="network">
>       <mac address="52:54:00:e7:bb:67"/>
>       <source network="default"/>
>       <model type="virtio"/>
>       <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
>     </interface>
>     <serial type="pty">
>       <target type="isa-serial" port="0">
>         <model name="isa-serial"/>
>       </target>
>     </serial>
>     <console type="pty">
>       <target type="serial" port="0"/>
>     </console>
>     <channel type="unix">
>       <target type="virtio" name="org.qemu.guest_agent.0"/>
>       <address type="virtio-serial" controller="0" bus="0" port="1"/>
>     </channel>
>     <input type="tablet" bus="usb">
>       <address type="usb" bus="0" port="1"/>
>     </input>
>     <input type="mouse" bus="ps2"/>
>     <input type="keyboard" bus="ps2"/>
>     <graphics type="vnc" port="-1" autoport="yes">
>       <listen type="address"/>
>     </graphics>
>     <sound model="ich9">
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
>     </sound>
>     <audio id="1" type="none"/>
>     <video>
>       <model type="virtio" heads="1" primary="yes"/>
>       <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
>     </video>
>     <memballoon model="virtio">
>       <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
>     </memballoon>
>     <rng model="virtio">
>       <backend model="random">/dev/urandom</backend>
>       <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
>     </rng>
>   </devices>
> </domain>
> 
> 
> 
> On Wednesday, 03-07-2024 at 17:41 Christoph Pleger wrote:
> > Hello,
> > 
> > > My first thoughts were firewall issues.
> > 
> > It is not a connection problem. When I open a browser window to vnc
> > connect to the VM, I can even see the mouse pointer, what shows that
> > the VM Xorg server is still running, and sshing to the VM and doing a
> > ps confirms that.
> > 
> > > > 
> > > > However, after installing a VM with Debian 12, none of these three
> > > > display managers shows its GUI login screen after boot. With sddm
> > > > it is
> > > > noticeable that the process sddm-helper crashes shortly after it is
> > > > started.
> > > 
> > > In crashes, do you mean the server's log files show that the display
> > > manager has terminated due to some error?
> > 
> > Unfortunately, I could not find a log that tells what exactly happened.
> > But it is clear that sddm-helper crashes with a segmentation fault.
> > 
> > Regards
> >   Christoph
> > 
> 
> 


Reply to: