Revision 75818250 qemu-doc.texi
b/qemu-doc.texi | ||
---|---|---|
1321 | 1321 |
* qemu_nbd_invocation:: qemu-nbd Invocation |
1322 | 1322 |
* host_drives:: Using host drives |
1323 | 1323 |
* disk_images_fat_images:: Virtual FAT disk images |
1324 |
* disk_images_nbd:: NBD access |
|
1324 | 1325 |
@end menu |
1325 | 1326 |
|
1326 | 1327 |
@node disk_images_quickstart |
... | ... | |
1503 | 1504 |
@item write to the FAT directory on the host system while accessing it with the guest system. |
1504 | 1505 |
@end itemize |
1505 | 1506 |
|
1507 |
@node disk_images_nbd |
|
1508 |
@subsection NBD access |
|
1509 |
|
|
1510 |
QEMU can access directly to block device exported using the Network Block Device |
|
1511 |
protocol. |
|
1512 |
|
|
1513 |
@example |
|
1514 |
qemu linux.img -hdb nbd:my_nbd_server.mydomain.org:1024 |
|
1515 |
@end example |
|
1516 |
|
|
1517 |
If the NBD server is located on the same host, you can use an unix socket instead |
|
1518 |
of an inet socket: |
|
1519 |
|
|
1520 |
@example |
|
1521 |
qemu linux.img -hdb nbd:unix:/tmp/my_socket |
|
1522 |
@end example |
|
1523 |
|
|
1524 |
In this case, the block device must be exported using qemu-nbd: |
|
1525 |
|
|
1526 |
@example |
|
1527 |
qemu-nbd --socket=/tmp/my_socket my_disk.qcow2 |
|
1528 |
@end example |
|
1529 |
|
|
1530 |
The use of qemu-nbd allows to share a disk between several guests: |
|
1531 |
@example |
|
1532 |
qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2 |
|
1533 |
@end example |
|
1534 |
|
|
1535 |
and then you can use it with two guests: |
|
1536 |
@example |
|
1537 |
qemu linux1.img -hdb nbd:unix:/tmp/my_socket |
|
1538 |
qemu linux2.img -hdb nbd:unix:/tmp/my_socket |
|
1539 |
@end example |
|
1540 |
|
|
1506 | 1541 |
@node pcsys_network |
1507 | 1542 |
@section Network emulation |
1508 | 1543 |
|
Also available in: Unified diff