How to Export a Virtual Machine to an External USB Drive
This article describes how to export a XenServer Virtual
Machine (VM) to a USB storage device. You must use the Command Line Interface
(CLI), instead of the XenCenter.
Procedure
1. Use the fdisk -l command to determine
what device file to use for the USB mass storage device. In the following
screen shot, the device file is “/dev/sdb1”.
2. Create a subdirectory called “usb”, using the following
command.\:
mkdir /mnt/usb
mkdir /mnt/usb
3. Mount the device file from step 1 by using the following
command:
mount /dev/sdb1 /mnt/usb
mount /dev/sdb1 /mnt/usb
Note: You might have to format the mass storage
device before you mount it. If so, use the following command:
mkfs –t ext3 /dev/sdb1
4. Export a VM using the XAPI with the following command:
xe vm-export vm=<Name of VM> filename=<Name of file ending in “.xva”>
xe vm-export vm=<Name of VM> filename=<Name of file ending in “.xva”>
Note: Although the filename extension is not needed
in Linux, it is helpful to identify the file on a Windows based file system, or
if later importing the file from a Windows file system using the XenCenter.
5. To see the file and its size, use the following command:
ls –l
ls –l
6. Unmount the USB drive using the following command:
umount /mnt/usb
umount /mnt/usb
ไม่มีความคิดเห็น:
แสดงความคิดเห็น