• Guido Trotter's avatar
    KVM: split KVM runtime generation and startup · ee5f20b0
    Guido Trotter authored
    Before we used to generate the kvm command line and then just run it.
    With this patch we split the generation from the time it is run,
    allowing us to save it and replay it at reboot.
    We must take special care about instance nics:
      - We can't include them in the saved command line, as they point to
        temporary files
      - We can't just generate them at exec time, because we would apply
        those changes, but not all the other ones, to a running instance,
        thus making it inconsistent (for example if an instance had a memory
        increased and one more nic, in a soft reboot we would add the nic, but
        not the memory)
    So we'll just save the instance nic data at the time the kvm runtime
    data is generated, and transform it into actual parameters at execution
    Reviewed-by: iustinp