Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu-model selection #24

Closed
ghost opened this issue Jun 2, 2016 · 6 comments
Closed

cpu-model selection #24

ghost opened this issue Jun 2, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Jun 2, 2016

I just realized that my terraform VM are now spawned with the emulator CPU type.
I tried to figure out how to make qemu/libvirt use 'host-model' as default to workaround that.
My VM are very slow at performing key computations right now.
Do you have any workaround for that or plan to support specifying it ?

@ghost
Copy link
Author

ghost commented Jun 2, 2016

I found out that with libvirt 1.3 I can use:
-device virtio-rng-pci
to supply a hardware random number generator to the VM.
Anyway to specify some devices within the terraform resources would be appreciated.

@dmacvicar
Copy link
Owner

@fisabelle What do you mean with emulator CPU type? Can you paste the ps output that shows the qemu command line libvirt is using?

@ghost
Copy link
Author

ghost commented Sep 6, 2016

Hi.
This is what is being used:

/usr/libexec/qemu-kvm -name centos7_vm_domain_78,debug-threads=on -S -machine pc-i440fx-rhel7.2.0,accel=kvm,usb=off -m 4096 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 692e3a40-54e3-4921-a27e-77e943ea58e4 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-54-centos7_vm_domain_78/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/home/vmstore/ramdisk/centos7_vm_disk_78,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=45,id=hostnet0,vhost=on,vhostfd=47 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:a1:a3:78,bus=pci.0,addr=0x3 -spice port=5909,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on

For some reason, I'm experiencing long delays during the initialization of a keystore component in my VM. At first I though this to be due to the CPU type selection but it turned out to be due to the default random number generator in the VM, it is very slow to accumulate data.

I noticed that if I use: -device virtio-rng-pci as an extra device in my VM, this process if much faster.

So, this is why I want to be able to specify additional device specifications in the terraform resource file.

Thank you.
François.

flavio added a commit to flavio/terraform-provider-libvirt that referenced this issue Oct 4, 2016
This should make the 1st boot of some domains faster and solve
issue dmacvicar#24
@flavio
Copy link
Collaborator

flavio commented Oct 15, 2016

I think this bug can be closed, the latest code adds a virtio random generator to all the domains.

@flavio flavio closed this as completed Oct 15, 2016
@ghost
Copy link
Author

ghost commented Oct 15, 2016

That's excellent! I'll try it as soon as possible.

Le 15 oct. 2016 3:17 PM, "Flavio Castelli" notifications@github.com a
écrit :

I think this bug can be closed, the latest code adds a virtio random
generator to all the domains.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#24 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARnXvdG7S-tBTGyaLFGl6HIe8mNBwSkHks5q0SbXgaJpZM4IspCX
.

@ghost
Copy link
Author

ghost commented Oct 18, 2016

Tried it today. works well for me, thank you.

2016-10-15 15:18 GMT-04:00 François Isabelle francois.isabelle75@gmail.com
:

That's excellent! I'll try it as soon as possible.

Le 15 oct. 2016 3:17 PM, "Flavio Castelli" notifications@github.com a
écrit :

I think this bug can be closed, the latest code adds a virtio random
generator to all the domains.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#24 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARnXvdG7S-tBTGyaLFGl6HIe8mNBwSkHks5q0SbXgaJpZM4IspCX
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants