ID #1125

How to add extra disk (HDD) in existing virtual machine?

To add add disk to a machine, go to deployment page and open a vm configuration (Edit config)

edit config

copy existing disk tag and pest it below the same.


Existing disk tag...

        <disk device='disk' type='file'>
            <source file='/opt/infracc/managed-host/deploycache/deploy/admin/fd2dc792-f485/__top__.1.qcow2' />
            <target bus='ide' dev='hda' />
            <driver name='qemu' type='qcow2' />

New disk tag...

        <disk device='disk' type='file'>
            <source file='/opt/infracc/managed-host/deploycache/deploy/admin/fd2dc792-f485/disk1.img' />
            <target bus='ide' dev='hdb' />
            <driver name='qemu' type='qcow2' />

As show in New disk tag, disk1.img is the new disk image, that needs to be create at same soruce path as of existing old tag.  i.e /opt/infracc/managed-host/deploycache/deploy/admin/fd2dc792-f485/

go to managed host on which vm is deployed.

cd to path source file path

     cd /opt/infracc/managed-host/deploycache/deploy/admin/fd2dc792-f485/

Create disk file 'disk1.img' using command.

     sudo bash

     qemu-img create -f qcow2 disk1.img 50G

     chmod 700 disk1.img

Make sure to change 'dev' to hdb or hdc depending on number of disk.

save changes to Edit config, and start virtual machine.

Tags: -

Related entries:

You can comment this FAQ