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.