No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

How to mount the software to the iso virtual machine via modifying the xml file

Publication Date:  2012-11-16 Views:  51 Downloads:  0
Issue Description
In the version of SingleCLOUD R2C00, make virtual machine mirror image need to create iso virtual machine firstly, and then install the needed software in the iso virtual machine, and finally export the common mirror image via exporting the iso virtual machine. Sometimes, a part of the needed software hasn’t been packed in the iso mirror image after we have completed the mirror image, and causes the created mirror image doesn’t meet the requirement. Therefore, we should repeat the above operations: pack the new added software into the original iso mirror image, create the iso virtual machine, and then export the mirror image. This method takes much time and effort, another is as following: modify the “xml” file of the iso virtual machine directly, mount the needed software to the iso virtual machine, and then enter in the iso virtual machine to install the software, and finally export the mirror image, this method has omitted the process of creating the iso virtual machine for twice.

Alarm Information
None
Handling Process
The necessary items
Prerequisite
We need to know this iso virtual machine belongs to which CNA node, the iso virtual machine’s ID (such as: i-36CB0877).
Software
• UltraISO
• WinSCP
• Putty
Implementation steps:
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" />
            <readonly />
          </disk>
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:







Root Cause
The iso virtual machine can’t make communication in the version of SingleCLOUD R2C00, once a software hasn’t been encapsulated in the mirror image while making mirror image, we need to recreate the iso virtual, modify the virtual machine’s xml file via the low layer, attaché the new xml file to the virtual machine, and then we can actualize mounting the new file.

Suggestions
None

END