You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by avi <ha...@gmail.com> on 2021/09/12 06:36:59 UTC

Groovy Script error while changing guest cpu model.

Hello All, 

I am using cloudstack 4.15.1 with KVM host. I was playing with changing guest cpu model and tested out 
host-passthrough and host-model but I was unable to succed. I changed the parameter in the agent config file as documented but I received following error on both hosts:
 12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage pool 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
 12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage pool 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
 12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook] (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is not available. Transformations will not be applied.
 12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook] (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine is not initialized. Data transformation skipped.
 12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook] (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not available. Transformations will not be applied.
 12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook] (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine is not initialized. Data transformation skipped.

I only changed the option guest.cpu.mode in the agent file of both host. And restarted the agent and libvirtd. The host os is Centos 7. The machine starts sucessfully but the cpu is still set to qemu virtual cpu. Did I miss something during the configuration. Both the KVM host are of same specification. 
I will be grateful for any help.

Thank You.


Re: Groovy Script error while changing guest cpu model.

Posted by Abishek <ab...@gmail.com>.
Hello Ivan,

But the VM's (Windows) just keep showing the qemu virtual cpu. I want to have the actual CPU parameters available for the VM's and I could not achieve it.

Thank You.


On 2021/09/13 07:55:39, Ivan Kudryavtsev <iv...@bw-sw.com> wrote: 
> That is just fine. Go ahead, it's not an error.
> 
> On Mon, Sep 13, 2021 at 2:24 PM avi <ha...@gmail.com> wrote:
> 
> > Hello All,
> >
> > I am using cloudstack 4.15.1 with KVM host. I was playing with changing
> > guest cpu model and tested out
> > host-passthrough and host-model but I was unable to succed. I changed the
> > parameter in the agent config file as documented but I received following
> > error on both hosts:
> >  12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage pool
> > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> >  12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage pool
> > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is not
> > available. Transformations will not be applied.
> >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine is
> > not initialized. Data transformation skipped.
> >  12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not
> > available. Transformations will not be applied.
> >  12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine is
> > not initialized. Data transformation skipped.
> >
> > I only changed the option guest.cpu.mode in the agent file of both host.
> > And restarted the agent and libvirtd. The host os is Centos 7. The machine
> > starts sucessfully but the cpu is still set to qemu virtual cpu. Did I miss
> > something during the configuration. Both the KVM host are of same
> > specification.
> > I will be grateful for any help.
> >
> > Thank You.
> >
> >
> 

Re: Groovy Script error while changing guest cpu model.

Posted by Ivan Kudryavtsev <iv...@bw-sw.com>.
guest.cpu.mode=host-passthrough

should work like a charm if it doesn't work, this means the regression is
in the CloudStack code and it prevents setting the property.
Make sure you have set the correct line end character in UNIX format.

On Mon, Sep 13, 2021 at 7:00 PM Wei ZHOU <us...@gmail.com> wrote:

> Hi Abishek,
>
> It is better to share your agent.properties
>
> -Wei
>
> On Mon, 13 Sept 2021 at 13:39, avi <ha...@gmail.com> wrote:
>
> > Hello Ivan,
> >
> > But I am still getting qemu virtual cpu in guest VM's(Windows). Did
> > everything as documented. I want the VM's to have same CPU as the host
> > machines Will it be possible?
> >
> > Thank You.
> >
> > On 2021/09/13 07:55:39, Ivan Kudryavtsev <iv...@bw-sw.com> wrote:
> > > That is just fine. Go ahead, it's not an error.
> > >
> > > On Mon, Sep 13, 2021 at 2:24 PM avi <ha...@gmail.com> wrote:
> > >
> > > > Hello All,
> > > >
> > > > I am using cloudstack 4.15.1 with KVM host. I was playing with
> changing
> > > > guest cpu model and tested out
> > > > host-passthrough and host-model but I was unable to succed. I changed
> > the
> > > > parameter in the agent config file as documented but I received
> > following
> > > > error on both hosts:
> > > >  12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch
> storage
> > pool
> > > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > > >  12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch
> storage
> > pool
> > > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > > '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is
> not
> > > > available. Transformations will not be applied.
> > > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting
> engine
> > is
> > > > not initialized. Data transformation skipped.
> > > >  12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > > '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not
> > > > available. Transformations will not be applied.
> > > >  12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting
> engine
> > is
> > > > not initialized. Data transformation skipped.
> > > >
> > > > I only changed the option guest.cpu.mode in the agent file of both
> > host.
> > > > And restarted the agent and libvirtd. The host os is Centos 7. The
> > machine
> > > > starts sucessfully but the cpu is still set to qemu virtual cpu. Did
> I
> > miss
> > > > something during the configuration. Both the KVM host are of same
> > > > specification.
> > > > I will be grateful for any help.
> > > >
> > > > Thank You.
> > > >
> > > >
> > >
> >
>

Re: Groovy Script error while changing guest cpu model.

Posted by Abishek <ab...@gmail.com>.
Thank You Wei. Now its working but I did only change the value not the option on the default agent file. So, I didnot notice the option I was only looking the value. I wonder something I might have missed out. Silly error from my end. 
I am very grateful for you Help.
Thank You.

On 2021/09/14 08:48:09, Wei ZHOU <us...@gmail.com> wrote: 
> Hi,
> 
> There is a typo.  you should use 'guest.cpu.mode' not 'guest.cpu.model'.
> 
> -Wei
> 
> On Tue, 14 Sept 2021 at 10:40, avi <ha...@gmail.com> wrote:
> 
> > Hello Wei,
> >
> > I have the following agent properties on both the host:
> >
> > cluster=1
> > pod=1
> > resource=com.cloud.hypervisor.kvm.resource.LibvirtComputingResource
> > private.network.device=cloudbr0
> > domr.scripts.dir=scripts/network/domr/kvm
> > router.aggregation.command.each.timeout=600
> > guest.network.device=cloudbr1
> > guest.cpu.model=host-passthrough
> > keystore.passphrase=6sqeDqWNbnb5wer
> > hypervisor.type=kvm
> > port=8250
> > zone=1
> > public.network.device=cloudbr1
> > local.storage.uuid=34c08c2b-8cd4-43b0-a6a1-205ca6d449e0
> > host=x.x.x.x@static
> > guid=8880b099-e99c-3012-afc6-d1a365f08991
> > LibvirtComputingResource.id=1
> > workers=5
> > iscsi.session.cleanup.enabled=false
> >
> > Thank You.
> >
> > On 2021/09/13 12:00:00, Wei ZHOU <us...@gmail.com> wrote:
> > > Hi Abishek,
> > >
> > > It is better to share your agent.properties
> > >
> > > -Wei
> > >
> > > On Mon, 13 Sept 2021 at 13:39, avi <ha...@gmail.com> wrote:
> > >
> > > > Hello Ivan,
> > > >
> > > > But I am still getting qemu virtual cpu in guest VM's(Windows). Did
> > > > everything as documented. I want the VM's to have same CPU as the host
> > > > machines Will it be possible?
> > > >
> > > > Thank You.
> > > >
> > > > On 2021/09/13 07:55:39, Ivan Kudryavtsev <iv...@bw-sw.com> wrote:
> > > > > That is just fine. Go ahead, it's not an error.
> > > > >
> > > > > On Mon, Sep 13, 2021 at 2:24 PM avi <ha...@gmail.com> wrote:
> > > > >
> > > > > > Hello All,
> > > > > >
> > > > > > I am using cloudstack 4.15.1 with KVM host. I was playing with
> > changing
> > > > > > guest cpu model and tested out
> > > > > > host-passthrough and host-model but I was unable to succed. I
> > changed
> > > > the
> > > > > > parameter in the agent config file as documented but I received
> > > > following
> > > > > > error on both hosts:
> > > > > >  12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch
> > storage
> > > > pool
> > > > > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > > > > >  12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch
> > storage
> > > > pool
> > > > > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > > > > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > > > > '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is
> > not
> > > > > > available. Transformations will not be applied.
> > > > > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting
> > engine
> > > > is
> > > > > > not initialized. Data transformation skipped.
> > > > > >  12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > > > > '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not
> > > > > > available. Transformations will not be applied.
> > > > > >  12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting
> > engine
> > > > is
> > > > > > not initialized. Data transformation skipped.
> > > > > >
> > > > > > I only changed the option guest.cpu.mode in the agent file of both
> > > > host.
> > > > > > And restarted the agent and libvirtd. The host os is Centos 7. The
> > > > machine
> > > > > > starts sucessfully but the cpu is still set to qemu virtual cpu.
> > Did I
> > > > miss
> > > > > > something during the configuration. Both the KVM host are of same
> > > > > > specification.
> > > > > > I will be grateful for any help.
> > > > > >
> > > > > > Thank You.
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 

Re: Groovy Script error while changing guest cpu model.

Posted by Wei ZHOU <us...@gmail.com>.
Hi,

There is a typo.  you should use 'guest.cpu.mode' not 'guest.cpu.model'.

-Wei

On Tue, 14 Sept 2021 at 10:40, avi <ha...@gmail.com> wrote:

> Hello Wei,
>
> I have the following agent properties on both the host:
>
> cluster=1
> pod=1
> resource=com.cloud.hypervisor.kvm.resource.LibvirtComputingResource
> private.network.device=cloudbr0
> domr.scripts.dir=scripts/network/domr/kvm
> router.aggregation.command.each.timeout=600
> guest.network.device=cloudbr1
> guest.cpu.model=host-passthrough
> keystore.passphrase=6sqeDqWNbnb5wer
> hypervisor.type=kvm
> port=8250
> zone=1
> public.network.device=cloudbr1
> local.storage.uuid=34c08c2b-8cd4-43b0-a6a1-205ca6d449e0
> host=x.x.x.x@static
> guid=8880b099-e99c-3012-afc6-d1a365f08991
> LibvirtComputingResource.id=1
> workers=5
> iscsi.session.cleanup.enabled=false
>
> Thank You.
>
> On 2021/09/13 12:00:00, Wei ZHOU <us...@gmail.com> wrote:
> > Hi Abishek,
> >
> > It is better to share your agent.properties
> >
> > -Wei
> >
> > On Mon, 13 Sept 2021 at 13:39, avi <ha...@gmail.com> wrote:
> >
> > > Hello Ivan,
> > >
> > > But I am still getting qemu virtual cpu in guest VM's(Windows). Did
> > > everything as documented. I want the VM's to have same CPU as the host
> > > machines Will it be possible?
> > >
> > > Thank You.
> > >
> > > On 2021/09/13 07:55:39, Ivan Kudryavtsev <iv...@bw-sw.com> wrote:
> > > > That is just fine. Go ahead, it's not an error.
> > > >
> > > > On Mon, Sep 13, 2021 at 2:24 PM avi <ha...@gmail.com> wrote:
> > > >
> > > > > Hello All,
> > > > >
> > > > > I am using cloudstack 4.15.1 with KVM host. I was playing with
> changing
> > > > > guest cpu model and tested out
> > > > > host-passthrough and host-model but I was unable to succed. I
> changed
> > > the
> > > > > parameter in the agent config file as documented but I received
> > > following
> > > > > error on both hosts:
> > > > >  12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch
> storage
> > > pool
> > > > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > > > >  12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch
> storage
> > > pool
> > > > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > > > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > > > '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is
> not
> > > > > available. Transformations will not be applied.
> > > > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting
> engine
> > > is
> > > > > not initialized. Data transformation skipped.
> > > > >  12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > > > '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not
> > > > > available. Transformations will not be applied.
> > > > >  12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting
> engine
> > > is
> > > > > not initialized. Data transformation skipped.
> > > > >
> > > > > I only changed the option guest.cpu.mode in the agent file of both
> > > host.
> > > > > And restarted the agent and libvirtd. The host os is Centos 7. The
> > > machine
> > > > > starts sucessfully but the cpu is still set to qemu virtual cpu.
> Did I
> > > miss
> > > > > something during the configuration. Both the KVM host are of same
> > > > > specification.
> > > > > I will be grateful for any help.
> > > > >
> > > > > Thank You.
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: Groovy Script error while changing guest cpu model.

Posted by avi <ha...@gmail.com>.
Hello Wei,

I have the following agent properties on both the host:

cluster=1
pod=1
resource=com.cloud.hypervisor.kvm.resource.LibvirtComputingResource
private.network.device=cloudbr0
domr.scripts.dir=scripts/network/domr/kvm
router.aggregation.command.each.timeout=600
guest.network.device=cloudbr1
guest.cpu.model=host-passthrough
keystore.passphrase=6sqeDqWNbnb5wer
hypervisor.type=kvm
port=8250
zone=1
public.network.device=cloudbr1
local.storage.uuid=34c08c2b-8cd4-43b0-a6a1-205ca6d449e0
host=x.x.x.x@static
guid=8880b099-e99c-3012-afc6-d1a365f08991
LibvirtComputingResource.id=1
workers=5
iscsi.session.cleanup.enabled=false

Thank You.

On 2021/09/13 12:00:00, Wei ZHOU <us...@gmail.com> wrote: 
> Hi Abishek,
> 
> It is better to share your agent.properties
> 
> -Wei
> 
> On Mon, 13 Sept 2021 at 13:39, avi <ha...@gmail.com> wrote:
> 
> > Hello Ivan,
> >
> > But I am still getting qemu virtual cpu in guest VM's(Windows). Did
> > everything as documented. I want the VM's to have same CPU as the host
> > machines Will it be possible?
> >
> > Thank You.
> >
> > On 2021/09/13 07:55:39, Ivan Kudryavtsev <iv...@bw-sw.com> wrote:
> > > That is just fine. Go ahead, it's not an error.
> > >
> > > On Mon, Sep 13, 2021 at 2:24 PM avi <ha...@gmail.com> wrote:
> > >
> > > > Hello All,
> > > >
> > > > I am using cloudstack 4.15.1 with KVM host. I was playing with changing
> > > > guest cpu model and tested out
> > > > host-passthrough and host-model but I was unable to succed. I changed
> > the
> > > > parameter in the agent config file as documented but I received
> > following
> > > > error on both hosts:
> > > >  12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage
> > pool
> > > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > > >  12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage
> > pool
> > > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > > '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is not
> > > > available. Transformations will not be applied.
> > > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine
> > is
> > > > not initialized. Data transformation skipped.
> > > >  12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > > '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not
> > > > available. Transformations will not be applied.
> > > >  12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine
> > is
> > > > not initialized. Data transformation skipped.
> > > >
> > > > I only changed the option guest.cpu.mode in the agent file of both
> > host.
> > > > And restarted the agent and libvirtd. The host os is Centos 7. The
> > machine
> > > > starts sucessfully but the cpu is still set to qemu virtual cpu. Did I
> > miss
> > > > something during the configuration. Both the KVM host are of same
> > > > specification.
> > > > I will be grateful for any help.
> > > >
> > > > Thank You.
> > > >
> > > >
> > >
> >
> 

Re: Groovy Script error while changing guest cpu model.

Posted by Wei ZHOU <us...@gmail.com>.
Hi Abishek,

It is better to share your agent.properties

-Wei

On Mon, 13 Sept 2021 at 13:39, avi <ha...@gmail.com> wrote:

> Hello Ivan,
>
> But I am still getting qemu virtual cpu in guest VM's(Windows). Did
> everything as documented. I want the VM's to have same CPU as the host
> machines Will it be possible?
>
> Thank You.
>
> On 2021/09/13 07:55:39, Ivan Kudryavtsev <iv...@bw-sw.com> wrote:
> > That is just fine. Go ahead, it's not an error.
> >
> > On Mon, Sep 13, 2021 at 2:24 PM avi <ha...@gmail.com> wrote:
> >
> > > Hello All,
> > >
> > > I am using cloudstack 4.15.1 with KVM host. I was playing with changing
> > > guest cpu model and tested out
> > > host-passthrough and host-model but I was unable to succed. I changed
> the
> > > parameter in the agent config file as documented but I received
> following
> > > error on both hosts:
> > >  12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage
> pool
> > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > >  12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage
> pool
> > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is not
> > > available. Transformations will not be applied.
> > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine
> is
> > > not initialized. Data transformation skipped.
> > >  12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not
> > > available. Transformations will not be applied.
> > >  12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine
> is
> > > not initialized. Data transformation skipped.
> > >
> > > I only changed the option guest.cpu.mode in the agent file of both
> host.
> > > And restarted the agent and libvirtd. The host os is Centos 7. The
> machine
> > > starts sucessfully but the cpu is still set to qemu virtual cpu. Did I
> miss
> > > something during the configuration. Both the KVM host are of same
> > > specification.
> > > I will be grateful for any help.
> > >
> > > Thank You.
> > >
> > >
> >
>

Re: Groovy Script error while changing guest cpu model.

Posted by Ivan Kudryavtsev <iv...@bw-sw.com>.
Hi, this means that you used wrong cpu specification in the config. These
hooks do nothing about that, especially because they are not present.

пн, 13 сент. 2021 г., 18:40 avi <ha...@gmail.com>:

> Hello Ivan,
>
> But I am still getting qemu virtual cpu in guest VM's(Windows). Did
> everything as documented. I want the VM's to have same CPU as the host
> machines Will it be possible?
>
> Thank You.
>
> On 2021/09/13 07:55:39, Ivan Kudryavtsev <iv...@bw-sw.com> wrote:
> > That is just fine. Go ahead, it's not an error.
> >
> > On Mon, Sep 13, 2021 at 2:24 PM avi <ha...@gmail.com> wrote:
> >
> > > Hello All,
> > >
> > > I am using cloudstack 4.15.1 with KVM host. I was playing with changing
> > > guest cpu model and tested out
> > > host-passthrough and host-model but I was unable to succed. I changed
> the
> > > parameter in the agent config file as documented but I received
> following
> > > error on both hosts:
> > >  12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage
> pool
> > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > >  12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage
> pool
> > > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is not
> > > available. Transformations will not be applied.
> > >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine
> is
> > > not initialized. Data transformation skipped.
> > >  12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > > '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not
> > > available. Transformations will not be applied.
> > >  12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine
> is
> > > not initialized. Data transformation skipped.
> > >
> > > I only changed the option guest.cpu.mode in the agent file of both
> host.
> > > And restarted the agent and libvirtd. The host os is Centos 7. The
> machine
> > > starts sucessfully but the cpu is still set to qemu virtual cpu. Did I
> miss
> > > something during the configuration. Both the KVM host are of same
> > > specification.
> > > I will be grateful for any help.
> > >
> > > Thank You.
> > >
> > >
> >
>

Re: Groovy Script error while changing guest cpu model.

Posted by avi <ha...@gmail.com>.
Hello Ivan,

But I am still getting qemu virtual cpu in guest VM's(Windows). Did everything as documented. I want the VM's to have same CPU as the host machines Will it be possible?

Thank You.

On 2021/09/13 07:55:39, Ivan Kudryavtsev <iv...@bw-sw.com> wrote: 
> That is just fine. Go ahead, it's not an error.
> 
> On Mon, Sep 13, 2021 at 2:24 PM avi <ha...@gmail.com> wrote:
> 
> > Hello All,
> >
> > I am using cloudstack 4.15.1 with KVM host. I was playing with changing
> > guest cpu model and tested out
> > host-passthrough and host-model but I was unable to succed. I changed the
> > parameter in the agent config file as documented but I received following
> > error on both hosts:
> >  12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage pool
> > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> >  12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage pool
> > 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
> >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is not
> > available. Transformations will not be applied.
> >  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine is
> > not initialized. Data transformation skipped.
> >  12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> > '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not
> > available. Transformations will not be applied.
> >  12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook]
> > (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine is
> > not initialized. Data transformation skipped.
> >
> > I only changed the option guest.cpu.mode in the agent file of both host.
> > And restarted the agent and libvirtd. The host os is Centos 7. The machine
> > starts sucessfully but the cpu is still set to qemu virtual cpu. Did I miss
> > something during the configuration. Both the KVM host are of same
> > specification.
> > I will be grateful for any help.
> >
> > Thank You.
> >
> >
> 

Re: Groovy Script error while changing guest cpu model.

Posted by Ivan Kudryavtsev <iv...@bw-sw.com>.
That is just fine. Go ahead, it's not an error.

On Mon, Sep 13, 2021 at 2:24 PM avi <ha...@gmail.com> wrote:

> Hello All,
>
> I am using cloudstack 4.15.1 with KVM host. I was playing with changing
> guest cpu model and tested out
> host-passthrough and host-model but I was unable to succed. I changed the
> parameter in the agent config file as documented but I received following
> error on both hosts:
>  12:07:43,928 INFO  [kvm.storage.LibvirtStorageAdaptor]
> (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage pool
> 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
>  12:07:44,092 INFO  [kvm.storage.LibvirtStorageAdaptor]
> (agentRequest-Handler-5:null) (logid:a59f3a95) Trying to fetch storage pool
> 0420bb0c-6e77-3a53-994a-8907905cd465 from libvirt
>  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.groovy' is not
> available. Transformations will not be applied.
>  12:07:44,309 WARN  [kvm.resource.LibvirtKvmAgentHook]
> (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine is
> not initialized. Data transformation skipped.
>  12:07:44,800 WARN  [kvm.resource.LibvirtKvmAgentHook]
> (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy script
> '/etc/cloudstack/agent/hooks/libvirt-vm-state-change.groovy' is not
> available. Transformations will not be applied.
>  12:07:44,801 WARN  [kvm.resource.LibvirtKvmAgentHook]
> (agentRequest-Handler-5:null) (logid:a59f3a95) Groovy scripting engine is
> not initialized. Data transformation skipped.
>
> I only changed the option guest.cpu.mode in the agent file of both host.
> And restarted the agent and libvirtd. The host os is Centos 7. The machine
> starts sucessfully but the cpu is still set to qemu virtual cpu. Did I miss
> something during the configuration. Both the KVM host are of same
> specification.
> I will be grateful for any help.
>
> Thank You.
>
>