MIGRATE VM - VM and Storage disk on single separate SSD

aquananu

Member
Aug 12, 2020
12
0
6
50
hi have two nodes running

i have one vm which is stored on an ssd and the disks used by the vm is also stored on the same ssd. This ssd is independent of the hdd on which proxmox is installed

i want to move this disk physically to the new node (added recently to create a cluster) as the new system is faster and has more ram

please advise can i just move the ssd physically to new computer and restart it, will the vm get listed in the proxmox node, if not then how to import it
 
There are several ways on how you can achieve this. Since both nodes seem to be on the same cluster, the easiest way would probably be to migrate the VM in question, which would also migrate away the disks to the new node. Then you can move the SSD which should now be empty and put it into the new node. There you could just reformat the disk, add it as a new storage and then move the disks from the VM to the old SSD.
 
thanks Stefan

i had figured this method but was seeing if there was a way to avoid the migration of whole data to new disk and back.

My intention to put the vm and data drive on separate ssd was that in case of failure of the system, the ssd could be moved to another system and brought back online with least downtime.

As per the current setup of proxmox, it means that there is no way to retrieve a vm in case the hdd having the server installation crashes and a new server has to be installed. Please advise if my understanding is correct
 
As per the current setup of proxmox, it means that there is no way to retrieve a vm in case the hdd having the server installation crashes and a new server has to be installed. Please advise if my understanding is correct
You should be able to also just move the disk, but this is a bit more complicated which is why I posted the easier solution initially.

You can move the disk to the other node and then add it as a new storage there, preferably with the same name. Afterwards you need to move the configuration file of the VM to the other node. The configuration file for VMs can be found in the folder /etc/pve/nodes/{nodename}/qemu-server or /etc/pve/nodes/{nodename}/lxc for containers. It wouldn't hurt to backup those files, but if they are both in the same cluster they should be there even if the other node is unavailable. This file needs to be moved to the configuration folder of the other node, so it is available there. As soon as the configuration file gets moved, you should see the VM on the other node and you can start working with it if you set up the storage on the other node properly.
 
Also keep in mind that you shouldn't run a cluster with just two nodes (at least if not running a third host as a qevice). If one host goes down, both nodes will stop working.
 
  • Like
Reactions: shanreich
Also keep in mind that you shouldn't run a cluster with just two nodes (at least if not running a third host as a qevice). If one host goes down, both nodes will stop working.
I created second node as backup
i have cloned all the vm and migrated the cloned vm to the second node.
i m doing this manually currently every week
i shut down the second node after the migration of the cloned vm is complete, this is just to ensure that there is a working backup of the vm and the data upto some point of time and also incase of an attack on the server this system is not compromised and can be started to bring back the required software systems.

Please suggest if there is a better approach
 
I created second node as backup
i have cloned all the vm and migrated the cloned vm to the second node.
i m doing this manually currently every week
i shut down the second node after the migration of the cloned vm is complete, this is just to ensure that there is a working backup of the vm and the data upto some point of time and also incase of an attack on the server this system is not compromised and can be started to bring back the required software systems.

Please suggest if there is a better approach
If both nodes are in the same cluster, is your cluster even functional (quorate) then? In that case I would highly recommend using a QDevice, as described in our wiki [1].

[1] https://pve.proxmox.com/wiki/Cluster_Manager#_corosync_external_vote_support
 
If both nodes are in the same cluster, is your cluster even functional (quorate) then? In that case I would highly recommend using a QDevice, as described in our wiki [1].

[1] https://pve.proxmox.com/wiki/Cluster_Manager#_corosync_external_vote_support
You should be able to also just move the disk, but this is a bit more complicated which is why I posted the easier solution initially.

You can move the disk to the other node and then add it as a new storage there, preferably with the same name. Afterwards you need to move the configuration file of the VM to the other node. The configuration file for VMs can be found in the folder /etc/pve/nodes/{nodename}/qemu-server or /etc/pve/nodes/{nodename}/lxc for containers. It wouldn't hurt to backup those files, but if they are both in the same cluster they should be there even if the other node is unavailable. This file needs to be moved to the configuration folder of the other node, so it is available there. As soon as the configuration file gets moved, you should see the VM on the other node and you can start working with it if you set up the storage on the other node properly.
hI i was implementing this solution, but unable to copy any files to the destination folder as the permissions are not there and even chmod command is not working

kindly advise how to copy the files
 
hI i was implementing this solution, but unable to copy any files to the destination folder as the permissions are not there and even chmod command is not working

kindly advise how to copy the files
hi please help which user can copy the files into the folder as root has no access
 
You need to give us more information. At least your typed in command and the actual output with the error message. Please use copy-n-paste and put it in CODE-Tags.

/etc/pve is a pseudo file system which is only mounted as long PVE is up and running correctly. (I'm unsure which specific service is responsible for this.) To be writeable the Cluster must quorate - as far as I know.

Usually also helpful: "pveversion -v", "pvecm status", "ip a" and so on, depending on context.
 

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!