Adding a disk image to a xvm/xen guest

Adding a disk to a linux guest.


Create a 16GB vmdk format sparse disk image:



/usr/lib/xen/bin/vdiskadm create -t vmdk:sparse -s 16g -c "extra disk" /path/to/disk/dir


Attach that new disk image to a guest:



virsh attach-disk virtual-guest /path/to/disk/dir xvdd --driver tap --subdriver vdisk


Note the use of 'xvdd' for the disk name that the linux will see the disk as.


Then one can add the disk to the linux guest's /etc/fstab:



/dev/xvdd1 /export/dsk1 ext3 noauto 0 0


And off one goes

Comments:

Post a Comment:
Comments are closed for this entry.
About

smg

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today