HOWTO+-+Autostart+KVM+Virtual+Machines

1. Use virsh to connect to the local KVM host: code format="bash" $ sudo virsh --connect qemu:///system Connecting to uri: qemu:///system Welcome to virsh, the virtualization interactive terminal.

Type: 'help' for help with commands 'quit' to quit

virsh # code

2. List all the virtual machines to make sure it is being managed by virsh code format="bash" virsh # list --all Id Name                State -- 1 dns                  running 2 webserver           running 3 webserver2          running code

2a. If the virtual machine is not currently in virsh, then define it. code format="bash" virsh define /etc/libvirt/qemu/.xml code

3. Set it to autostart. code format="bash" virsh # autostart  code