Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (28 sloc) 1.01 KB
sflinks = [ [ 'linux-base', 'virtualbox-vm-base' ] ]
[ foundation.virtualbox-vm-base ]
description = 'Base VirtualBox VM'
scripts = { 'create' = 'virtualbox-vm-create', 'destroy' = 'virtualbox-vm-destroy' }
foundation_types = [ 'VirtualBox' ]
config_values = { 'memory_size' = 512, 'cpu_count' = 1, virtualbox_guest_type = 'Other' }
template = {}
physical_interface_names = [ 'eth0' ]
[ script.virtualbox-vm-create ]
description = 'Create VirtualBox VM'
script = """# Create VirualBox VM
vm_spec = foundation.virtualbox_vmspec
begin( description='VM Creation' )
vm_uuid = virtualbox.create( vm_spec=vm_spec )
foundation.virtualbox_uuid = vm_uuid
interface_map = foundation.get_interface_map()
foundation.set_interface_macs( interface_map=interface_map )
end
"""
[ script.virtualbox-vm-destroy ]
description = 'Destroy VirualBox VM'
script = """# Destory VirualBox VM
begin( description='VM Destruction' )
foundation.power_off()
foundation.destroy()
foundation.virtualbox_uuid = None
end
"""
You can’t perform that action at this time.