The necessary items
We need to know this iso virtual machine belongs to which CNA node, the iso virtual machine’s ID (such as: i-36CB0877).
1. Through the UltraISO, encapsulate the software which needed to copy to the iso virtual machine as to the iso format on our own computer, such as nominating it as “PVdriver.iso”. Take notes, we need to check the properties while making the mirror image, set as the following picture:
2. Login in the CNA node where the iso virtual machine is through Putty, and execute the command “xm list”, view the virtual information on this CNA node, confirm the iso virtual machine is on this CNA node.
3. Login in this CNA node via the WinSCP software, upload the iso file encapsulated by the UltraISO software just now to a catalog of the CNA node, such as “/opt/tmp1/”.
4. Login in the CNA node via Putty, enter in the “/opt/tmp1/” catalog, and then execute the “ll” command, confirm this file has uploaded to this catalog.
5. In the “/opt/tmp1/” catalog, execute the “touch PVdriver.xml” command and create a new xml file.
6. Execute “vi PVdriver.xml” command, modify this file, save and then quit, the modified content of the xml is as followed:
<disk type="file" device="cdrom">
<driver name="file" />
<source file="/opt/tmp1/PVdriver.iso" />
<target dev="xvdd" bus="xen" />
Remarks: the route which the “source file” showing is the location where the mounting file is in the CNA node, if some other files want to mount, just modify here, the former steps are the same.
7. Execute “virsh attach-device i-36CB0877 PVdriver.xml”, then we have mounted the encapsulated iso file to the cdrom of the iso virtual machine.
8. Login in the virtual machine, and login in the iso virtual machine via vnc, we can open the software in the cdrom of the iso virtual machine.
The following picture is the actual effect picture: