°Ô½Ã¹° 1,369°Ç
   
[QMP] QEMU Disk Ãß°¡
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2014-05-22 (¸ñ) 09:54 Á¶È¸ : 5582
±ÛÁÖ¼Ò :
                                
- VM³»¿¡¼­ µð½ºÅ© »óÅÂÈ®ÀÎ
# fdisk -l

Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f24d6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       13055   104856576   83  Linux


- 100G µð½ºÅ© »ý¼º
# qemu-img create -f qcow2 SECOND_100G.qcow2 100G
Formatting '100G.qcow2', fmt=qcow2 size=107374182400 encryption=off cluster_size=65536 lazy_refcounts=off


- QMP Á¢¼Ó
# socat - UNIX-CONNECT:/VM_DISK/HDs/VM1/vm04020.monitor


- µð½ºÅ©Á¤º¸ È®ÀÎ
(qemu) info block
info block
scsi0-hd0: removable=0 io-status=ok file=/VM_DISK/HDs/VM1/FIRST_HDD.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=1000 iops_rd=0 iops_wr=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
ÇöÀç VM¿¡¼­´Â 1°³ÀÇ µð½ºÅ©°¡ SCSI ÇüÅ·Π¹°·ÁÀÖÀ½


- 100G.qcow2·Î »ý¼ºÇÑ µð½ºÅ©¸¦ ¿¬°á
(qemu) pci_add auto storage file=/VM_DISK/HDs/VM1/SECOND_100G.qcow2,if=scsi
pci_add auto storage file=/VM_DISK/HDs/VM1/SECOND_100G.qcow2,if=scsi
OK domain 0, bus 0, slot 5, function 0

(qemu) info block
info block
scsi0-hd0: removable=0 io-status=ok file=/VM_DISK/HDs/VM1/FIRST_HDD.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=1000 iops_rd=0 iops_wr=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
scsi0-hd1: removable=0 io-status=ok file=/VM_DISK/HDs/VM1/SECOND_100G.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
==>SCSIÇüÅ·Π¿¬°áÇÑ µÎ¹ø° µð½ºÅ©´Â scsi0-hd1 µð¹ÙÀ̽º¸íÀ¸·Î ÀÚµ¿À¸·Î ¿¬°á

¡Ø PCI ÀåÄ¡ Ãß°¡/»èÁ¦
pci_add auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]... -- hot-add PCI device
pci_del [[<domain>:]<bus>:]<slot> -- hot remove PCI device


- VM³»¿¡¼­ µð½ºÅ© »óÅÂÈ®ÀÎ
# fdisk -l

Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f24d6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       13055   104856576   83  Linux

Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


- »ý¼º Ãß°¡µð½ºÅ© »èÁ¦
È®ÀÎÁß 
removable=0  
removable=1

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.