User Tools

Site Tools


linux:apps:kvm

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
linux:apps:kvm [2025/09/21 12:22] – [Libvirt default network] oscarlinux:apps:kvm [2025/10/21 20:15] (current) oscar
Line 1: Line 1:
 ====== KVM ====== ====== KVM ======
-S2YLNY0HA01587+ 
 +---- 
 ===== Installation ===== ===== Installation =====
 Install all the required for the installation of Qemu, KVM hypervisor, and Libvirt  Install all the required for the installation of Qemu, KVM hypervisor, and Libvirt 
Line 115: Line 117:
 ===== Shrink KVM  qcow2 image ===== ===== Shrink KVM  qcow2 image =====
   qemu-img convert -O qcow2 source.qcow2 shrunk.qcow2   qemu-img convert -O qcow2 source.qcow2 shrunk.qcow2
-===== Links =====+===== Make SATA disk available in Windows Client =====   
 +To make a SATA disk partition available in a Windows VM add the disk to the domain’s xml config file by hand. First find the id of the partition that you want to add. Rather than using /dev/sda you should use /dev/disk/by-id/ where you get from
  
 +   ls -l /dev/disk/by-id
 +
 +Now edit the ///etc/libvirt/qemu/${YOUR_VM}.xml// file and add a <disk> section to the <devices> section:
 +<code>
 +# nano /etc/libvirt/qemu/${YOUR_VM}.xml
 +
 +or 
 +
 +virsh edit ${YOUR_VM}
 +----------------------------------------------
 +<disk type='block' device='disk'>
 +    <driver name='qemu' type='raw'/>
 +    <source dev='/dev/disk/by-id/{the-partition-id}'/>
 +    <target dev='vdb' bus='virtio'/>
 +</disk>
 +</code>
 +This will make the host’s partition available in the guest as /dev/vdb (D:). After changing a domain’s config by hand, you have to reload the config by hand. Log in to your host and issue this command:
 +
 +  # virsh define /etc/libvirt/qemu/${YOUR_VM}.xml
 +  
 +  Domain YOUR_VM defined from /etc/libvirt/qemu/${YOUR_VM}.xml
 +  
 +===== Links =====
   * [[https://wiki.debian.org/KVM#Installation]]   * [[https://wiki.debian.org/KVM#Installation]]
  
linux/apps/kvm.1758457373.txt.gz · Last modified: by oscar