|
|
找到对应的卷:# p, H" o: F- f: U
[root@compute05 ~]# rbd ls -p hdd-volumes |grep 45c2ff86-644d-4a7e-a9a8-e2d2b882cc2b; @4 [* ~! C* T
volume-45c2ff86-644d-4a7e-a9a8-e2d2b882cc2b" v9 ^3 R. e* [
T7 G7 k8 }) I# t, r& Q W {export export-diff
; @; T/ m% c- O. N! X: v* _[root@compute05 ~]# rbd export hdd-volumes/volume-45c2ff86-644d-4a7e-a9a8-e2d2b882cc2b windows2019.raw
" W- R0 ?) F3 WExporting image: 100% complete...done.5 J5 m& F% \1 ?" p- ]/ J
[root@compute05 ~]# ls
! F; e' H/ j" G- y3 _. ^1 Y5 F
9 H. u9 D5 k) S: |% m, P* y* i windows2019.raw- f4 L2 g: b6 s4 V+ q$ l* g
[root@compute05 ~]# scp windows2019.raw 192.168.10.43:/kvm
/ {8 J4 m. s; \; u2 B9 q( M5 n, YThe authenticity of host '192.168.10.43 (192.168.10.43)' can't be established. g; A3 y, B6 V
ECDSA key fingerprint is SHA256:cv23P6291ltGHfoUgYqs3vLkLyWOJySxy81kFdOIRHw.
- I$ F1 @% o2 z% x( ^1 N( qECDSA key fingerprint is MD5:b0:51:06:9f:a4:80:0e:a9:c1:15:25:c8:45:33:b7:4b.
, {! [8 b' v2 c/ h2 xAre you sure you want to continue connecting (yes/no)? yes& |8 v- B: T- o$ t2 X# q* j
Warning: Permanently added '192.168.10.43' (ECDSA) to the list of known hosts.3 F! U1 o& ]) E0 r
2 K b/ ^ `% z- q" D% ?+ m4 G" |4 t, BAuthorized users only. All activities may be monitored and reported.
8 X8 O% K3 @+ j! j0 Y" jroot@192.168.10.43's password:
# t. c5 g3 S6 S' G, N5 K iwindows2019.raw 100% 50GB 109.9MB/s 07:46
* e$ U$ W9 y6 m7 g* O' B) T4 [& Z5 J4 _1 Z3 r
启动虚机:: B( E/ e! c1 O. @) X, j2 r
virt-install --name vpnserver-windows2019 --ram 16384 --vcpus=6 --disk path=/kvm2/windows2019.raw,bus=ide,format=raw --vnc --vncport=5916 --vnclisten=0.0.0.0 --network=bridge:br0 --force --import --autostart --noautoconsole 2 E' j& H x* p/ o( W0 _
编辑虚机:
0 N" F! X3 e# |4 C- q[root@xa-radb-03 ~]# virsh edit vpnserver-windows2019
- |% x4 ]( b; M/ q( c. d6 V5 V8 rDomain vpnserver-windows2019 XML configuration edited.. @! a! I, P# Y" e6 {) O
- p- V- Q: J( z( I- O如果要修改mac地址:- ~" I& ~$ d( L7 V5 g9 u
找到mac 项,改成需要的mac地址,重启虚机即可
0 C: L5 O- w% a
+ w5 D3 n8 G5 ]" [: i$ f9 Z' ^% S[root@xa-radb-03 ~]# virsh destroy vpnserver-windows2019
1 S- Y N0 F" g' N9 I A; B( KDomain vpnserver-windows2019 destroyed
; a- Q% G: I# S- ?8 N& c8 J
% L' J9 r+ Z `; z# y" J# S9 D[root@xa-radb-03 ~]# virsh start vpnserver-windows2019 : x; m! G$ J" q2 N2 k' v
Domain vpnserver-windows2019 started
d: f# N* v5 f* @6 J$ v. U3 P' \! Q. M l7 J/ q: p! G
[root@xa-radb-03 ~]# virsh domiflist vpnserver-windows2019
$ U- m0 X4 K% f Interface Type Source Model MAC" f) \7 ~) \; {; _8 P
----------------------------------------------------------( E" T7 I! O( C- v" M# x4 n9 X
vnet18 bridge br0 e1000 60:f6:77:4b:ea:f1% ?4 h0 Z8 Y( n3 l
! J3 q( [- n# }! }2 y
|
|