diff options
author | Philip Hands <phil@hands.com> | 2016-06-06 22:45:09 +0200 |
---|---|---|
committer | Philip Hands <phil@hands.com> | 2016-06-10 11:19:54 +0200 |
commit | c8d42bb1b22eee148a6b352530e949e97155f635 (patch) | |
tree | 9bdf887b7c4cc06bbc0170ae454251bd04998b1e /cucumber/features/support/helpers | |
parent | be08ee19d577baca6733d4eece26c4335518d58f (diff) | |
download | jenkins.debian.net-c8d42bb1b22eee148a6b352530e949e97155f635.tar.xz |
lvc: name VMs after the job, so snapshots are distinct
Diffstat (limited to 'cucumber/features/support/helpers')
-rw-r--r-- | cucumber/features/support/helpers/vm_helper.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cucumber/features/support/helpers/vm_helper.rb b/cucumber/features/support/helpers/vm_helper.rb index ad1493f8..3f172136 100644 --- a/cucumber/features/support/helpers/vm_helper.rb +++ b/cucumber/features/support/helpers/vm_helper.rb @@ -74,8 +74,14 @@ class VM rexml = REXML::Document.new(default_domain_xml) rexml.elements['domain'].add_element('name') rexml.elements['domain/name'].text = @domain_name - rexml.elements['domain'].add_element('uuid') - rexml.elements['domain/uuid'].text = LIBVIRT_DOMAIN_UUID + # PGH + begin + old_domain = @virt.lookup_domain_by_name(LIBVIRT_DOMAIN_NAME) + rexml.elements['domain'].add_element('uuid') + rexml.elements['domain/uuid'].text = old_domain.uuid + old_domain.undefine + rescue + end update(rexml.to_s) @display = Display.new(@domain_name, x_display) set_cdrom_boot(TAILS_ISO) |