[libvirt] [jenkins-ci PATCH] lcitool: use slirp networking if running non-root

The virtual networks are only available to the system libvirt instance. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- guests/lcitool | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 0f60704..9d17f1a 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -511,9 +511,12 @@ class Application: facts["install_disk_size"], facts["install_storage_pool"], ) - network_arg = "network={},model=virtio".format( - facts["install_network"], - ) + if os.geteuid() == 0: + network_arg = "network={},model=virtio".format( + facts["install_network"], + ) + else: + network_arg = "user,model=virtio" # Different operating systems require different configuration # files for unattended installation to work, but some operating -- 2.21.0

On Thu, May 02, 2019 at 03:29:51PM +0100, Daniel P. Berrangé wrote:
The virtual networks are only available to the system libvirt instance.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- guests/lcitool | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
Self-NACK. While this works fine for initial install, we can't then ssh into it to run ansible. hostfwd could make that work, but libvirt doesn't support it :-( Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (1)
-
Daniel P. Berrangé