Linux Virtualization Remove Storage from Guest: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Linux Virtualization Operations =Procedure= Shut down the guest: <syntaxhighlight lang='bash'> virsh shutd...") |
|||
Line 15: | Line 15: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Lookup the | Lookup the device definition and remove it: | ||
<syntaxhighlight lang='xml'> | <syntaxhighlight lang='xml'> | ||
< | ... | ||
<devices> | |||
... | |||
<disk type='file' device='cdrom'> | |||
<driver name='qemu' type='raw'/> | |||
<source file='/iso-images/CentOS-7-x86_64-DVD-7.9.2009.iso'/> | |||
<target dev='hda' bus='ide'/> | |||
<readonly/> | |||
<address type='drive' controller='0' bus='0' target='0' unit='0'/> | |||
</disk> | |||
<disk type='file' device='cdrom'> | |||
<driver name='qemu' type='raw'/> | |||
<target dev='hdb' bus='ide'/> | |||
<readonly/> | |||
<address type='drive' controller='0' bus='0' target='0' unit='1'/> | |||
</disk> | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Restart the guest: | Restart the guest: |
Revision as of 18:25, 28 March 2021
Internal
Procedure
Shut down the guest:
virsh shutdown <guest-name>
Edit the guest definition:
virsh edit <guest-name>
Lookup the device definition and remove it:
...
<devices>
...
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/iso-images/CentOS-7-x86_64-DVD-7.9.2009.iso'/>
<target dev='hda' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdb' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
Restart the guest:
virsh start <guest-name>
Verify that the memory change took:
virsh dominfo <guest-name>