Trace: » Command Ref » Tips/Tricks » EFFector » Shell » Add a disk to a guest
Add a disk to a guest
First you may want to clone the image you are working with.
xm list
xm shutdown <guest ID>
virt-clone -o clone
Next create the file(s) to be used as the additional disk(s).
This will create a roughly 10G disk
dd if=/dev/zero of=/var/lib/xen/images/disk1.img bs=1M seek=10000 count=1
chmod 755 /var/lib/xen/images/disk1.img
/etc/xen/
name = "guest" uuid = "5bf34997-75d1-7c48-4fd5-8bb28290a7bb" maxmem = 512 memory = 512 vcpus = 1 bootloader = "/usr/bin/pygrub" on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" vfb = [ "type=vnc,vncunused=1,keymap=en-us" ] disk = [ "tap:aio:/var/lib/xen/images/guest.img,xvda,w", "tap:aio:/var/lib/xen/images/disk1.img,xvdb,w" ] vif = [ "mac=00:12:3e:70:f5:5b,bridge=xenbr0" ]
You are here: Links » addxm » Add a disk to a guest