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..3d8531b 100644 --- a/docs/source/getstart.rst +++ b/docs/source/getstart.rst @@ -63,3 +63,23 @@ 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" + listen_addr = "127.0.0.1" + auth_tcp = "none" + +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"