Normally you don't need direct access to a block device from a virtual machine, but in some cases it is very to convenient to use one. One of such cases is a file/backup server which needs access to a raid or just a huge hard disk with an existing file system.
Here is what should be done in order to make it work.
1. Create a directory which will contain links to the block devices visible in XEN.
mkdir /srv/xen-devices
2. Create storage repository for the block devices
xe sr-create name-label="Block devices" name-description="Block devices which we want to use directly in XEN" type=udev content-type=disk device-config:location=/srv/xen-devicesassign displayed uuid to shell variable SR
3. [Optional] If step 2 fails with the error message:
The SR could not be connected because the driver was not recognised.
driver: udev
then you need to fix it. Do the following:
cd /usr/lib/xcp/sm/ ln -s udevSR.py udevSR /usr/lib/xcp/bin/xe-toolstack-restartAnd then try again step 2.
4. Find a device you want to make visible in the Xen, for example, like this:
ls -l /dev/disk/by-path
Link it
ln -s /dev/disk/by-id/ata-some-device /srv/xen-devices/some-device
5. Rescan our storage repository
xe sr-scan uuid=$SR
6. List VDIs of the storage repository and spot the one with "Unrecognised bus type"
xe vdi-list sr-uuid=$SR
assign VDI¨s uuid to the VDI variable in shell.
7. Set name and label for the VDI to whatever you like:
xe vdi-param-set uuid=$VDI name-description="A real disk" xe vdi-param-set uuid=$VDI name-label="R-disk"
8. Create VBD which assign the VDI to the VM
xe vbd-create device=1 vm-uuid=$VM vdi-uuid=$VDI bootable=false mode=RW type=Diskassign display uuid to the VBD variable
9. Attach it to the VM
xe vbd-plug uuid=$VBD
That's all. Now you can log into the virtual machine and check with 'dmesg' that a new device is available.
Please continue this great work and I look forward to more of your awesome blog posts. best vacuum for cat litter on tile
ReplyDelete1) If possible, have someone else change the litter box. If you have to clean it, wear disposable gloves and wash your hands thoroughly with soap and warm water afterwards. silica cat litter
ReplyDeleteinstagram takipçi satın al
ReplyDeleteaşk kitapları
tiktok takipçi satın al
instagram beğeni satın al
youtube abone satın al
twitter takipçi satın al
tiktok beğeni satın al
tiktok izlenme satın al
twitter takipçi satın al
tiktok takipçi satın al
youtube abone satın al
tiktok beğeni satın al
instagram beğeni satın al
trend topic satın al
trend topic satın al
youtube abone satın al
instagram takipçi satın al
beğeni satın al
tiktok izlenme satın al
sms onay
youtube izlenme satın al
tiktok beğeni satın al
sms onay
sms onay
perde modelleri
instagram takipçi satın al
takipçi satın al
tiktok jeton hilesi
instagram takipçi satın al
pubg uc satın al
sultanbet
marsbahis
betboo
betboo
betboo
adana
ReplyDeleteadıyaman
afyon
ağrı
aksaray
EİJZ