= Running Linux in a VM = = Hardware Requirements = You need a system with virtualization (VT-d), at least 4GB of RAM, and 40GB of free hard drive space in order to run Linux in a VM. If you want to download and compile the kernel, you may need additional space of up to 20GB. = Download Debian = [[https://www.debian.org/distrib/|Download link to]] Get a recent version of Debian. = Install Libvirt/Virtual-Manager Virtualizer = Instructions for Debian OS: Install the needed packages: {{{ sudo apt-get install qemu-kvm libvirt-clients libvirt-daemon-system virt-manager ebtables}}} Add your user to libvirt group: {{{ sudo adduser user libvirt}}} Configure libvirt: {{{ virsh --connect=qemu:///system net-start default virsh --connect=qemu:///system net-autostart default}}} [[https://wiki.debian.org/KVM|Debian setup link]] Further Debian Setup and Help Page. Instructions for Archlinux: Install needed packages: {{{ sudo pacman -S virt-manager libvirt ebtables dnsmasq qemu}}} Add your user to kvm group: {{{ sudo adduser user kvm}}} [[https://wiki.archlinux.org/index.php/libvirt| Archlinux setup page]] See this link for further setup instructions. = Setup Virt Machine Manager = == Start Virtual Machine Manager from Application Menu == {{attachment:00-Main-Start-Screen.png|Virtual Machine Manager|align="middle"}} == 1) Click on "Create a new virtual machine" button for new VM creation == {{attachment:01-Create-New-VM.png|Create new virtual machine|align="middle"}} === Choose install media (ISO image or CDROM) for installation of downloaded Linux Distro ISO image. === == 2) Browse and choose the Linux Distro ISO image == {{attachment:02-Choose-ISO-image.png|Browse and Choose ISO Image|align="middle"}} == 3) Set Your required Memory and CPU settings for the VM (Guest OS) == {{attachment:03-Set-Memory-CPU.png|Set Memory and CPU for VM|align="middle"}} == 4) Enable and Create a storage space for the VM (Guest OS) == {{attachment:04-Create-Storage-Space.png|Create Storage Space for VM|align="middle"}} == 5) Ready to begin the installation == {{attachment:05-Ready-VM-Install.png|Begin Installation|align="middle"}} === Shows the settings you chose. === === Put a Name for the VM as you like (App suggests one by default) === === Press Finish Button. It creates the VM and boots into it and starts the Linux Distro OS installation. === == 6) Example Linux Distro OS Install Start Screen == {{attachment:06-Example-Guest-OS-Install_Start.png|Debian Install Screen|align="middle"}} == 7) Example Installed Guest OS Boot Screen == {{attachment:07-Example-Guest-Grub-Boot-Menu.png|Installed Debian Guest OS Boot Screen|align="middle"}} == 8) You can know the assigned IP Address for the Guest OS == {{attachment:08-Find-IP-Address-Guest.png|Know the Assigned IP Address|align="middle"}} === Find your Guest's IP address in "Show virtual hardware details" menu in NIC option. If IP address is not shown click refresh button and get it. Mind that the Guest OS is running and network is up and running in guest. === === IP address may be needed for ssh access to your Guest OS from host. === == 9) Trouble Shoot CDROM Issues == {{attachment:11-TroubleShoot-CDROM.png|Trouble Shoot CDROM|align="middle"}} === You can check if CDROM ISO image is present and if not browse and select it. === == 10) Trouble Shoot Boot Issues == {{attachment:12-TroubleShoot-Boot.png|Trouble Shoot Boot Issue|align="middle"}} === You can set devices to be bootable and the order of boot. === = SSH Access = Install ssh (rsync) in both Host and Guest OS Debian/Ubuntu install instructions: {{{ sudo apt-get install ssh rsync}}} Find your Guest's IP Address in "Show virtual hardware details" menu in NIC option. If IP address is not shown click refresh button and get it. Mind that the Guest OS is running and network is up and running in guest. For SSH access to Guest OS run: {{{ ssh -p 22 user@ip_address_of_guest}}} You can access guests with their hostnames. [[https://wiki.debian.org/KVM|See this link]] for instructions for Debian.