mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-20 13:50:12 +01:00
build: fixed kvm snapshot support; makebuildserver: setup kvm ssh credentials
This commit is contained in:
parent
fa2d44ee94
commit
fad98eeb7f
@ -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
|
||||
|
||||
|
@ -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|
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user