|
|
[root@compute03 ~]# qemu-img create /var/lib/libvirt/images/uniontechos2.raw +4G
7 y1 m, w C2 G/ uFormatting '/var/lib/libvirt/images/uniontechos2.raw', fmt=raw size=4294967296- d0 ^1 F* i4 V4 m
[root@compute03 ~]# vim Uniontechos.xml
( g7 Z. O* _' E0 \& o2 ]+ v! ~[root@compute03 ~]# virsh define Uniontechos.xml 2 z5 s* P0 \2 B
error: Failed to define domain from Uniontechos.xml
& m( ]" B6 E7 E9 D5 t4 ierror: XML error: unable to parse mac address ''
- A! c$ k6 n7 Q) r; ?1 M; L& _5 Q: r9 r
[root@compute03 ~]# vim Uniontechos.xml ( z! y5 B8 B& Y0 p, u) s0 `
[root@compute03 ~]# virsh define Uniontechos.xml : ?& G( @7 E# p/ _8 v
error: Failed to define domain from Uniontechos.xml& {! X% r4 s. N* K; [
error: (domain_definition):72: AttValue: " or ' expected
# l5 U! a; s( P# l <mac address=/>$ s0 D9 g' E3 Y: E q7 t
-------------------^
8 G! d" n8 g7 ^0 ?* C9 f; G
" V- H2 A1 b+ O0 J3 p* ?[root@compute03 ~]# vim Uniontechos.xml 6 ?4 N j3 A) e5 c! X! b9 i
[root@compute03 ~]# virsh define Uniontechos.xml
5 P8 {2 m3 D2 r* j; |8 Kerror: Failed to define domain from Uniontechos.xml! [) S7 p t' v1 v
error: XML error: unable to parse mac address ' '+ _4 `! z' \+ m5 U1 Q
# i5 k5 g7 q# i8 |' ^; P[root@compute03 ~]# vim Uniontechos.xml
/ ~1 a- _/ N7 R- T9 J[root@compute03 ~]# virsh define Uniontechos.xml " u) k5 o1 k N* T4 o! {
error: Failed to define domain from Uniontechos.xml4 w( @$ \% v2 D' Q$ B
error: XML error: unable to parse mac address ''$ p5 s! ~1 [" r) H) t2 A2 _ ?! M
1 o: [6 Y) A+ j {$ i, H, g
[root@compute03 ~]# vim Uniontechos.xml
$ i5 W/ J* s# Q- \0 ^, w7 W[root@compute03 ~]# virsh define Uniontechos.xml
' G, q; H% A, o t7 q" g2 ^error: Failed to define domain from Uniontechos.xml
# d4 _- m5 T1 }: Cerror: XML error: unable to parse mac address ''
$ s$ c7 }; l9 i7 }; H! P3 A8 ~! \! h, f, m, Q# A( j% ~
[root@compute03 ~]# vim Uniontechos.xml
9 C$ V- Q" p0 y6 ~9 T4 i* N[root@compute03 ~]# virsh define Uniontechos.xml ' D2 k k7 S5 U) W0 @
Domain Uniontechos2 defined from Uniontechos.xml
& j0 I& t; g" l. s8 o
6 R: Q2 {+ _* D2 Y4 }[root@compute03 ~]# 2 |' y3 o4 r3 {7 |; L* V7 C
0 q1 S3 m3 k$ r1 b* R9 q- J( U
/ f; I/ B8 H/ z3 }3 [8 U8 r
: K, t9 {: A3 Y: s- b( s ^[root@compute03 ~]# cat Uniontechos.xml
1 x b1 v& R3 H& ?$ T6 O<domain type='kvm'>! M: T0 h& |5 d$ s5 f4 Q
<name>Uniontechos2</name>
1 }' B, a O; f: A0 G# I/ E- W' _ <uuid></uuid>. P9 s7 ]- Y: A2 G( l! t6 I# s/ ]
<memory unit='KiB'>8388608</memory>
# w1 e9 v1 |3 L2 U <currentMemory unit='KiB'>8388608</currentMemory>0 ?# e: X* w3 f& K
<vcpu placement='static'>4</vcpu>, W( @# J1 k# Z/ Z8 k4 S5 m
<os>
% G1 v: D/ \6 a( n3 ?" j <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>8 W* t. B8 l; J& w0 B4 N
<bootmenu enable='yes'/>
: x+ j P* I. V4 a1 E: u </os># q' \+ m! E& R- s3 x% i
<features>) l8 g6 S/ v+ h. u* _/ `
<acpi/>8 o7 v6 R5 T9 Y3 m8 f$ a
<apic/>
?. i8 s- G5 ~( j& f1 N- [5 ^! P </features>7 z2 o- Q, e6 l* m
<cpu mode='custom' match='exact' check='partial'>" [/ g$ M9 e# ?! H' ?0 T
<model fallback='allow'>IvyBridge-IBRS</model>2 n" l' p/ z) A6 `% `* Z0 Y j$ L
<feature policy='require' name='md-clear'/>
: W, _0 t& _) v( p& `- A8 L <feature policy='require' name='spec-ctrl'/>' s' ^- X$ l. M6 A. ~2 ~
<feature policy='require' name='ssbd'/>
3 y: Z% J3 h2 A+ E9 z9 N3 _1 y </cpu>. F, X7 [+ ?; v; |1 f F0 W
<clock offset='utc'>
" @7 ]0 q |- |2 R- D+ s1 O <timer name='rtc' tickpolicy='catchup'/>" I, g, d, t8 C3 {# `$ q: W/ T
<timer name='pit' tickpolicy='delay'/>2 s; J4 P/ z5 w& o: b
<timer name='hpet' present='no'/>
" u# w% q: ~" V: e8 _ </clock>' l4 F- x5 d( @3 t# |
<on_poweroff>destroy</on_poweroff>
8 |$ R7 O3 [. d+ Q- a <on_reboot>restart</on_reboot>
7 ~ Z: f; e- g <on_crash>destroy</on_crash>
0 l0 r/ z6 e) y: x+ l; A <pm>: I6 ] h$ _" @% M: Q7 s! U2 A
<suspend-to-mem enabled='no'/>
: m1 n- L t; L7 V' l <suspend-to-disk enabled='no'/>9 h8 D9 O2 } Z0 v1 Q3 i
</pm>+ a, H- c& |9 o9 y" ]2 z
<devices>
8 p* G `( i7 W) G6 E <emulator>/usr/libexec/qemu-kvm</emulator>$ M' x& E4 j. @
<disk type='file' device='disk'>
" o L& e" q/ M( M9 b7 m6 R# L <driver name='qemu' type='raw'/>9 X6 R! i7 t8 M# V) {+ B& t
<source file='/var/lib/libvirt/images/uniontechos2.raw'/>
- U( t) x$ M+ S3 z3 o/ |" h; t <target dev='vda' bus='virtio'/>6 c: i) |' _0 v, D/ N1 V
<boot order='1'/># ~# ]/ C( h. i' |
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>. V2 I) j9 @5 l8 s% n8 T2 n* B
</disk>
) B- r u) k, d* S7 j <disk type='file' device='cdrom'>1 M# y' m, n$ C0 p$ r% `3 x: @
<driver name='qemu' type='raw'/>6 r3 E! W$ t2 d
<source file='/var/lib/libvirt/images/uniontechos-server-20-1050a-amd64.iso'/> i3 R6 G: [1 C! ]
<target dev='hda' bus='ide'/>
& a; X& q9 g1 i2 W2 m9 m& P <readonly/>
+ p X1 G. H& n <address type='drive' controller='0' bus='0' target='0' unit='0'/>
4 ^- S7 p* a: J2 e0 z, C) F' z, `2 P </disk>1 k& `( g# \( h) Q" ]& D
<controller type='usb' index='0' model='ich9-ehci1'>
# S2 v. X/ A2 ^/ b( G5 l4 V <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>5 e. ] F) v- a0 Y
</controller>3 I0 W4 s! O% F
<controller type='usb' index='0' model='ich9-uhci1'>
4 F, U5 q/ J8 H, o <master startport='0'/> c/ P- j9 w# S5 r' \2 I- P/ Q
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>/ p! X0 V, U- e2 V
</controller>
- C; g& L6 M% ^0 w* N5 s <controller type='usb' index='0' model='ich9-uhci2'>! t5 k7 d0 | Z" i
<master startport='2'/>
: q4 p) X0 L& [) s' _+ d! `1 O <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>1 \& U+ _8 O# @5 _
</controller>
- `2 c6 l$ X2 L+ H Q0 S <controller type='usb' index='0' model='ich9-uhci3'>' h) J: ~% }! S7 }: H, \2 }; @* M& F' m
<master startport='4'/>
' J$ N0 |, {4 F0 r& @, L& P1 }9 u <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
" b3 e4 J. J4 S0 |$ u! u </controller>: b. G6 w5 ]' B
<controller type='pci' index='0' model='pci-root'/>$ p+ Z- @. Q* M/ A: l) f2 v: p
<controller type='ide' index='0'>
: Y0 r. o# r/ E2 Q6 z7 s <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
, J+ N$ p) ?4 _5 J* v" Z </controller>% l9 q' N) H+ J
<controller type='virtio-serial' index='0'>) Q; M2 R: C2 y% ^9 b
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
/ [( h' F8 A5 A0 _7 n% T </controller>
( G9 y# C* H1 ^+ }' D# o0 n <interface type='bridge'>
, Q& q0 t2 ?% X3 c$ u <source bridge='br0'/>
# }7 d7 a9 k7 v! U$ z* U& I) ^- q <model type='virtio'/>
p8 H! r+ v* } <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
C: o2 ~8 m" w. E5 s </interface>2 o3 o" A) m. N; y. T: H3 k
<serial type='pty'>" v b7 ^, ~. b- \5 S8 M) u( j) r
<target type='isa-serial' port='0'>
7 l1 D4 d8 i7 X$ b <model name='isa-serial'/># e0 }* W) c* v$ ]
</target>
/ b5 ^3 l1 f/ R+ m0 F- s( ? </serial>: z7 ^+ L; ~. U& m$ {
<console type='pty'>
$ W0 ^0 p# D1 K <target type='serial' port='0'/>
! ?' S0 L9 z" L3 }; x) J </console>) C a3 O& P- F/ [8 p- {7 O
<channel type='unix'>
; ~; X2 L8 V8 k& h- u2 r- u1 T <target type='virtio' name='org.qemu.guest_agent.0'/>
0 B/ s: Q$ ~% y- S <address type='virtio-serial' controller='0' bus='0' port='1'/>4 }/ }5 a- L' b# b5 [' ]1 K8 p
</channel>
5 b7 d* S1 s. d8 a; y8 u <input type='mouse' bus='ps2'/>
) Z/ f7 |0 o( i; h4 q/ \/ B <input type='keyboard' bus='ps2'/>
& g0 |' l; T4 F% ~0 n6 E <graphics type='vnc' port='5960' autoport='no' listen='0.0.0.0'>0 i0 ~) H' L/ }0 R
<listen type='address' address='0.0.0.0'/>
5 _. n5 f( Y. u: F7 K4 V </graphics>$ H. Z/ @8 X) i! ]6 B3 k
<video>
3 {+ |4 _0 r7 A+ ?9 @+ Y- t' C <model type='cirrus' vram='16384' heads='1' primary='yes'/>2 b& ?1 }! k# X, |- o
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>4 v* t1 U" D$ E) o' d
</video>
4 e9 ]. ]) P3 w' z* I. V$ } <memballoon model='virtio'>: k$ g% y9 r; C3 g# ?+ G3 D
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>6 c/ ?7 p& d* f( P; |6 a% v+ v( v5 b
</memballoon>
( {: X. L$ A" `8 f) w8 Z4 H </devices>* }" B1 z K% {. y
</domain>
" A! u; F4 l- k% H3 N, \! N; h; a4 `; }+ e9 R" |
|
|