---
tags:
- Arch Linux
- Linux
---
# Moving existing Arch Linux installation to VMWare
!!! warning "文档时效性说明"
本文为早期笔记,可能存在版本过时、命令失效、链接失效、最佳实践变化等问题。请以官方最新文档为准。
## Step 1: Copy files
mount an external drive, formatted in ext4 (this is important, cause other file system format such as ntfs cannot preserve file permissions). `cd` into the drive and use `rsync` to copy all files on the existing system to external drive, preserving file permission, ACL, and all attributes.
```bash
sudo rsync -aAXH --progress --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / .
Start VM, boot with archlinux live iso, use fstab to create partition table for /dev/sda in the VM, making file system with mkfs.ext4, then mount /dev/sda1 to /mnt or somewhere.
Then plug in the external drive and mount /dev/sdb1 to /old or somewhere. Use rsync to copy all files back.