public:managing_kvm_on_debian

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
public:managing_kvm_on_debian [2024/05/15 09:03] – [Editing a VM's XML configuration] thomaspublic:managing_kvm_on_debian [2024/05/17 20:56] (current) thomas
Line 57: Line 57:
 </pool> </pool>
 </code> </code>
 +
 +:!: Note that this does not support libvirt snapshots. You will need to make snapshots via ZFS manually, which may not be ideal.
  
 Then, create the pool based on the definition and make sure it autostarts: Then, create the pool based on the definition and make sure it autostarts:
Line 215: Line 217:
 virsh undefine windows-server-2022 --nvram virsh undefine windows-server-2022 --nvram
 </code> </code>
-===== Forcing VM to stop =====+===== Stopping guest ===== 
 + 
 +This will ask a VM to shut down:
  
 <code> <code>
-virsh destroy windows-server-2022+virsh shutdown <name> 
 +</code> 
 + 
 +This will force a VM to shut down: 
 +<code> 
 +virsh destroy <name>
 </code> </code>
 ===== Editing a VM's XML configuration ===== ===== Editing a VM's XML configuration =====
Line 235: Line 244:
  
 <code> <code>
-virsh domdisplay windows11-manuchar <name>+virsh domdisplay <name>
 </code> </code>
  
Line 242: Line 251:
 <code> <code>
 for dom in $(virsh list --name); do echo -n "$dom: "; virsh domdisplay $dom; done for dom in $(virsh list --name); do echo -n "$dom: "; virsh domdisplay $dom; done
 +</code>
 +
 +===== Managing media =====
 +
 +Listing attached media:
 +
 +<code>
 +virsh domblklist <guestname>
 +</code>
 +
 +To replace a disk or cd-rom with another:
 +
 +<code>
 +virsh change-media <guestname> /path/to/current/disk.img /path/to/new/disk.img
 +</code>
 +
 +Or to simply eject a disk:
 +
 +<code>
 +virsh change-media vm1 hdc --eject
 </code> </code>
 ===== Resources ===== ===== Resources =====
Line 249: Line 278:
   * https://libvirt.org   * https://libvirt.org
   * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/   * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/
 +  * https://serverfault.com/questions/334199/how-to-find-which-screen-and-thus-port-the-vnc-ui-for-a-kvm-guest-has-or-how
public/managing_kvm_on_debian.1715763807.txt.gz · Last modified: by thomas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki