In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article analyzes "how Linux uses virtual machines on KVM". The content is detailed and easy to understand. Friends who are interested in "how to use a virtual machine on Linux on KVM" can follow the editor's train of thought to read it deeply. I hope it will be helpful to you after reading. Let's follow the editor to learn more about "how Linux uses virtual machines on KVM".
Are you considering switching from VirtualBox to KVM hypervisor? One of your biggest concerns is to create a new virtual machine in KVM so you can start all over again, which can be said to be a daunting task.
The good news is that you can easily migrate VirtualBox VM in VDI format to qcow2 (that is, KVM's disk image format) without creating a new KVM guest computer.
In this article, we will outline the step-by-step process of how to migrate VirtualBox VM to KVM VM in Linux.
Step 1: list existing VirtualBox images
First, make sure that all virtual machines are turned off. The Virtualbox guest computer exists in VDI disk format. Next, list the existing VirtualBox virtual machines as shown in the figure.
$VBoxManage list hdds or $vboxmanage list hdds
From the output, you can see that I have two virtual disk images: the Debian VDI image and the Fedora VDI image.
Step 2: convert the VDI image to RAW disk format
The next step is to convert the VDI image to RAW disk format. To do this, run the following command.
$VBoxManage clonehd-format RAW / home/james/VirtualBox\ VMs/debian/debian.vdi debian_10_Server.img
Or
$vboxmanage clonehd-format RAW / home/james/VirtualBox\ VMs/debian/debian.vdi debian_10_Server.img
When you investigate, you will find that the RAW image format takes up a lot of disk space. You can use the du command shown in the figure to verify the size of the RAW image.
$du-h debian_10_Server.img
In my case, the Debian RAW image takes up 21 gigabytes of hard disk space, which is quite large. We will convert the RAW disk image to KVM disk format later.
Step 3: convert the RAW image disk format to KVM format
Finally, to migrate to the KVM disk image format, convert the RAW image to qcow2 format, which is the KVM disk image format.
$qemu-img convert-f raw debian_10_Server.img-O qcow2 debian_10_Server.qcow2qcow2
The qcow2 disk image is much smaller than the RAW disk image. Also use the du command to verify this, as follows:
$du-h debian_10_Server.qcow2
You can then import the qcow2 KVM image format on the command line or using the KVM graphical window and create a new KVM virtual machine.
So much for sharing about how Linux uses virtual machines on KVM. I hope the above content can improve everyone. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.