Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:kvm [2024/01/19 17:04] – [VM] darron | tools:kvm [2024/08/15 00:35] (current) – [VM] darron | ||
---|---|---|---|
Line 58: | Line 58: | ||
==Create== | ==Create== | ||
+ | |||
+ | __Interactive__ | ||
+ | |||
+ | This example uses a fixed MAC address. | ||
< | < | ||
Line 78: | Line 82: | ||
--vcpus 1 \ | --vcpus 1 \ | ||
--os-variant debian11 \ | --os-variant debian11 \ | ||
- | --network bridge=br0 \ | + | --network bridge=br0, |
--graphics none \ | --graphics none \ | ||
--console pty, | --console pty, | ||
--location " | --location " | ||
- | --initrd-inject preseed.cfg \ | ||
--extra-args ' | --extra-args ' | ||
</ | </ | ||
+ | |||
+ | __Non interactive__ | ||
+ | |||
+ | Append the following to the interactive script above | ||
+ | |||
+ | < | ||
+ | --initrd-inject preseed.cfg --noautoconsole --wait | ||
+ | </ | ||
+ | |||
+ | This preseed file uses a fixed IP address. | ||
[[: | [[: | ||
+ | |||
==List== | ==List== | ||
Line 93: | Line 107: | ||
virsh list --all | virsh list --all | ||
</ | </ | ||
+ | |||
+ | ==Start== | ||
+ | |||
+ | < | ||
+ | virsh start debian12 | ||
+ | </ | ||
+ | |||
+ | ==Auto start== | ||
+ | |||
+ | < | ||
+ | virsh autostart debian12 | ||
+ | </ | ||
+ | |||
+ | == No auto start== | ||
+ | |||
+ | < | ||
+ | virsh autostart --disable debian12 | ||
+ | </ | ||
+ | |||
+ | == Information == | ||
+ | |||
+ | < | ||
+ | virsh dominfo debian12 | ||
+ | </ | ||
+ | |||
==Console== | ==Console== | ||
Line 101: | Line 140: | ||
==Stop== | ==Stop== | ||
+ | |||
+ | < | ||
+ | virsh shutdown debian12 | ||
+ | </ | ||
+ | |||
+ | NB there are optional modes | ||
+ | |||
+ | == Force stop== | ||
< | < | ||
Line 110: | Line 157: | ||
< | < | ||
virsh undefine debian12 | virsh undefine debian12 | ||
+ | </ | ||
+ | |||
+ | ==Export== | ||
+ | |||
+ | < | ||
+ | virsh dumpxml debian12 > debian12.xml | ||
+ | </ | ||
+ | |||
+ | ==Import== | ||
+ | |||
+ | < | ||
+ | virsh define debian12.xml | ||
</ | </ | ||
===Resources=== | ===Resources=== | ||
Line 117: | Line 176: | ||
[[https:// | [[https:// | ||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// |