Terraform-provider-libvirt: virError

Created on 8 Feb 2019  路  9Comments  路  Source: dmacvicar/terraform-provider-libvirt

System Information

libvirt_domain.domain-ubuntu: Error defining libvirt domain: virError(Code=27, Domain=20, Message='XML error: file '/dev/urandom' is not a supported random source')

control:

Terraform version v0.11.11

server:
Ubuntu 16.04
libvirt versions 1.3.1

question

Most helpful comment

A work around for those stuck with an older version of libvirt may set the environment variable TF_LIBVIRT_RNG_DEV

export TF_LIBVIRT_RNG_DEV=/dev/random

source: https://github.com/dmacvicar/terraform-provider-libvirt/blob/753afd8a074e74334821006e4b4e321e63214ff7/libvirt/domain_def.go#L86-L90

All 9 comments

@kee001 thx for issue. Can you please try to follow http://manpages.ubuntu.com/manpages/xenial/man4/random.4.html and see if it solves for you?
Your error is more on your System side. Imho depending on the OS. We can keep this issue open.
We changed time ago from random to urandom

I think its an too old libvirt version. Support vor /dev/urandom might not have been added in the libvirt version OP is running. I have had the same issue on Ubuntu 16.04.2 LTS with libvirt 1.3.1-1ubuntu10.24 installed. I think it has been fixed in libvirt as of version v1.3.4

Apparently there is no way to change this behavior in libvirt other than updating it to a newer version.

@kee001 thx for issue. Can you please try to follow http://manpages.ubuntu.com/manpages/xenial/man4/random.4.html and see if it solves for you?
Your error is more on your System side. Imho depending on the OS. We can keep this issue open.
We changed time ago from random to urandom

Thanks

server: systemctl status libvirt-bin

Feb 10 02:51:47 server6 libvirtd[2107]: XML error: file '/dev/urandom' is not a supported random source

server: systemctl status libvirt-bin

Feb 10 02:51:47 server6 libvirtd[2107]: XML error: file '/dev/urandom' is not a supported random source

yes, your libvirt verison is too old and does not yet support /dev/urandom as random source. You either need to update your libvirt version or override the default random source to /dev/random using the xslt feature. (https://github.com/dmacvicar/terraform-provider-libvirt/tree/master/examples/xslt)

Closing thx

server: systemctl status libvirt-bin

Feb 10 02:51:47 server6 libvirtd[2107]: XML error: file '/dev/urandom' is not a supported random source

yes, your libvirt verison is too old and does not yet support /dev/urandom as random source. You either need to update your libvirt version or override the default random source to /dev/random using the xslt feature. (https://github.com/dmacvicar/terraform-provider-libvirt/tree/master/examples/xslt)

Could you provide xsl for it please?

A work around for those stuck with an older version of libvirt may set the environment variable TF_LIBVIRT_RNG_DEV

export TF_LIBVIRT_RNG_DEV=/dev/random

source: https://github.com/dmacvicar/terraform-provider-libvirt/blob/753afd8a074e74334821006e4b4e321e63214ff7/libvirt/domain_def.go#L86-L90

v1.3.4

How to upgrade libvirt v1.3.1 to v1.3.4 in ubuntu 16.04?

@kkhamruddin-pk I'm using openSUSE Leap 15.1 Linux (https://www.opensuse.org/). On ubuntu I dunno personally. I might thing you need to upgrade the distro version, but take this as just a suggestion. I'm not using ubuntu since a while..

Hope it helps!

Was this page helpful?
0 / 5 - 0 ratings