logo

Vinchin Blog

Vinchin Blog Export and import virtual machine (migration) in Xenserver 7.6 using command lines

Export and import virtual machine (migration) in Xenserver 7.6 using command lines

2021-02-10

1. Use command lines to export the virtual machine (shut down the virtual machine first)

1.1. Print virtual machine list

xe vm-list

     uuid ( RO)           : 43dfac04-515e-7769-b2d2-444d4b7cb198
     name-label ( RW): hk-zabbix-01
     power-state ( RO): halted


1.2. Check the mount disk

df -h

[root@xenserver-hk-01 ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 2.0G   44K  2.0G   1% /dev
tmpfs                       2.0G  504K  2.0G   1% /dev/shm
tmpfs                       2.0G  4.1M  2.0G   1% /run
tmpfs                       2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda1                18G  8.9G  7.9G  53% /
xenstore                   2.0G     0  2.0G   0% /var/lib/xenstored
/dev/loop0               45M   45M     0 100% /var/xen/xc-install
/dev/sda4                 512M  2.0M  510M   1% /boot/efi
/dev/sda5                 3.9G  708M  3.0G  20% /var/log
//192.168.10.10/soft    500G   49G  452G  10% /run/sr-mount/21c3c475-28c7-26b7-2abb-9bd8b011eb1e<br>192.168.10.10:/nfs/iso 18G 8.9G 7.9G 53% /run/sr-mount/a3ab3cfb-645d-54a0-9c49-9462bd66a7c3

1.3. Export the virtual machine to shared storage disk

xe vm-export vm=hk-zabbix-01 filename=/run/sr-mount/21c3c475-28c7-26b7-2abb-9bd8b011eb1e/hk-zabbix-01.xva

1.4. Import the virtual machine

xe vm-import filename=/run/sr-mount/21c3c475-28c7-26b7-2abb-9bd8b011eb1e/hk-zabbix-01.xva

There is an error because the hard disk does not create an Sr

[root@xenserver 21c3c475-28c7-26b7-2abb-9bd8b011eb1e]# xe vm-import filename=/run/sr-mount/21c3c475-28c7-26b7-2abb-9bd8b011eb1e/hk-zabbix-01.xva

Error: No SR specified and Pool default SR is null

Log in to XenCenter on the machine that can access the shared disk and use the interface to import.

  • Tag:
  • Backup

Interested Blogs More

DOWNLOAD NOW YOU CAN ENJOY A 60-DAYS FULL-FEATURED FREE TRIAL !