Applicable to:
- SolusVM 2
Question
How to mount SolusVM 2 VPS image at CR filesystem ?
Answer
Let's assume there is a VPS with UUID 11034e9b-2d3c-4692-8c5a-b08adc84f791
- Connect to CR via SSH
Find out the path to image file:
# virsh domblklist 11034e9b-2d3c-4692-8c5a-b08adc84f791 | grep vda | awk {'print $2'}
/var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bcMap the image partitions:
# kpartx -a -v /var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bc
add map loop1p1 (253:0): 0 716800 linear 7:1 2048
add map loop1p2 (253:1): 0 83165184 linear 7:1 718848Create a directory and mount the corresponding partition:
# mkdir /mnt/storage
# mount /dev/mapper/loop1p2 /mnt/storageNote: For mounting partitions with ntfs(Windows VPS images) it is necessary to install
ntfs-3gpackage.When the work with partition is finished unmount partition and unmap the image:
# umount /mnt/sysimage
# kpartx -d /var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bc
- Connect to CR via SSH
Find out the path to image file:
# virsh domblklist 11034e9b-2d3c-4692-8c5a-b08adc84f791 | grep vda | awk {'print $2'}
/var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bcInstall libguestfs-tools-c package:
# yum install libguestfs-tools-c
Create a directory and mount the image using the image path from step 2:
# mkdir /mnt/storage
# guestmount -a /var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bc -i --rw /mnt/storageWhen the work with partition is finished unmount partition and unmap the image:
# fusermount -u /mnt/sysimage
Comments
Please sign in to leave a comment.