====== virt-manager KVM GUI ====== ===== Remote management with virt-manager ===== You have to install this on the **target** machine: * netcat (nc) * qemu-kvm * libvirtd ===== using a physical disk ===== ==== empty target ==== - Click on the “File” menu at the top left of the window. - Click on the “New Virtual Machine” menu entry. - Choose your installation media. - Click on “Forward”. - Follow the wizard as usual until you reach step 4. - On step 4, choose “Select or create custom storage”. - Inside the text field, type something like “/dev/disk/by-id/{id of the disk}” or “/dev/sdXX”. - If you don’t want to ever use command line, you can install GParted or GNOME Disks, they’ll tell you the /dev path. - Click “Forward”. - Finish the wizard as you would do usually. **Do NOT use a physical disk or partition if you plan to do anything risky or if you don’t know what are you doing.** Using a physical disk, you can lose data, overwrite the bootloader by mistake, or a virus could make your computer unbootable by messing up with labels. Using a physical partition is, however, more safe than using a physical disk, but you can still lose the data of the partition. **Do NOT share a mounted physical partition except if you know what are you doing.** **Upon deletion of the VM, when it asks for “Deleting associated storage files”, do NOT forget to uncheck your /dev device.** ==== booting from an already-installed disk ==== - Click on the “File” menu at the top left of the window. - Click on the “New Virtual Machine” menu entry. - Choose “Import existing disk image” in the wizard. - Inside the text field, type something like “/dev/disk/by-id/{id of the disk}” or “/dev/sdXX”. If you don’t want to ever use command line, you can install GParted or GNOME Disks, they’ll tell you the /dev path. - Choose the appropriate “OS Type” and “Version”. - Click “Forward”. - Finish the wizard as you would do usually. **WARNING: You may want to personalize the VM settings and disk emulation settings in order to boot properly on it.** If your OS expects SATA and virt-manager sets it up to IDE, you will probably be unable to boot without a reinstall ‒ but if you use this steps' list instead of the first one, it’s precisely to not reinstall it. **As well, all warnings of the first method applies here.** Note: Booting using this method on an already-installed partition is almost impossible, since bootloaders are often inside the disk, and not in a partition. Instead: - Go make a VM with a little virtual disk with a LiveCD/LiveDVD/LiveUSB as installation source. Little = 101 MiB. - Inside the settings of the VM, add a new hard disk with a path like “/dev/disk/by-id/{id of the disk}” or “/dev/sdXX”. - If you don’t want to ever use command line, you can install GParted or GNOME Disks, they’ll tell you the /dev path. - Start the virtual machine. - Create a partition table on the virtual disk. - Create a 100 MiB ext2 partition on this virtual disk. - Mount that new partition. - Inside a Terminal, run: grub-install {/dev path to your 100 MiB partition} --boot-directory={mounted path to your 100 MiB partition}/boot/grub2 - Then run create a grub.cfg inside the{mounted path to your 100 MiB partition}/boot/grub2 folder suitable for booting on the 2nd hard disk. - grub-mkconfig may not probe the distribution on the other disk if it lacks a partition table. - GRUB can boot from a physical partition. - Remove the LiveCD/LiveDVD/LiveUSB from your VM. - Reboot.