Mathieu Bacou
mathieu.bacou@telecom-sudparis.eu
Télécom SudParis, IMT, IP Paris, Inria
2024–2025 CSC5004 — Cloud Computing Infrastructures
virsh
virsh helpvirsh pool- commands familyvirsh vol- commands familyvirt-installvirsh editvirsh startvirsh destroy
virsh shutdown to demand shutdown gracefully as from
(virtual) hardwarevirsh consolevirt-viewervirtio driversopen("/dev/kvm");
ioctl(KVM_CREATE_VM);
ioctl(KVM_CREATE_VCPU);
for (;;) {
// Jump into guest code with VMLAUNCH/VMRESUME until next VMEXIT (hypercall, etc.)
exit_reason = ioctl(KVM_RUN);
switch (exit_reason) {
case KVM_EXIT_IO: // Handle VM I/O
case KVM_EXIT_HLT: // Handle VM halting
//...
}
}ioctls use special CPU instructions (examples are
from Intel’s set)