WinServer2016 guest no mouse in VirtManager
by John McInnes
Hi! I recently converted several Windows Server VMs from HyperV to libvirt/KVM. The host is running openSUSE Leap 15.3. I used virt-v2v and I installed virtio drivers on all of them and it all went well - except for one VM. The mouse does not work for this VM in VirtualMachineManager. There is no cursor and no response. There are no issues showing in Windows Device Manager. The mouse shows up as a PS/2 mouse. Interestingly if I RDP into this VM using Microsoft Remote Desktop the mouse works fine. Any ideas?
----
John McInnes
jmcinnes /\T svt.org
1 year, 10 months
[libvirt-users] [virtual interface] detach interface during boot succeed with no changes
by Yalan Zhang
Hi guys,
when I detach an interface from vm during boot (vm boot not finished), it
always fail. I'm not sure if there is an existing bug. I have
confirmed with someone that for disk, there is similar behavior, if
this is also acceptable?
# virsh destroy rhel7.2; virsh start rhel7.2 ;sleep 2; virsh
detach-interface rhel7.2 network 52:54:00:98:c4:a0; sleep 2; virsh
dumpxml rhel7.2 |grep /interface -B9
Domain rhel7.2 destroyed
Domain rhel7.2 started
Interface detached successfully
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:98:c4:a0'/>
<source network='default' bridge='virbr0'/>
<target dev='vnet0'/>
<model type='rtl8139'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
When I detach after the vm boot, expand the sleep time to 10, it will succeed.
# virsh destroy rhel7.2; virsh start rhel7.2 ;sleep 10; virsh
detach-interface rhel7.2 network 52:54:00:98:c4:a0; sleep 2; virsh
dumpxml rhel7.2 |grep /interface -B9
Domain rhel7.2 destroyed
Domain rhel7.2 started
Interface detached successfully
-------
Best Regards,
Yalan Zhang
IRC: yalzhang
Internal phone: 8389413
2 years, 3 months
Can RHEL7 VM run remote commands to Fedora36 host?
by Carol Bouchard
I have a Fedora36 laptop which hosts VMs with RHEL7 using libvirt. One of
the RHEL7 VMs, runs remote commands (as root) to 'start' another VM by
way of my laptop. In other words, the following command is run:
virsh --connect 'qemu+ssh://192.168.120.1/system' start
beaker-test-vm1.beaker
If I run non-remote version of the command on the laptop, it is successful.
For example,
virsh --connect qemu:///system start beaker-test-vm1.beaker <-- Successful
on laptop.
If I do a query like the following *(notice socket use)*, it is successful.
virsh -d0 --connect
'qemu+ssh://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro'
domstate beaker-test-vm1.beaker
Without socket, I get the following error:
*error: failed to connect to the hypervisor*
*error: End of file while reading data: Ncat: No such file or directory.:
Input/output error*
This does not work for 'start' because I believe this is a read-only socket
since I see the error:
error: Failed to start domain beaker-test-vm1.beaker
error: operation forbidden: read only access prevents virDomainCreate
When I look at my laptop, there is no /var/run/libvirt/libvirt-sock.
So.....I've been wondering
whether RHEL7 virsh/libvirt is compatible with Fedora36. Is there a
work-around? I can't
change the distros on my laptop or VMs.
Carol
2 years, 4 months
Can RHEL7 VM run remote libvirt commands to Fedora36 host?
by Carol Bouchard
I have a test environment that use to work but no longer does. My
laptop is Fedora36 (libvirt version 8.1.0.2) while the VMs it spawns are
RHEL7 (max libvirt version is 4.5.0). The source of my problem
seems to be that RHEL7 libvirt needs rw socket /var/run/libvirt/libvirt-sock
which no longer exists in fedora36.
The following is successful from RHEL7 VM to laptop:
virsh -d0 --connect
'qemu+ssh://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro'
domstate beaker-test-vm1.beaker
If I change the action from domstate to start, it fails on
error: Failed to start domain beaker-test-vm1.beaker
error: operation forbidden: read only access prevents virDomainCreate
which made me realize ro stands for read-only; however, there is no
libvirt-sock. I tried some of the other socket files without success.
Is there a work-around?
Carol
2 years, 4 months
how to get vm uptime through libvirt api
by Jiatong Shen
Hello community,
I would like to know if there is an api to get a virtual machine's
uptime. Thank you in advance for the help.
--
Best Regards,
Jiatong Shen
2 years, 5 months
Eject CD ROM medium fails with 'Tray of device is not open'
by liang chaojun
Hi Guys,
I have hit an issue on testing against our testbed, It's failed to eject cdrom media after reboot from installed the guest OS.
The reproduce step:
1. Attach a block device with a ISO media and start install VM from ISO.
2. <disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<source dev='/dev/disk/by-id/pbdx-vol-cfe60dca-c271-491b-be3c-11fa8d7625a4' index='6'/>
<backingStore/>
<target dev='hda' bus='ide' tray='open'/>
<readonly/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
3. After installed the OS and reboot from system disk successful.
4. Then I want to eject CDROM through update device with the xml like below or using virsh tool 'virsh change-media iso_test hda --eject'
5. All those will failed at "internal error: unable to execute QEMU command 'blockdev-remove-medium': Tray of device 'ide0-0-0' is not open"
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<backingStore/>
<target dev='hda' bus='ide' tray='open'/>
<readonly/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
block info looks like below:
virsh qemu-monitor-command iso_test --hmp info block
setlocale: No such file or directory
libvirt-6-format: /dev/disk/by-id/pbdx-vol-cfe60dca-c271-491b-be3c-11fa8d7625a4 (raw, read-only)
Attached to: ide0-0-0
Removable device: locked, tray closed
Cache mode: writeback
Reproduce envrionment:
Operating system: rhat8.4
Architecture:x86
kernel version:4.18.0-305
libvirt version:v7.9.0(private build)
Hypervisor and version:QEMU 5.1.0(private build)
Is there any workaround? Any comments are appreciated.
Thanks!
2 years, 5 months
NetworkD or NetworkManager. Does it matter?
by Mnecraftchest1
Hello there. I am in the process of building an Arch Linux install for a virtualization server for my home lab, and I am trying to decide what networking system I should use. The two I am considering are SystemD-NetworkD, and NetworkManager. Looking along the lines of support from libvirt, would I be better off with one or the other, or does it not matter which one I use?
2 years, 5 months
The default USB controller of pc machine type
by Han Han
Hello,
I found that the default USB controller for q35 machine type is qemu-xhci
while for pc it is piix3-uhci. Here are the results(on qemu-kvm-7.0.0
qemu-kvm-7.0.0):
➜ ~ cat /tmp/usb.xml
<domain type="kvm">
<name>USB</name>
<uuid>1a81d4ef-6537-4ae8-b257-8a15e0c0525f</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch="x86_64" machine="q35">hvm</type>
<boot dev="hd"/>
</os>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
</devices>
</domain>
➜ ~ virsh define /tmp/usb.xml && virsh dumpxml USB|grep usb
Domain 'USB' defined from /tmp/usb.xml
<controller type='usb' index='0' model='qemu-xhci'>
➜ ~ cat /tmp/usb-pc.xml
<domain type="kvm">
<name>USB</name>
<uuid>1a81d4ef-6537-4ae8-b257-8a15e0c0525f</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch="x86_64" machine="pc">hvm</type>
<boot dev="hd"/>
</os>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
</devices>
</domain>
➜ ~ virsh define /tmp/usb-pc.xml && virsh dumpxml USB|grep usb
Domain 'USB' defined from /tmp/usb-pc.xml
<controller type='usb' index='0' model='piix3-uhci'>
And the default usb controller for q35 has been added since:
ed2049ea19 qemu: auto-add generic xhci rather than NEC xhci to Q35 domains
As I know, pc machine supports qemu-xhci as well. Morever, the
performance of qemu-xhci is better than piix3-uhci. So why not update the
default usb controller of pc machine type to qemu-xhci? I think we can
improve it here.
2 years, 5 months
Why can not get the expected cpu topology after setting the maxcpu in xml?
by liang chaojun
Hello all,
I hit a issue that I'm not able to see the expected cpu topology in VM after setting the maxcpu arrtribute in domain.
the xml look like below:
<vcpu placement='static' current='4'>8</vcpu>
<cpu mode='host-passthrough' check='none' migratable='on'>
<topology sockets='2' dies='1' cores='4' threads='1'/>
</cpu>
I notice that the cpu topoloy looked like below capture output from 'lscpu' tool which is totally different with my setting.
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Model name: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz
Besides i found it looked correct if i relpace 'vcpu' line with "<vcpu placement='static'>8</vcpu>" that remove maxcpu value.
Could you give me some information? Any comments are appreciated.
Thanks
2 years, 5 months