[Manager] Virsh command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.