-
-
Save pedroamador/511d6521080e543f4b9064eeef20fdd8 to your computer and use it in GitHub Desktop.
nbd storage backend in qemu.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Network Block Device(nbd): | |
In Linux, a network block device is a device node whose content is provided by a remote machine. Typically, network block devices are used to access a storage device that does not physically reside in the local machine but on a remote one. As an example, the local machine can access a fixed disk that is attached to another computer. | |
1.start nbd-server to export a qcow2 image with absolute path on the NBD server host. | |
# nbd-server 12345 /home/my-data-disk.qcow2 | |
2.launch a KVM guest with this exported image as a data disk. | |
# qemu-img info nbd:10.66.83.171:12345 | |
image: | |
file format: qcow2 | |
virtual size: 10G (10737418240 bytes) | |
disk size: unavailable | |
cluster_size: 65536 | |
Format specific information: | |
compat: 1.1 | |
lazy refcounts: false | |
e.g:...-drive file=nbd:10.66.83.171:12345,if=none,id=drive-data-disk,format=qcow2,cache=none,aio=native -device virtio-scsi-pci,id=scsi1,addr=0x7,bus=pci.0 -device scsi-hd,bus=scsi1.0,drive=drive-data-disk,id=data-disk,bootindex=2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment