Datastore Import
Below are steps to import an existing datastore in a Proxmox cluster.
It is assumed that the volume is mapped to the cluster from, the storage. If not, look at Volume/LUN Tasks to map the volume
Volume Group Discovery
You will now need to inform all of the cluster nodes that there is a change to the storage of an LVM volume.
Information
Run the following steps on ALL of the cluster nodes
You can execute all of the below commands on all nodes with Oxide Cluster Run (e.g.
oxide -j1pi 'whomai', where j1pi is the jnb1 proxmox internal/uat cluster (useoxide --helpfor other cluster options))
iSCSI Rescan
Inform the hosts to check the device paths
Multipath Rescan
Inform the multipath drivers to update, based on the previous rescan
Add volume to LVM
You can now trigger LVM on each host to scan and update the volume information.
Add datastore to Proxmox
You can now add the storage to the cluster
Storage wizard
Click Datacentre -> Storage -> Add -> LVM
Settings
Please configure the below settings for the datastore
- Provide a meaningful ID, as it cannot be changed without being removed (keep it the same as the volume group name if possible)
- In the Volume Group drop-down, you should now be able to select your new volume group (e.g. VGNAME). Select it.
- Toggle Shared on
- You can leave all of the rest as default
Click Add
Validation
- Look at the data centre inventory on the left (make sure you're in Server View)
- Expand all servers so that you can see their contents
- Your storage (meaningful ID) should now show in the side bar under each server
- It may start with a grey circle simple on it.
- After several seconds the symbol should disappear
- You should now be able to select that data store and browse the available VM disks.
Import VMs
You will now need to import the data into VMs.
Information
You will need to get the original VMs information from the source proxmox vluster (e.g. The original VM ids
Create Blank VM
For each VM that you wish to import, you must create a proxmox VM object, without any data disk. Take note of the VMid
Rename the Logical Volume/s
You will need to rename the cluster volume to line up with the VMid provided by our target Proxmox cluster.
This is not strictly necessary for a simple volume import, but if the naming of the LV and the VM do not match up, Prox has been known to get confused.
On ONE of the prox hosts run the following
Get Volume Group Name
If you don't alredy have it (from previously) you can get the name of the VG using the below.
Get the Logical Volume Name
You will need the proxmox standard LV volume name (using the Old VMs ID)
Rename the volume
You must now renamed the LV to match the new Proxmox Cluster's ID.
The new name should just be the same as the old name, replacing just the Old_VMid digits with the New_VMid digits.
lvrename <vgname> <old-disk-name> <new-disk-name>
# e.g. lvrename purestoragepool1 vm-5500-disk-0 vm-101-disk-0
the-customers-exported-datastore and the Old_VMid was 5500 in thier proxmox cluster. The New_VMid, created by are blank VM is 234, so the command will be lvrename the-customers-exported-datastore vm-5500-disk-0 vm-234-disk-0)
Link disk (LV) to VM
You can now link the disk/s to the VM.
On the cluster node where the VM is deployed you can now do the following.
0 that is the order of the disks attached to the VM. Typically, if a disk is named vm-234-disk-0, the 0.
qm set 101 --scsi0 purestoragepool1:vm-101-disk-0,discard=on,ssd=1
qm set 101 --scsi1 purestoragepool1:vm-101-disk-1,discard=on,ssd=1
Information
A customer's VM may have more than one volume linked to it. Just repeat the process for each volume with the same Old_VMid (e.g. A VM may have vm-5500-disk-0, vm-5500-disk-1 and vm-5500-disk-2, so you will need to rename and add all of those in sequence).
Configure Boot Order
Finally, you can now fix the VM disk boot order so the VM boots off of the correct disks.
- Go to the Proxmox GUI
- Select the VM
- Select Options
- Edit the Boot Order option
- Enable the scsiX devices and drag the boot device to the top of the list.
- You should now be able to start the VM
Guest Agent
Ensure that the qemu-guest-agent is installed and enabled on the VM (you can quickly check this by looking at the summery of the VM for additional information)
Storage Migration
Once you are complete, please migrate all new newly imported VMs to the customer's dedicated (official) datastore and remove this temporary one, when done.
Billing
Please don't forget to add the VM to billing (whilst we are still in manual tracking mode)