- shut down you virtual machine
- open VirtualBox Manager
- choose you machine
- click Settings->Storage->SATA Contoller->icon Add Hard Disk
- click "Create new disk"
- choose format VMDK (Virtual Machine Disk) for example -> next
- choose Dynamically allocated for example -> next
- enter name, and choose size
- click Create
- click Ok
- run virtual machine
- > sudo fdisk -l
Disk /dev/sda: 5475 MB, 5475663872 bytes
4 heads, 32 sectors/track, 83552 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 78125 4999984 83 Linux
/dev/sda2 78126 79681 99584 83 Linux
Disk /dev/sdb: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table- I added 100Gb disk that got name /dev/sdb
- "Disk /dev/sdb doesn't contain a valid partition table" mean that you need to format this disk first
- yum install gparted
- run gparted (if you use graphical or see the manual)
- choose you disk in right top corner dropdown
- Device -> Create Partition Table -> choose ms-dos -> apply
- right click on disk bar -> New -> +Add
- right click on disk bar -> Format to.. -> choose ext3
- > mkdir /mnt/mydisk
- > mount -t ext3 /dev/sdb1 /mnt/mydisk
- > cd /mnt/mydisk
- > df
- to mount automatically on boot, add disk to /etc/fstab my /etc/fstb for example, i added last line
- LABEL=79d3d2d4 / ext4 defaults,noatime 0 0
LABEL=e21a3e10 /boot ext3 defaults,noatime 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/sdb1 /mnt/mydisk ext3 defaults 0 0 - DONE
среда, июня 13, 2012
Mount additional disk to VirtualBox image (centos 6)
Подписаться на:
Комментарии к сообщению (Atom)
1 комментарий:
polezno :)
Отправить комментарий