KVM: Difference between revisions
From DWIKI
mNo edit summary |
|||
Line 33: | Line 33: | ||
https://github.com/funollet/vmbootstrap | https://github.com/funollet/vmbootstrap | ||
==Clone a virtual machine== | = Cheatsheet = | ||
== Clone a virtual machine == | |||
Copy the xml file found in /etc/libvirt/ to myclone.xml | Copy the xml file found in /etc/libvirt/ to myclone.xml | ||
You will problable need a new random MAC address, one way you find [here] | You will problable need a new random MAC address, one way you find [here] Also generate a new uuid (todo: get script) | ||
Also generate a new uuid (todo: get script) | |||
Edit myclone.xml: -update <name>, <uuid>, <mac address, <disk><source> | |||
then you will probably need to change things like IP address, /etc/hostname etc. | |||
== Install to drbd == | |||
kvm -name squeeze1 -usbdevice tablet -vnc :1 -hda /dev/drbd0 -cdrom /tmp/debiansqueeze.iso -boot d -m 384 | kvm -name squeeze1 -usbdevice tablet -vnc :1 -hda /dev/drbd0 -cdrom /tmp/debiansqueeze.iso -boot d -m 384 | ||
Line 54: | Line 54: | ||
kvm -name squeeze1 -usbdevice tablet -vnc :1 -hda /dev/drbd0 -boot c -m 384 | kvm -name squeeze1 -usbdevice tablet -vnc :1 -hda /dev/drbd0 -boot c -m 384 | ||
| |||
| |||
virt-install -d --name=squeeze --ram 512 --disk path=/dev/drbd/by-res/squeeze,bus=virtio,cache=none --virt-type=kvm --network bridge=br0,model=virtio --vnc --accelerate --location=[http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/ http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/] | |||
and start using | |||
kvm start squeeze | kvm start squeeze | ||
| |||
== Grow disk == | |||
== | == Run vmdk in kvm == | ||
without converting? |
Revision as of 09:48, 14 January 2021
Links
Docs
Hardware
Required CPU flags:
egrep '^flags.*(vmx|svm)' /proc/cpuinfo
Management tools
proxmox
GUI
virt-manager
Only manages connecting?
aqemu
looks promising
convirt
seems broken/gtk
CLI
virt-install
vmdeboostrap
For quick debian installation. https://github.com/funollet/vmbootstrap
Cheatsheet
Clone a virtual machine
Copy the xml file found in /etc/libvirt/ to myclone.xml
You will problable need a new random MAC address, one way you find [here] Also generate a new uuid (todo: get script)
Edit myclone.xml: -update <name>, <uuid>, <mac address, <disk><source>
then you will probably need to change things like IP address, /etc/hostname etc.
Install to drbd
kvm -name squeeze1 -usbdevice tablet -vnc :1 -hda /dev/drbd0 -cdrom /tmp/debiansqueeze.iso -boot d -m 384
And then use -boot c to actually boot it:
kvm -name squeeze1 -usbdevice tablet -vnc :1 -hda /dev/drbd0 -boot c -m 384
virt-install -d --name=squeeze --ram 512 --disk path=/dev/drbd/by-res/squeeze,bus=virtio,cache=none --virt-type=kvm --network bridge=br0,model=virtio --vnc --accelerate --location=http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/
and start using
kvm start squeeze
Grow disk
Run vmdk in kvm
without converting?