User Tools

Site Tools


public:techstuff:libvirt

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:techstuff:libvirt [2012/09/22 12:50] nathanpublic:techstuff:libvirt [2020/04/25 13:05] (current) – external edit 127.0.0.1
Line 3: Line 3:
 ===== Creating a VM ===== ===== Creating a VM =====
  
-==== Basic install ====+==== Creating an KVM VM ====
  
   virt-install   virt-install
Line 13: Line 13:
   --disk=/img/<vm name>.img,device=disk,bus=virtio,size=<disk size GB>,sparse=true,format=raw   --disk=/img/<vm name>.img,device=disk,bus=virtio,size=<disk size GB>,sparse=true,format=raw
  
-==== Existing image ====+==== Creating an LXC VM ==== 
 + 
 +  * Capped resources at 512mb of ram and 2 cpus 
 + 
 +  cd /img 
 +  mkdir <vmname> 
 +  sudo debootstrap wheezy <vmname> http://mirror.byte.net.nz/debian/ 
 +  sudo virt-install --connect lxc:/// --name cubert --ram 512 --vcpu 2 --filesystem /img/cubert/,/ --noautoconsole -w network=vm 
 + 
 +  virt-install \ 
 +  --connect lxc:/// 
 +  --name httpd_guest 
 +  --ram 512 
 +  --vcpus 2 
 +==== Existing KVM image ====
  
   virt-install   virt-install
Line 38: Line 52:
 <code>virsh vol-create-as <pool name> <volume name> <size></code> <code>virsh vol-create-as <pool name> <volume name> <size></code>
  
-  * And then use this line to specify it.+And then use this line to specify it.
  
 <code>--disk vol=<poolname>/<volume name>,bus=virtio,cache=none</code> <code>--disk vol=<poolname>/<volume name>,bus=virtio,cache=none</code>
public/techstuff/libvirt.1348318229.txt.gz · Last modified: 2020/04/25 13:05 (external edit)