Part of the command to tidy up
1. Adding an ISO file to a virtual machine
1 # Virsh attach-disk virsh-vm/home/yb/visio.iso hda--type cdrom--mode readonly
Comments:
1. ' VIRSH-VM ' for the created and already running virtual machine name
2. '/home/yb/visio.iso ' for the ISO file to be added
3. ' Hda ' defines <target dev= ' hda '/> for creating a virtual machine (Virsh define) when the image file ISO is defined
4. Specify a type of CDROM
5. Specify read/write permission to ReadOnly
6. CDRom cannot perform detach-disk operation, it will prompt:
' CDROM ' cannot be detached
You can enter the virtual machine for manual pop-up, and no other appropriate method is found.
7. Create an XML reference template for ' HdX '
1 <Disktype= ' file 'Device= ' cdrom '>2 <Drivername= ' Qemu 'type= ' raw '/>3 <Sourcefile= '/home/yb/visio.iso '/>4 <TargetDev= ' HDA 'Bus= ' ide '/>5 <ReadOnly/>6 <Addresstype= ' Drive 'Controller= ' 0 'Bus= ' 0 'Target= ' 0 'Unit= ' 0 '/>7 </Disk>8 <Disktype= ' file 'Device= ' cdrom '>9 <Drivername= ' Qemu 'type= ' raw '/>Ten <TargetDev= ' HDB 'Bus= ' ide '/> One <ReadOnly/> A <Addresstype= ' Drive 'Controller= ' 0 'Bus= ' 1 'Target= ' 0 'Unit= ' 0 '/> - </Disk>
8. Create image File Reference Linux Mkisofs
[Manager] Virsh command