diff --git a/software/kvm/buildout.hash.cfg b/software/kvm/buildout.hash.cfg
index a475bcd3410ebb2b71e0225eb196d8b2815df4d1..032d005e46ac14c5099520f34cdda0a363d8e091 100644
--- a/software/kvm/buildout.hash.cfg
+++ b/software/kvm/buildout.hash.cfg
@@ -19,7 +19,7 @@ md5sum = abd8493f35e153a5984ed22c8fe49792
 
 [template-kvm]
 filename = instance-kvm.cfg.jinja2
-md5sum = 900faa43cd9bb599aa7be0cdc64531bf
+md5sum = 780332c37e5b7ad4f799bab417685fe9
 
 [template-kvm-cluster]
 filename = instance-kvm-cluster.cfg.jinja2.in
diff --git a/software/kvm/instance-kvm.cfg.jinja2 b/software/kvm/instance-kvm.cfg.jinja2
index fc8e24b6c058c3f445059fd0cc524875600ab2ef..91f891d3117e2a885c12c2937b28d782bd9d44d6 100644
--- a/software/kvm/instance-kvm.cfg.jinja2
+++ b/software/kvm/instance-kvm.cfg.jinja2
@@ -668,12 +668,18 @@ context =
     raw docroot {{ novnc_location }}
     raw mime {{ nginx_mime }}
 
+[kvm-nginx-port]
+recipe = slapos.cookbook:free_port
+minimum = 6080
+maximum = 6100
+ip = {{ partition_ipv6 }}
+
 [nginx-params]
 path-pid = ${directory:run}/nginx.pid
 path-error-log = ${directory:log}/nginx-error.log
 path-access-log = ${directory:log}/nginx-access.log
 ip = ${slap-network-information:global-ipv6}
-port = 6080
+port = ${kvm-nginx-port:port}
 websocket-ip = ${kvm-parameter-dict:vnc-ip}
 websocket-port = ${kvm-parameter-dict:vnc-websocket-port}
 websocket-path = websockify
@@ -1081,6 +1087,12 @@ md5sum = {{ bootstrap_script_url[1] }}
 name = vm-bootstrap
 log = ${directory:public}/ansible/vm-bootstrap.log
 
+[kvm-slapos-parameter-port]
+recipe = slapos.cookbook:free_port
+minimum = 8081
+maximum = 8101
+ip = {{ partition_ipv6 }}
+
 [slap-parameter]
 # Default values if not specified
 frontend-software-type = RootSoftwareInstance
@@ -1131,7 +1143,7 @@ external-disk = {}
 
 # Help to get some configuration files into the vm from http
 enable-http-server = False
-httpd-port = 8081
+httpd-port = ${kvm-slapos-parameter-port:port}
 # for auto config, the public key file will be available in the VM via url http://10.0.2.100/authorized_key if use-nat = True
 authorized-key =