mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-07 22:11:09 +08:00
85 lines
3.7 KiB
Markdown
85 lines
3.7 KiB
Markdown
[#]: subject: "Move Virtual Machine Image to Another Host Using GNOME Boxes"
|
||
[#]: via: "https://www.debugpoint.com/move-virtual-machine-image-another-host/"
|
||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||
[#]: collector: "lkxed"
|
||
[#]: translator: "geekpi"
|
||
[#]: reviewer: " "
|
||
[#]: publisher: " "
|
||
[#]: url: " "
|
||
|
||
Move Virtual Machine Image to Another Host Using GNOME Boxes
|
||
======
|
||
|
||
**This guide explains the steps you need to move a Virtual Machine Image to Another Host Using GNOME Boxes.**
|
||
|
||
GNOME Boxes is a virtualization utility created by the GNOME project. This utility works as a front end for libvirt. libvirt is an open-source API, daemon, and management tool for managing platform virtualization. It supports different virtualization technologies such as KVM, Xen, VMware ESXi, QEMU, etc.
|
||
|
||
If you want to create virtual machines using GNOME Boxes, [refer to this guide.][1]
|
||
|
||
In this tutorial, I will explain how you can move any Virtual Machine image file (which is already created and running using GNOME Boxes) to a different host and run it.
|
||
|
||
This way, you do not need to re-install the virtual machine from the operating system anymore. Moreover, it is portable and you can carry your virtual machine image in a USB stick.
|
||
|
||
### How to Move Virtual Machine Image to Another Host Using GNOME Boxes
|
||
|
||
I hope you have already had a virtual machine created in GNOME Boxes; if not, check out [this guide][1].
|
||
|
||
- GNOME Boxes and [libvert][2] uses below directories for the virtual machine images and configurations. You need to take backups of each, as mentioned below, carefully.
|
||
|
||
- GNOME Boxes keeps the virtual machine’s physical image (usually in the size of GB) in the below path. For each of your virtual machines, you will find an image there.
|
||
|
||
```
|
||
~/.local/share/gnome-boxes/images/
|
||
```
|
||
|
||
![Machine Images][3]
|
||
|
||
- Copy the image file to your new host’s path: `~/.local/share/gnome-boxes/images/`
|
||
|
||
- Copy the libvirt configuration XML from the below path to your new host’s same location.
|
||
|
||
```
|
||
~/.config/libvirt/qemu/
|
||
```
|
||
|
||
![Image XML][4]
|
||
|
||
- In the above path, you should see separate xml files for each of your virtual machines. Copy the one you need.
|
||
|
||
- Open the below file in your current system.
|
||
|
||
```
|
||
~/.config/gnome-boxes/sources/'QEMU Session'
|
||
```
|
||
|
||
- Copy the section (from “[display” … to end of this section) which belongs to your virtual machine. You can easily find it using the name (see below – ‘last seen name’).
|
||
|
||
![QEMU Session File][5]
|
||
|
||
- Open the same above file in the other host machine and append the copied content at the end. Save the file.
|
||
|
||
- Close all applications, including GNOME Boxes, in the new host machine.
|
||
|
||
Open GNOME Boxes now, and you should see your virtual machine moved with its contents in your new host.
|
||
|
||
You can now have a portable virtual machine that can easily carry and move around. Remember, the target machine should have GNOME Boxes installed to make this work.
|
||
|
||
--------------------------------------------------------------------------------
|
||
|
||
via: https://www.debugpoint.com/move-virtual-machine-image-another-host/
|
||
|
||
作者:[Arindam][a]
|
||
选题:[lkxed][b]
|
||
译者:[译者ID](https://github.com/译者ID)
|
||
校对:[校对者ID](https://github.com/校对者ID)
|
||
|
||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||
|
||
[a]: https://www.debugpoint.com/author/admin1/
|
||
[b]: https://github.com/lkxed
|
||
[1]: https://www.debugpoint.com/2020/05/install-use-gnome-boxes/
|
||
[2]: https://libvirt.org/
|
||
[3]: https://www.debugpoint.com/wp-content/uploads/2020/06/Machine-Images.png
|
||
[4]: https://www.debugpoint.com/wp-content/uploads/2020/06/Image-XML.png
|
||
[5]: https://www.debugpoint.com/wp-content/uploads/2020/06/QEMU-Session-File.png
|