How to migrate a virtual machine in ZFS in RAW

JohnnyRampage

Active Member
Mar 16, 2018
5
0
41
43
Hi, how are you?. Its my first post, sorry for my english im from Argentina. I have installed Proxmox 5.1 in a testing enviroment.
I have 4 disk of 2TB each in ZFS file system to get some redundancy and fault tolerance, i create 2 virtual machines in local-zfs (100 and 101) but i cant see the files trought SSH, i only see the files for 102 and 103 that have a in qcow2 file extension in "local (proxmox)"

In SSH:

root@proxmox:/# zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
rpool 7.25T 351G 6.91T - 0% 4% 1.00x ONLINE -
root@proxmox:/# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 172G 3.23T 151K /rpool
rpool/ROOT 134G 3.23T 140K /rpool/ROOT
rpool/ROOT/pve-1 134G 3.23T 24.3G /
rpool/data 29.7G 3.23T 140K /rpool/data
rpool/data/vm-100-disk-1 11.4G 3.23T 11.4G -
rpool/data/vm-101-disk-1 18.3G 3.23T 16.2G -
rpool/swap 7.44G 3.24T 5.96G -
root@proxmox:/# lvdisplay
root@proxmox:/# ls /rpool/data/

I want to know how can migrate the vm-101-disk-1 thats its in the local-zfs to other server via external disk or something that i was installed. I cant save the files (system) in RAW format.

Thanks you a lot.
 
it is an zvol image, so you cannot directly see it as a file.

Easiest way is to backup the vm via proxmox, the backup takes anything including image and config. Then restore the backup on the other system.

or use the zfs replication built into proxmox (not yet in the gui i think)
 
Thanks for your response. But i want to make the worst situation that the system dont run again or fail and i have to get the virtual machine connecting the disk on other computer to save that RAW file system and make it again. Can i? Or i will lost the entire virtual machine and i have to restore the last backup?.
 
if the system fails, there is usually no way to access the image of course.

If you need security against worst case you have the following solutions:

Backup -> of course stored on a different system

scheduled ZFS Replication

or at best:

at least 3 nodes as a cluster with a shared storage
The shared storage can be:
- an external NFS / ISCSI or whatever, but have to be redundant too)
- or CEPH on the Proxmox cluster (with at least 2 or better 4 OSD's per node)

Please keep in mind that fault tolerance costs money, it doesn't come for nothing.
 
Sure. If the system fails the only vm's that i can restore its the qcow2 extensions? Wich its better raw o qcow2? In this cases?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!