June 2017
Intermediate to advanced
340 pages
8h 22m
English
Let's look at the code in more detail. First, save the preceding changes in a file and execute the script:
(kvm_python) root@kvm:~/kvm_python# python kvm_api.pyBottle v0.12.13 server starting up (using WSGIRefServer())...Listening on http://localhost:8080/Hit Ctrl-C to quit.
In a separate terminal, define a new instance, passing the following XML definition, as a header:
(kvm_python) root@kvm:~/kvm_python# curl -s -i -XPOST localhost:8080/define --header "X-KVM-Definition: <domain type='kvm'><name>kvm_api</name><memory unit='KiB'>1048576</memory><vcpu >1</vcpu><os><type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type></os><devices><emulator>/usr/bin/qemu-system-x86_64</emulator><disk type='file' device='disk'><driver ...
Read now
Unlock full access