Applicable to:
- SolusIO
Question
How to mount SolusIO 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/aad5e792c6b484891b7bf140210028bc - Map 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 718848 - Create a directory and mount the corresponding partition:
# mkdir /mnt/storage
Note: For mounting partitions with ntfs(Windows VPS images) it is necessary to install
# mount /dev/mapper/loop1p2 /mnt/storagentfs-3g
package. - 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/aad5e792c6b484891b7bf140210028bc - Install 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/storage - When the work with partition is finished unmount partition and unmap the image:
# fusermount -u /mnt/sysimage
Comments
0 commentsPlease sign in to leave a comment.