kiranchavala opened a new issue, #8757:
URL: https://github.com/apache/cloudstack/issues/8757

   ISSUE TYPE
   
   BUG 
   
   
   Component Name
   
   BUG
   
   
   CLOUDSTACK VERSION
   
   Cloudstack version  4.19 
   
   SUMMARY
   
   Unable to boot Rocky 9 iso/template on Ubuntu based kvm hosts
   
   
   
   Steps to reproduce the issue
   
   
   1. Register an rocky iso or template
   
   
https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.3-x86_64-minimal.iso
   
   
   
http://dl.rockylinux.org/stg/rocky/9/images/x86_64/Rocky-9-GenericCloud-Base-9.3-20231113.0.x86_64.qcow2
   
   
   
   2. Launch a vm with the iso/template
   
    This results in a kernel panic, The  workaround is to perform the following 
changes
   
    1. Edit the file present on the kvm hosts  
“/etc/cloudstack/agent/agent.properties “
   
         guest.cpu.mode=host-passthrough
   
    2. Restart the agent service
   
      service cloudstack-agent restart
   
       
   Ref: 
   
   https://www.phoronix.com/news/RHEL-9-x86-64-v2-Plans
   
https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level#recommendations_for_rhel_9
   https://forums.rockylinux.org/t/rocky-linux-9-virtualbox-kernel-panic/6692/5
   
   
   3. Even after performing the workaround 
   
   Cloudstack is not able to power on the vm ,  following is the exception  
that is found on the ubuntu kvm agent logs 
   
   /var/log/cloudstack/agent/agent.log
   
   
   ```
   2024-03-05 04:17:42,590 WARN [resource.wrapper.LibvirtStartCommandWrapper] 
(agentRequest-Handler-1:null) (logid:c5c3104d) LibvirtException
   org.libvirt.LibvirtException: internal error: process exited while 
connecting to monitor: 2024-03-05T04:17:41.856275Z qemu-system-x86_64: error: 
failed to set MSR 0x48f to 0xffffff00036dfb
   qemu-system-x86_64: ../../target/i386/kvm/kvm.c:2893: kvm_buf_set_msrs: 
Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
        at org.libvirt.ErrorHandler.processError(Unknown Source)
        at org.libvirt.ErrorHandler.processError(Unknown Source)
   
   ```
   
   
   
   4. Tried to launch the vm directly from the ubuntu KVM host 
   
   Vm failed to start  With parameter  --cpu host-passthrough
   ```
   
   virt-install --virt-type=kvm --name=rocky9 --vcpus=2 --memory=4096 
--cdrom=/var/lib/libvirt/images/Rocky-9.3-x86_64-minimal.iso --disk 
path=/var/lib/libvirt/images/rocky9.qcow2,format=qcow2 --network default 
--graphics none  --cpu host-passthrough --os-variant=rocky9.0
   WARNING  CDROM media does not print to the text console by default, so you 
likely will not see text install output. You might want to use --location. See 
the man page for examples of using --location with CDROM media
   
   Starting install...
   ERROR    internal error: qemu unexpectedly closed the monitor: 
2024-03-06T08:27:00.350836Z qemu-system-x86_64: error: failed to set MSR 0x48f 
to 0xffffff00036dfb
   qemu-system-x86_64: ../../target/i386/kvm/kvm.c:2893: kvm_buf_set_msrs: 
Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed
   ```
   
   
   Vm got started when launched with parameter --cpu host 
   
   `virt-install --virt-type=kvm --name=rhel82 --vcpus=2 --memory=4096 
--cdrom=/var/lib/libvirt/images/Rocky-9.3-x86_64-minimal.iso --disk 
path=/var/lib/libvirt/images/rocky9.qcow2,format=qcow2 --network default 
--graphics none  --cpu host
   `
   
   Xml file when rocky 9 iso is directly launched on ubuntu kvm host 
   
   
[rocky9on-ubuntu.txt](https://github.com/apache/cloudstack/files/14524542/rocky9on-ubuntu.txt)
   
   
   
   Xml file of the vm when directly launched from Cloudstack on ubuntu kvm
   
   
   
[rocky9on-ubuntu-cloudstack.txt](https://github.com/apache/cloudstack/files/14524577/rocky9on-ubuntu-cloudstack.txt)
   
   
   5. This issue is not observed with other linux distribution kvm host 
   
   
   Dumpxml 
   
   
[rocky9on-ol8-cloudstack.txt](https://github.com/apache/cloudstack/files/14524578/rocky9on-ol8-cloudstack.txt)
   
   
   6. Cloudstack for some reason is not adding the host-passthrough on ubuntu 
kvm hosts 
   
   `<cpu mode='host-passthrough' check='none' migratable='on'/>`
   
   
   
   
   
   Actual Behaviour
   
   Cloudstack is not able to launch rocky 9 iso  on ubuntu host
   
   
   Expected Behaviour
   
   Cloudstack should be able to launch rocky 9 iso on ubuntu host 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to