Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:kvm [2024/01/19 17:47] – [VM] darrontools:kvm [2024/08/15 00:35] (current) – [VM] darron
Line 60: Line 60:
  
 __Interactive__ __Interactive__
 +
 +This example uses a fixed MAC address.
  
 <code> <code>
Line 80: Line 82:
 --vcpus 1 \ --vcpus 1 \
 --os-variant debian11 \ --os-variant debian11 \
---network bridge=br0 \+--network bridge=br0,mac=02:00:c0:a8:00:6e \
 --graphics none \ --graphics none \
 --console pty,target_type=serial \ --console pty,target_type=serial \
 --location "${DVD}" \ --location "${DVD}" \
---initrd-inject preseed.cfg \ 
 --extra-args 'console=ttyS0' --extra-args 'console=ttyS0'
 </code> </code>
- 
-[[:tools:preseed|preeseed.cfg]] 
  
 __Non interactive__ __Non interactive__
  
-Append the following.+Append the following to the interactive script above
  
 <code> <code>
---noautoconsole+--initrd-inject preseed.cfg --noautoconsole --wait
 </code> </code>
  
-After install start the VM.+This preseed file uses a fixed IP address. 
 + 
 +[[:tools:preseed|preeseed.cfg]] 
  
 ==List== ==List==
Line 117: Line 119:
 virsh autostart debian12 virsh autostart debian12
 </code> </code>
 +
 +== No auto start==
 +
 +<code>
 +virsh autostart --disable debian12
 +</code>
 +
 +== Information ==
 +
 +<code>
 +virsh dominfo debian12
 +</code>
 +
  
 ==Console== ==Console==
Line 125: Line 140:
  
 ==Stop== ==Stop==
 +
 +<code>
 +virsh shutdown debian12
 +</code>
 +
 +NB there are optional modes
 +
 +== Force stop==
  
 <code> <code>
Line 134: Line 157:
 <code> <code>
 virsh undefine debian12 virsh undefine debian12
 +</code>
 +
 +==Export==
 +
 +<code>
 +virsh dumpxml debian12 > debian12.xml
 +</code>
 +
 +==Import==
 +
 +<code>
 +virsh define debian12.xml
 </code> </code>
 ===Resources=== ===Resources===
Line 141: Line 176:
 [[https://www.golinuxcloud.com/virt-install-examples-kvm-virt-commands-linux/|virt-install examples]] [[https://www.golinuxcloud.com/virt-install-examples-kvm-virt-commands-linux/|virt-install examples]]
  
 +[[https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/|DVD ISO Debian Current]]
 +
 +[[https://cloud.debian.org/cdimage/archive/11.10.0/amd64/iso-dvd/|DVD ISO Debian Bullseye 11.10]]
 +
 +[[https://cloud.debian.org/cdimage/archive/10.13.0/amd64/iso-dvd/|DVD ISO Debian Buster 10.13]]