Difference between revisions of "Virtual Machine (KVM)"

Jump to navigation Jump to search
1,175 bytes added ,  19:43, 12 April 2020
Added Move Virtual Machine
(Added Auto Start)
(Added Move Virtual Machine)
Line 89: Line 89:
Once the command has got as far as <code>Waiting for installation to complete.</code> you need to connect to the VNC console session, to find the port number to connect on query the config from anothet SSH session connected to the host (typically VNC uses ports starting from 5900 upwards).
Once the command has got as far as <code>Waiting for installation to complete.</code> you need to connect to the VNC console session, to find the port number to connect on query the config from anothet SSH session connected to the host (typically VNC uses ports starting from 5900 upwards).
   virsh dumpxml ubuntu-desktop | grep vnc
   virsh dumpxml ubuntu-desktop | grep vnc
== Move Virtual Machine ==
If you want to move your domain/VM to another KVM host and don't have shared storage you can manually copy the data and VM config across to another host and import it.
# Shutdown the virtual machine
#* Preferably from the OS so it gets a graceful shutdown, alternatively stop the VM from KVM
# Export the config
#* EG <code> virsh dumpxl <VMname> > /tmp/VMName.xml</code>
# Copy the VM disk file(s) and config XML to their new host
#* Disk file(s) should go the location from which your VM's will run from
# Update the config, if necessary...
#* Disk file path - If the VM disks are in a different path on the new server up date the path in the XML file, look for <code>source file=</code>
#* CPU type - If the physical CPU type is different on the new host, you may need to update the VM config to allow for this, update the <code>cpu mode</code> config to match the capabilities of the destination host (see https://www.berrange.com/posts/2018/06/29/cpu-model-configuration-for-qemu-kvm-on-x86-hosts/ for more info)
# Import the VM
#* EG <code> virsh define /path/to/VMName.xml </code>
# Start the VM
#* EG <code> virsh start <VMName> </code>


== Other Config ==
== Other Config ==

Navigation menu