From d60ca6e6a7b888baffc897b5c16ca06b60e7410e Mon Sep 17 00:00:00 2001 From: Igor Shishkin Date: Thu, 5 Dec 2013 19:23:09 +0400 Subject: [PATCH 1/4] TCP socket usage + documentation added --- devops/settings.py | 2 +- docs/source/getstart.rst | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/devops/settings.py b/devops/settings.py index b597638..d390b04 100644 --- a/devops/settings.py +++ b/devops/settings.py @@ -2,7 +2,7 @@ DRIVER = 'devops.driver.libvirt.libvirt_driver' DRIVER_PARAMETERS = { - 'connection_string': os.environ.get('CONNECTION_STRING', 'qemu:///system'), + 'connection_string': os.environ.get('CONNECTION_STRING', 'qemu+tcp://127.0.0.1:16509/system'), 'storage_pool_name': os.environ.get('STORAGE_POOL_NAME', 'default'), } diff --git a/docs/source/getstart.rst b/docs/source/getstart.rst index ad108ed..e3a61fa 100644 --- a/docs/source/getstart.rst +++ b/docs/source/getstart.rst @@ -63,3 +63,21 @@ At this point you are ready to make your first devops application. environment.define() This code creates environment 'myenv' with only one VM 'mynode' and attaches 10G qcow2 volume to it. It also creates libvirt network 'mynet' from the range 10.0.0.0/16. + +As we use TCP connection to libvirtd we need to set it up to accept TCP. + +in /etc/libvirt/libvirtd.conf: + +:: + listen_tls = 0 + listen_tcp = 1 + tcp_port = "16509" + # tls_port = "16514" + +And fix the init-script settings to start libvirtd with --listen option + +in /etc/default/libvirt-bin: + +:: + # options passed to libvirtd, add "-l" to listen on tcp + libvirtd_opts="-d -l" From 442838648e8080450fba48c9aeaea10a49bb60b6 Mon Sep 17 00:00:00 2001 From: Igor Shishkin Date: Thu, 5 Dec 2013 19:34:12 +0400 Subject: [PATCH 2/4] listen_addr = 127.0.0.1 added to doc --- docs/source/getstart.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/getstart.rst b/docs/source/getstart.rst index e3a61fa..5ef3d4f 100644 --- a/docs/source/getstart.rst +++ b/docs/source/getstart.rst @@ -73,6 +73,7 @@ in /etc/libvirt/libvirtd.conf: listen_tcp = 1 tcp_port = "16509" # tls_port = "16514" + listen_addr = "127.0.0.1" And fix the init-script settings to start libvirtd with --listen option From d7341335ff3057ad1cc108f091b94d5d60068798 Mon Sep 17 00:00:00 2001 From: Igor Shishkin Date: Thu, 5 Dec 2013 20:15:17 +0400 Subject: [PATCH 3/4] auth none added to libvirtd.conf --- docs/source/getstart.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/getstart.rst b/docs/source/getstart.rst index 5ef3d4f..8133fe6 100644 --- a/docs/source/getstart.rst +++ b/docs/source/getstart.rst @@ -74,6 +74,7 @@ in /etc/libvirt/libvirtd.conf: tcp_port = "16509" # tls_port = "16514" listen_addr = "127.0.0.1" + auth_tcp=none And fix the init-script settings to start libvirtd with --listen option From 41b73265e68dae057d93e58848f3d189a965b3f2 Mon Sep 17 00:00:00 2001 From: Igor Shishkin Date: Fri, 6 Dec 2013 00:26:26 +0400 Subject: [PATCH 4/4] fix for auth_tcp option in doc --- docs/source/getstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/getstart.rst b/docs/source/getstart.rst index 8133fe6..3d8531b 100644 --- a/docs/source/getstart.rst +++ b/docs/source/getstart.rst @@ -74,7 +74,7 @@ in /etc/libvirt/libvirtd.conf: tcp_port = "16509" # tls_port = "16514" listen_addr = "127.0.0.1" - auth_tcp=none + auth_tcp = "none" And fix the init-script settings to start libvirtd with --listen option