|
@@ -36,9 +36,10 @@ class GuestXML(object):
|
|
|
{5}
|
|
{5}
|
|
|
{6}
|
|
{6}
|
|
|
{7}
|
|
{7}
|
|
|
|
|
+ {8}
|
|
|
</domain>
|
|
</domain>
|
|
|
- """.format(self.get_features(), self.get_clock(), self.get_name(), self.get_uuid(), self.get_vcpu(),
|
|
|
|
|
- self.get_memory(), self.get_os(), self.get_devices())
|
|
|
|
|
|
|
+ """.format(self.get_features(), self.get_cpu_mode(), self.get_clock(), self.get_name(), self.get_uuid(),
|
|
|
|
|
+ self.get_vcpu(), self.get_memory(), self.get_os(), self.get_devices())
|
|
|
|
|
|
|
|
@staticmethod
|
|
@staticmethod
|
|
|
def get_features():
|
|
def get_features():
|
|
@@ -49,6 +50,10 @@ class GuestXML(object):
|
|
|
</features>
|
|
</features>
|
|
|
"""
|
|
"""
|
|
|
|
|
|
|
|
|
|
+ @staticmethod
|
|
|
|
|
+ def get_cpu_mode():
|
|
|
|
|
+ return """<cpu mode='host-passthrough'/>"""
|
|
|
|
|
+
|
|
|
def get_clock(self):
|
|
def get_clock(self):
|
|
|
# clock 参考链接:https://libvirt.org/formatdomain.html#elementsTime
|
|
# clock 参考链接:https://libvirt.org/formatdomain.html#elementsTime
|
|
|
# Windows Guest 设为 localtime,非 Windows Guest 都设为 utc
|
|
# Windows Guest 设为 localtime,非 Windows Guest 都设为 utc
|