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 make the volume of the virtual machine dd to the local hard disk of the node

Publication Date:  2012-12-13 Views:  51 Downloads:  0
Issue Description
Q:
While we dealing with the failures, sometimes we need to make a backup of the virtual machine’s system volume or user volume so that we can take deep analysis, how to dd the virtual machine’s volume to the CAN local hard disk?

Alarm Information
None
Handling Process
A:
1. Login the CAN node via the putty, execute the command “xm list” to view the virtual machine’s name.
2. Execute the command “virsh dumpxml vmid <the virtual machine ID>” to view the volume corresponding with the virtual machine, the red tag (1) is the system volume, and the red tag (2) is the user volume:


3. Execute the command “fdisk -l /dev/mapper/i-584709BD-root” to query the capacity of the volume
4. Execute the “df” command to query the remaining space of the CAN disk, the value in the available segment denotes the usable space of the current usr disk (take the usr as an example). In the precondition that the remaining space of the disk queried by executing the “df” command is bigger than the virtual machine’s system volume, we can implement the following dd operation. For the user volume, the corresponding operation is similar.


5. Execute the command “virsh suspend i-584709bd”, and suspend the virtual machine so that the virtual machine doesn’t implement the io operation. While it has suspended, the user can’t use the virtual machine.
6. Execute the following command, dd the system volume and user volume of the virtual machine to the “/usr” catalog of the CAN local hard disk.
dd if=/dev/mapper/vol-584709BD-root of=/usr/img
dd if=/dev/mapper/vol-377c0727-user of=/usr/user
7. After finishing to the dd operation, execute “virsh resume i-584709bd” to revive the virtual machine.



Root Cause
None
Suggestions
1. This operation will take great influence on the performance of the CAN node, make sure to implement it without any important service is on.
2. While implementing these operations, we suggest you not implementing any management operation, especially not creating virtual machine in this node.

END