Hyper-V 이런 저런 테스트를 하다보면 백업본을 복원하는 경우가 많은데 Powershell 을 이용하면 쉽고 빠르게 VM 복원이 가능하다.
Hyper-V 백업
Powershell 로 E:\Hyper-V\RedisCluster01 ~ E:\Hyper-V\RedisCluster06 으로 복원한다.
Import-VM -Path 'E:\Hyper-V Backup\Ubuntu22\Virtual Machines\3C3B46B0-F4B4-46FE-B13C-0B401A735DA9.vmcx' -Copy -GenerateNewId -VhdDestinationPath 'E:\Hyper-V\RedisCluster01' -VirtualMachinePath 'E:\Hyper-V\RedisCluster01'
Rename-VM "Ubuntu22" -NewName "RedisCluster01"
Import-VM -Path 'E:\Hyper-V Backup\Ubuntu22\Virtual Machines\3C3B46B0-F4B4-46FE-B13C-0B401A735DA9.vmcx' -Copy -GenerateNewId -VhdDestinationPath 'E:\Hyper-V\RedisCluster02' -VirtualMachinePath 'E:\Hyper-V\RedisCluster02'
Rename-VM "Ubuntu22" -NewName "RedisCluster02"
Import-VM -Path 'E:\Hyper-V Backup\Ubuntu22\Virtual Machines\3C3B46B0-F4B4-46FE-B13C-0B401A735DA9.vmcx' -Copy -GenerateNewId -VhdDestinationPath 'E:\Hyper-V\RedisCluster03' -VirtualMachinePath 'E:\Hyper-V\RedisCluster03'
Rename-VM "Ubuntu22" -NewName "RedisCluster03"
Import-VM -Path 'E:\Hyper-V Backup\Ubuntu22\Virtual Machines\3C3B46B0-F4B4-46FE-B13C-0B401A735DA9.vmcx' -Copy -GenerateNewId -VhdDestinationPath 'E:\Hyper-V\RedisCluster04' -VirtualMachinePath 'E:\Hyper-V\RedisCluster04'
Rename-VM "Ubuntu22" -NewName "RedisCluster04"
Import-VM -Path 'E:\Hyper-V Backup\Ubuntu22\Virtual Machines\3C3B46B0-F4B4-46FE-B13C-0B401A735DA9.vmcx' -Copy -GenerateNewId -VhdDestinationPath 'E:\Hyper-V\RedisCluster05' -VirtualMachinePath 'E:\Hyper-V\RedisCluster05'
Rename-VM "Ubuntu22" -NewName "RedisCluster05"
Import-VM -Path 'E:\Hyper-V Backup\Ubuntu22\Virtual Machines\3C3B46B0-F4B4-46FE-B13C-0B401A735DA9.vmcx' -Copy -GenerateNewId -VhdDestinationPath 'E:\Hyper-V\RedisCluster06' -VirtualMachinePath 'E:\Hyper-V\RedisCluster06'
Rename-VM "Ubuntu22" -NewName "RedisCluster06"
'Dev' 카테고리의 다른 글
Hyper-v VM 가져오기 (복사) (0) | 2024.11.21 |
---|---|
WSL2 postman 설치 (0) | 2023.07.01 |
Vue 컨포넌트 - 데이터 바인딩 (2) (0) | 2023.07.01 |
Vue 컨포넌트 - 데이터 바인딩 (1) (0) | 2023.06.27 |
Vue 컴포넌트 (0) | 2023.06.26 |