Difference between revisions of "Virtualization"

From HyperSecurity Wiki
Jump to: navigation, search
(KVM Commands)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
How to install KVM VM using virt-install CLI:
 +
 +
<pre>
 +
virt-install \
 +
  --name dhcp-new \
 +
  --ram 1024 \
 +
  --vcpus 1 \
 +
  --disk path=/var/lib/libvirt/images/dhcp-new.qcow2,size=10 \
 +
  --location 'http://deb.debian.org/debian/dists/bookworm/main/installer-amd64/' \
 +
  --network bridge=br0 \
 +
  --os-variant debian10 \
 +
  --graphics none \
 +
  --console pty,target_type=serial \
 +
  --extra-args 'console=ttyS0,115200n8 serial'
 +
</pre>
 +
 +
One Liner:
 +
virt-install  --name web-new  --ram 1024  --vcpus 1  --disk path=/var/lib/libvirt/images/web-new.qcow2,size=20  --location 'http://deb.debian.org/debian/dists/bookworm/main/installer-amd64/'  --network bridge=br0  --os-variant debian10  --graphics none  --console pty,target_type=serial  --extra-args 'console=ttyS0,115200n8 serial'
 +
 +
=== KVM Commands ===
 +
List all VMs:
 +
virsh list --all
 +
 +
Exit KVM serial:
 +
Ctrl + ] or Ctrl + 5
 +
 +
Shutdown:
 +
virsh shutdown <domain>
 +
 +
Delete VM:
 +
virsh undefine <domain>
 +
 +
Delete disk image:
 +
rm /var/lib/libvirt/images/<disk_image_file>
 +
 +
Power off and delete VM:
 +
virsh destroy <domain>
 +
 
=== KVM Windows Drivers ===
 
=== KVM Windows Drivers ===
 
*http://www.linux-kvm.org/page/WindowsGuestDrivers
 
*http://www.linux-kvm.org/page/WindowsGuestDrivers
Line 7: Line 45:
 
=== KVM OSX ===
 
=== KVM OSX ===
 
*https://github.com/kholia/OSX-KVM
 
*https://github.com/kholia/OSX-KVM
 +
 +
=== Convert a SPARC Workstation to QEMU ===
 +
http://kb.networksystemssolutions.info/index.php/Sparc_Virtualization
 +
 +
=== SPARC emulation on Linux with QEMU ===
 +
 +
Disk formating:
 +
*https://virtuallyfun.superglobalmegacorp.com/2010/10/03/formatting-disks-for-solaris/
 +
 +
Running QEMU:
 +
*https://linuxuserhelp.wordpress.com/2013/02/12/sparc-emulation-on-linux-with-qemu/
 +
 +
QEMU Monitor Change CD-ROM:
 +
*http://www.linux-kvm.org/page/Change_cdrom
 +
 +
Solaris Install:
 +
*https://en.wikibooks.org/wiki/QEMU/SunOS_4.1.4
 +
 +
Networking:
 +
*http://blog.elastocloud.org/2015/07/qemukvm-bridged-network-with-tap.html
 +
*https://docs.oracle.com/cd/E19455-01/806-1386/6jam5ahkj/index.html

Latest revision as of 04:59, 16 October 2025

How to install KVM VM using virt-install CLI:

virt-install \
  --name dhcp-new \
  --ram 1024 \
  --vcpus 1 \
  --disk path=/var/lib/libvirt/images/dhcp-new.qcow2,size=10 \
  --location 'http://deb.debian.org/debian/dists/bookworm/main/installer-amd64/' \
  --network bridge=br0 \
  --os-variant debian10 \
  --graphics none \
  --console pty,target_type=serial \
  --extra-args 'console=ttyS0,115200n8 serial'

One Liner:

virt-install   --name web-new   --ram 1024   --vcpus 1   --disk path=/var/lib/libvirt/images/web-new.qcow2,size=20   --location 'http://deb.debian.org/debian/dists/bookworm/main/installer-amd64/'   --network bridge=br0   --os-variant debian10   --graphics none   --console pty,target_type=serial   --extra-args 'console=ttyS0,115200n8 serial'

KVM Commands

List all VMs:

virsh list --all

Exit KVM serial:

Ctrl + ] or Ctrl + 5

Shutdown:

virsh shutdown <domain>

Delete VM:

virsh undefine <domain>

Delete disk image:

rm /var/lib/libvirt/images/<disk_image_file>

Power off and delete VM:

virsh destroy <domain>

KVM Windows Drivers

QEMU Raspberry Pi

KVM OSX

Convert a SPARC Workstation to QEMU

http://kb.networksystemssolutions.info/index.php/Sparc_Virtualization

SPARC emulation on Linux with QEMU

Disk formating:

Running QEMU:

QEMU Monitor Change CD-ROM:

Solaris Install:

Networking: