1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00

build: fixed kvm snapshot support; makebuildserver: setup kvm ssh credentials

This commit is contained in:
Michael Pöhn 2017-03-06 02:57:07 +01:00 committed by Hans-Christoph Steiner
parent fa2d44ee94
commit fad98eeb7f
2 changed files with 6 additions and 3 deletions

View File

@ -132,7 +132,7 @@ def vm_snapshot_list(provider):
get_builder_vm_id(provider), 'list',
'--details'], cwd='builder')
elif provider is 'libvirt':
p = FDroidPopen(['virsh', 'snapshot-list',
p = FDroidPopen(['virsh', '-c', 'qemu:///system', 'snapshot-list',
get_builder_vm_id(provider)])
return p.output
@ -149,17 +149,18 @@ def vm_snapshot_restore(provider):
get_builder_vm_id(provider), 'restore',
'fdroidclean'], cwd='builder')
elif provider is 'libvirt':
p = FDroidPopen(['virsh', 'snapshot-revert',
p = FDroidPopen(['virsh', '-c', 'qemu:///system', 'snapshot-revert',
get_builder_vm_id(provider), 'fdroidclean'])
return p.returncode == 0
def vm_snapshot_create(provider):
if provider is 'virtualbox':
p = FDroidPopen(['VBoxManage', 'snapshot',
get_builder_vm_id(provider),
'take', 'fdroidclean'], cwd='builder')
elif provider is 'libvirt':
p = FDroidPopen(['virsh', 'snapshot-create-as',
p = FDroidPopen(['virsh', '-c', 'qemu:///system', 'snapshot-create-as',
get_builder_vm_id(provider), 'fdroidclean'])
return p.returncode != 0

View File

@ -341,6 +341,8 @@ def kvm_package(boxfile):
}
"""
vagrantfile = """Vagrant.configure("2") do |config|
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"
config.vm.provider :libvirt do |libvirt|