Files
pyvmm/test.py
2022-03-30 21:30:13 +02:00

20 lines
484 B
Python

from asyncio import run
from pathlib import Path
from pyvmm.machine_model import load_from_yaml
from pyvmm.image_manager import ensure_image_present
from pyvmm.context import VmmContext
if __name__ == '__main__':
from pprint import pprint
with open('example-vm.yaml') as f:
vms = load_from_yaml(f)
pprint(vms)
print()
ctx = VmmContext(vmm_root=Path('./.vmm'), vmm_spec=vms, native_arch='x86_64')
run(ensure_image_present(vms.images[0], ctx))