kvm

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

qcow2

# create image file
qemu-img create -f qcow2 /var/lib/libvirt/images/vm01.qcow2 25G

# create raw disk
chown libvirt-qemu.kvm /var/lib/libvirt/images/vm01.qcow2
chmod 600 /var/lib/libvirt/images/vm01.qcow2

# shrink qcow image
qemu-img convert -O qcow2 image01.in.qcow image.01.out.qcow

# shrink qcow image with compression
qemu-img convert -O qcow2 -c image01.in.qcow image.01.out.qcow

# convert
qemu-img convert -O qcow2 ubuntu-16.04-server-cloudimg-amd64-disk1.img ubuntu-16.04-server-cloudimg-amd64-disk1.qcow2

# create image
qemu-img create disk.img -f qcow2 4G

virt

# list all vms
virsh list --all

virt-install \
--name ubuntu1604 \
#--ram 2048 \
--disk path=./ubuntu1604.qcow2,size=8 \
--accelerate \
--vcpus 2, maxvcpus=3 \
--memory=1024, maxmemory=2048 \
--memballoon virtio \
#--vcpus 2 \
--os-type linux \
--os-variant generic \
--network bridge=virbr0 \
--graphics none \
--console pty, target_type=serial \
--location "http://archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/" \
--extra-args "console=ttyS0, 115200n8 serial"

virt-install \
--name ubuntu1604 \
--disk path=./ubuntu1604.qcow2,size=8 \
--accelerate \

Instal KVM (Kernel-based Virtual Machine)

script:
https://installit.googlecode.com/hg/install.kvm.sh
 
 
# configure locale
wget -q http://www.panticz.de/sites/default/files/scripts/configure_locale.sh -O - | bash -
 
# install on ubuntu
apt-get install -y qemu kvm ubuntu-vm-builder
 
# install on debian
apt-get install -y kvm
apt-get install -y libvirt-bin
apt-get install -y virtinst
 
/etc/init.d/libvirt-bin restart
 
# net
virsh net-start default
virsh net-autostart default
 
# vg
mkdir /etc/libvirt/storage
cat <<EOF> /etc/libvirt/storage/vg0.xml
<pool type='logical'>
  <name>vg0</name>
  <target>
    <path>/dev
Syndicate content