KVM - Linux kernel virtualization manager
Links: docker containers
- Similar in function to VMware, it uses linux as a hypervisor for guest virtual machines.
- Makes use of hardware virtualization built into most CPU's.
- Gui - Virtual Machine Manager
Memory dedup with KSM
- Monitor ksm with
watch -d "tail /sys/kernel/mm/ksm/* | sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{3\}\)/\1,\2/;ta'"
- Monitor ksm with
Storage virsh/kvm
- Disk storage is a pool, volumes is created from the pool and assigned to individual VM's.
virsh vol-list default
Ubuntu cloud images on KVM
- Need a config iso to configure user and ssh keys on boot
sudo apt install cloud-image-utils
- Setup config file
#cloud-config # Add groups to the system # The following example adds the ubuntu group with members 'root' and 'sys' # and the empty group cloud-users. groups: - ubuntu: [root,sys] - cloud-users # Add users to the system. Users are added after groups are added. users: #- default #the 'ubuntu' user in addition to other users - name: vagrant password: vagrant chpasswd: { expire: False } gecos: Default dev username vagrant primary-group: vagrant groups: users, sudo #selinux-user: staff_u #expiredate: 2012-09-01 ssh-import-id: vagrant ssh_pwauth: True lock_passwd: false passwd: vagrant
VBox - Oracle virtual box
- Create physical disk drive
\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands createrawvmdk -filename "C:\Users\<user_name>\VirtualBox VMs\<VM_folder_name>\<file_name>.vmdk" -rawdisk \\.\PhysicalDrive#
...