Total text: 1111 words and 20 pictures, estimated reading time: 1 minute
Many friends have the same feeling as me after using PVE(PVE8.0-2 Installation and Use Quick Guide) It’s just a bit awkward, and I want to change to a virtualization software, such as VMware ESXi. How should I do it?
As we said before, the bottom layer of PVE is also KVM virtualization, so the operation method should be more similar to KVM.
First, we need to find the disk file of the virtual machine. From the hardware configuration of the virtual machine, we can see that the hard disk is mounted in ide0 and the disk image is local-lvm:vm-101-disk-0.
Then we go to the navigation bar data center local-lvm (pve), we can see that there is this disk named vm-101-disk-0 in the VM disk, the format is raw, and the size is 34.36 GB.
So what is the real path of this disk? Let’s go to the command line to take a look, search directly, and find two files. The file /dev/pve/vm-101-disk-0 is the corresponding VM disk, but it is not a real path, but mapped to /dev. /dm-6.
Confirm the file information and use the qemu-img command. For the introduction and usage of the command, please refer to (qemu-img Command Manual). Use the qemu-img info command to view disk image file information.
You can see that the file format is raw, and other information is basically the same as what you see on the page. The page display size is 34.36 GB because the base is 1000.
After confirmation, we can use the qemu-img convert command to convert the disk file format.
qemu-img convert [-c] [-p] [-n] [-f fmt] [-t cache] [-T src_cache] [-O output_fmt] [-o options] [-s snapshot_name] [ -S sparse_size] filename [filename2 [...]] output_filename
Convert a disk image filename or snapshot snapshot_name to a disk image output_filename using the format output_fmt, optionally compressing (the “-c” option) or using any format-specific options such as encryption (the “-o” option).
qemu-img convert -c -O vmdk /dev/pve/vm-101-disk-0 /nfs/tt/vm-101.vmdk
After the conversion is complete, let’s take a look at the disk usage.
It is also very strange that there is no increase compared to before the operation.
After the conversion is completed, we can see this disk file in VMware’s NFS storage(Configure the NFS server with the Debian 12 system of PVE8.0) .
Then we create a new virtual machine.
Follow normal virtual machine configuration and select the correct and appropriate operating system version.
Store the selection to the specified storage space.
Configure the appropriate hardware configuration and select the hard disk configuration.
Quickly create virtual machines.
After the creation is completed, enter the data storage browser and find the directory corresponding to the name of the virtual machine you just created. You can see that there is already a vmdk disk file below.
Then we move the converted disk files in the NFS storage to this directory.
Now check the file size on the disk or 276.81 MB.
Then we edit the virtual machine settings while the virtual machine is powered off, delete the original hard disk, check “Delete files from data storage”, and then click “Add hard disk” , select Existing Drive.
It is the same as the last time the hardware was mounted(VMware uses the vmkfstools command to convert the thick provisioned virtual machine disk to thin provisioning), and it is also type and size identification. Inaccurate.
After the modification was completed, an error occurred when starting the virtual machine, indicating that the disk type was not supported. Now think back to what we mentioned at the beginning, what type of disk this is.
Then in the hard disk configuration, change the controller location to “IDE Controller 0”.
Start it again and you can enter the system normally.
Working together is quite simple.
Long press the QR code
Follow us
PVE8.0-2 Quick Guide for Installation and Use
Configure the NFS server using the Debian 12 system of PVE8.0
VMware storage management command vmkfstools usage guide
VMware uses the vmkfstools command to convert thick provisioning virtual machine disks to thin provisioning
I can’t use VMware after turning on Hyper-V. How to fix it?
Can you find a way for Hyper-V and VMware to coexist?
HPE server installs Tesla M4 through graphics card pass-through. Is this considered a success?
Switch to WDDM mode, Tesla M4 can be used for local display output!
Go all out, use a real machine to demonstrate the business of upgrading ESXi 6.7 to 7.0 U3
Network Road 25: VLAN Advanced Experiment-Super VLAN
CentOS 7 builds NFS server
Soft Exam Network Planner Review Chapter 6: Basic Network Experiment
Soft Exam Network Planner Review Chapter 5: Understanding Virtualization
Soft Exam Network Planner Review Chapter 4: Understanding Network Simulators
How should I configure FortiGate’s IPsec VPN?
Configuration example of using IKE digital signature RSA authentication to establish an IPsec tunnel