일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- PlayBook
- 보안양파
- docker
- Kibana server is not ready yet
- macos
- miniconda
- xe guest utilities
- freebsd
- x-pack
- XCP-ng
- GitLab
- elastic stack
- Elasticsearch
- bash
- endpoint security
- hardening
- 한글가이드
- pfsense
- ssh key 배포
- application security
- Kibana
- Windows
- 로그인불가
- ansible
- ELASTIC
- Proxy
- proxycfg
- G-suite
- centos 8
- Today
- Total
선 밖에 선 자유인
vm image -> Xen or OracleVM 본문
존에 VMware 상에서 운영하던 VM(Virtual Machine) guest image를,
xen 기반(Oracle VM을 포함한...)의 가상화 플랫폼에서 사용할 수 있도록 convert 하는 방법이다.
1. 여러개로 나뉘어진 파일을 한개로 합하기. (create a single, growable virtual disk (type 0))
[root@sdyang LOBI.5.0.01]# ls
LOBI.5.0.01.nvram LOBI.5.0.01-s008.vmdk LOBI.5.0.01.vmx
LOBI.5.0.01-s001.vmdk LOBI.5.0.01-s009.vmdk LOBI.5.0.01.vmxf
LOBI.5.0.01-s002.vmdk LOBI.5.0.01-s010.vmdk vmware-0.log
LOBI.5.0.01-s003.vmdk LOBI.5.0.01-s011.vmdk vmware-1.log
LOBI.5.0.01-s004.vmdk LOBI.5.0.01-s012.vmdk vmware-2.log
LOBI.5.0.01-s005.vmdk LOBI.5.0.01-s013.vmdk vmware.log
LOBI.5.0.01-s006.vmdk LOBI.5.0.01.vmdk
LOBI.5.0.01-s007.vmdk LOBI.5.0.01.vmsd
[root@sdyang LOBI.5.0.01]# time vmware-vdiskmanager -r LOBI.5.0.01.vmdk -t 0 V2V_LOBI.5.0.01.vmdk
Using log file /tmp/vmware-root/vdiskmanager.log
Creating a monolithic growable disk 'V2V_LOBI.5.0.01.vmdk'
Convert: 100% done.
Virtual disk conversion successful.
real 8m3.429s
user 0m2.014s
sys 0m36.017s
[root@sdyang LOBI.5.0.01]# ls -la V2V*
-rw------- 1 root root 7120158720 2008-07-28 11:41 V2V_LOBI.5.0.01.vmdk
2. Oracle VM Server로 copy 하기..
[root@sd-ovmhost2 ~]# mkdir /OVS/running_pool/V2V_LOBI
[root@sdyang LOBI.5.0.01]# scp V2V_LOBI.5.0.01.vmdk root@sd-ovmhost2:/OVS/runnin_pool/V2V_LOBI/
The authenticity of host 'sd-ovmhost2 (10.179.110.61)' can't be established.
RSA key fingerprint is 67:e0:e3:e2:e5:2b:ff:4f:45:08:7a:ff:4d:c9:62:5f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'sd-ovmhost2,10.179.110.61' (RSA) to the list of known hosts.
root@sd-ovmhost2's password:
V2V_LOBI.5.0.01.vmdk 100% 6790MB 9.2MB/s 12:19
3. VMware single disk를 qemu-img를 이용하여 raw image로 변환하기.
[root@sd-ovmhost2 V2V_LOBI]# qemu-img convert -f vmdk V2V_LOBI.5.0.01.vmdk -O raw V2V_LOBI.5.0.01.img
4. Virtual Machine config file 만들기
[root@sd-ovmhost2 V2V_LOBI]# cat vm.cfg
acpi = 1
apic = 1
builder = 'hvm'
device_model = '/usr/lib/xen/bin/qemu-dm'
disk = ['file:/OVS/running_pool/V2V_LOBI/V2V_LOBI.5.0.01.img,hda,w',
',hdc:cdrom,r',
]
kernel = '/usr/lib/xen/boot/hvmloader'
memory = '384'
name = 'V2V_LOBI'
on_crash = 'restart'
on_poweroff = 'destroy'
on_reboot = 'restart'
pae = 1
serial = 'pty'
vcpus = 2
vif = ['bridge=xenbr1,mac=00:16:3E:5B:12:59,type=ioemu']
vnc = 1
vncconsole = 1
vnclisten = '0.0.0.0'
vncpasswd = 'oracle'
vncunused = 1
5. start 하기
[root@sd-ovmhost2 V2V_LOBI]# xm creat vm.cfg
[root@sd-ovmhost2 V2V_LOBI]# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 582 2 r----- 27433.5
V2V_LOBI 21 384 2 -b---- 27.7
OVM Manager에서 관리하기 위해서는,
OVM Manager 접속해서, Resources -> Virtual Machine Images -> Import 해서 사용하면 된다.
VMware 와 OVM 사이의 몇가지 차이점으로 인해 첫번째 부팅시 설정을 해야 하는 경우가 있다.
특히 X-Windows를 사용함에 있어서 VGA Card Model의 변경으로 인해서,
runlevel 5로 부팅시 오류가 날 수 있다. 물론 system-config-display로 해결가능하다..