If you would like to add a secondary hard disk to a guest VM (i.e., domU) on Xen, you can do the following.
First, create a disk image for the secondary hard disk on dom0, as follows:
Then edit Xen configuration for the domU guest VM to include the hard disk.
disk = ['file:/vm/dfs1.img,xvda,w','file:/vm/dfs1-disk2.img,xvdb,w']
Next, power on and boot into the guest VM.
Finally, you need to make the newly attached hard disk available to the guest VM by formatting and mounting it.
/dev/xvdb /mnt ext3 defaults 0 0
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!
Latest posts by Dan Nanni (see all)
- How to install Suricata intrusion detection system on Linux - September 3, 2015
- How to switch from NetworkManager to systemd-networkd on Linux - August 31, 2015
- How to set up a system status page of your infrastructure - August 25, 2015