Fix libvirt error on jumphost 99/24999/1
authorQiLiang <liangqi1@huawei.com>
Wed, 23 Nov 2016 03:46:28 +0000 (11:46 +0800)
committerqi liang <liangqi1@huawei.com>
Mon, 28 Nov 2016 08:51:29 +0000 (08:51 +0000)
Fix permission denied (Libvirt::Error) on the disk image, when
boot compass-core vm on some jumphost env.

Ref:
* https://github.com/adrahon/vagrant-kvm/issues/163
* https://ubuntuforums.org/showthread.php?t=1985773

JIRA: -

Change-Id: I17adad6ff6984beac4a4c65d8953a36d3a39f7ce
Signed-off-by: QiLiang <liangqi1@huawei.com>
(cherry picked from commit ae26a864122abb03cedfd5437153b5e1e47f751c)

deploy/prepare.sh

index d326bd5..4e27196 100755 (executable)
@@ -31,7 +31,8 @@ function download_iso()
 }
 
 function prepare_env() {
-
+    sed -i -e 's/^#user =.*/user = "root"/g' /etc/libvirt/qemu.conf
+    sed -i -e 's/^#group =.*/group = "root"/g' /etc/libvirt/qemu.conf
     sudo service libvirt-bin restart
     if sudo service openvswitch-switch status|grep stop; then
         sudo service openvswitch-switch start