Bugzilla – Bug 1214476
Xen VM cannot start libxenlight failed (after snapshot 20230821)
Last modified: 2023-08-23 16:49:52 UTC
Created attachment 868948 [details] journalctl with start virtmgr and start vm I have a server with tumbleweed wher I have one VM. I cannot start it again after snapshot 202308321. I receive this error in virtmgr Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn ret = fn(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/virt-manager/virtManager/object/domain.py", line 1425, in startup self._backend.create() File "/usr/lib64/python3.11/site-packages/libvirt.py", line 1373, in create raise libvirtError('virDomainCreate() failed') libvirt.libvirtError: internal error: libxenlight failed to create new domain 'opensusetumbleweed' Journalctl output in attach This vm worked since months without problem.
There's nothing helpful in the journal output. Can you provide the VM config (e.g. 'virsh dumpxml vm-name'), /var/log/libvirt/libxl/libxl-driver.log, and /var/log/xen/qemu-dm-<vm-name>.log? Thanks!
Created attachment 868960 [details] XML define VM opensustumbleed Output or virsh dumpxml opensusetumbleweed
Created attachment 868961 [details] log file qemu-dm-opensusetumbleweed.log
Created attachment 868962 [details] log file /var/log/libvirt/libxl/libxl-driver.log
Hello, I found the problem. in the xml définition of opensustumbleweed there was <disk type="file" device="cdrom"> <driver name="qemu" type="raw"/> <source file="/local/download64/OpenSuse_iso/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20211129-Media.iso"/> <target dev="hdb" bus="ide"/> <readonly/> <address type="drive" controller="0" bus="0" target="0" unit="1"/> </disk> But I downloaded a new iso snapshot and removed the old. Changing in the xml to the new snapshot solved the problem. Question: how can I change this cdrom définition so that it goes to real cdrom I have in /dev hpprol2:/dev # ls -ls /dev/cdrom 0 lrwxrwxrwx 1 root root 3 Aug 23 10:57 /dev/cdrom -> sr0 hpprol2:/dev # ls -l sr0 brw-rw----+ 1 root cdrom 11, 0 Aug 23 10:57 sr0 Do I need to remove the source file or update it to /dev/cdrom? Many thanks in advance Philippe
(In reply to Philippe Condé from comment #5) > Hello, > > > I found the problem. > in the xml définition of opensustumbleweed there was > <disk type="file" device="cdrom"> > <driver name="qemu" type="raw"/> > <source > file="/local/download64/OpenSuse_iso/openSUSE-Tumbleweed-DVD-x86_64- > Snapshot20211129-Media.iso"/> > <target dev="hdb" bus="ide"/> > <readonly/> > <address type="drive" controller="0" bus="0" target="0" unit="1"/> > </disk> > > > But I downloaded a new iso snapshot and removed the old. Changing in the xml > to the new snapshot solved the problem. > > > Question: how can I change this cdrom définition so that it goes to real > cdrom > I have in /dev > hpprol2:/dev # ls -ls /dev/cdrom > 0 lrwxrwxrwx 1 root root 3 Aug 23 10:57 /dev/cdrom -> sr0 > hpprol2:/dev # ls -l sr0 > brw-rw----+ 1 root cdrom 11, 0 Aug 23 10:57 sr0 > > Do I need to remove the source file or update it to /dev/cdrom? > > Many thanks in advance > Philippe You can take a look at the documentation, https://libvirt.org/formatdomain.html#hard-drives-floppy-disks-cdroms but `<source dev='/dev/cdrom'/>` should do the trick.
(In reply to James Fehlig from comment #1) > There's nothing helpful in the journal output. Can you provide the VM config > (e.g. 'virsh dumpxml vm-name'), /var/log/libvirt/libxl/libxl-driver.log, and > /var/log/xen/qemu-dm-<vm-name>.log? Thanks! is there a way to make the journal provide such output directly or improve the message to the user? sometimes in QA we have issues with the virt backend, and unless one knows where to look, initially one is in the dark.
(In reply to Santiago Zarate from comment #6) > > You can take a look at the documentation, > https://libvirt.org/formatdomain.html#hard-drives-floppy-disks-cdroms > > but `<source dev='/dev/cdrom'/>` should do the trick. Many Thanks, I stopped the VM, changed the définition in virtmgr for the cdrom and restarted the VM.All seems correct I can log in and see that the cdrom is now present. For me this bug report can be closed Regards Philippe
(In reply to Santiago Zarate from comment #7) > (In reply to James Fehlig from comment #1) > > There's nothing helpful in the journal output. Can you provide the VM config > > (e.g. 'virsh dumpxml vm-name'), /var/log/libvirt/libxl/libxl-driver.log, and > > /var/log/xen/qemu-dm-<vm-name>.log? Thanks! > > is there a way to make the journal provide such output directly or improve > the message to the user? sometimes in QA we have issues with the virt > backend, and unless one knows where to look, initially one is in the dark. Admittedly with Xen it's just a matter of knowing where to look. libvirt (in this case virtxend) sends all log messages to the journal. With some work, messages from Xen's libxl library could be sent to the journal in addition to /var/log/libvirt/libxl/libxl-driver.log. But that wouldn't have helped in this case where the actual problem was logged to /var/log/xen/qemu-dm-opensusetumbleweed.log qemu-system-i386: -drive if=none,readonly=on,id=ide-832,file=/local/download64/OpenSuse_iso/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20211129-Media.iso,format=raw: Could not open '/local/download64/OpenSuse_iso/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20211129-Media.iso': No such file or directory In most cases Xen spawns a qemu process for each VM to handle device emulation, among other things. I'm not familiar enough with Xen to estimate the effort needed to make these qemu processes send their log messages to the journal, or if that's even desirable. Would need consultation with the Xen community. But it's out of scope for this bug report.