mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-04-25 07:25:53 +03:00
[GH-ISSUE #235] Edit default XML files #154
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/webvirtcloud#154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @4920441 on GitHub (Apr 18, 2019).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/235
Hi,
I have to workaround this bug:
https://bugs.archlinux.org/task/60566
with my Opteron 6276...
Do I have to directly edit this file to accomplish that?
create/templates/create_instance.html
For testing purposes, I changed it directly in a generated instances xml file and after that it works fine, but I'd like to have it as default as well.
Thanks a lot!
@catborise commented on GitHub (Apr 19, 2019):
hi,
in the vrtManager/create.py file, you could change the function;
def create_instance(self, name, memory, vcpu, host_model, uuid, images, cache_mode, networks, virtio, listen_addr, nwfilter=None,.....line:
if host_model: xml += """<cpu mode='host-model'/>""" ->>>>>> you change as you want the generated xml.@4920441 commented on GitHub (Apr 19, 2019):
Hmm... works partially...:
Despite I put in create.py:
xml += """<cpu mode='custom' match='exact' check='partial'/><model fallback='allow'>Opteron_G4</model>""" xml += """<os> <type arch='%s'>%s</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/>I get in the generated .XML:
</features> <cpu mode='custom' match='exact'> <model fallback='forbid'>Opteron_G4</model> <vendor>AMD</vendor>Seems check='partial' and model fallback='allow' are defined somewhere else as well?
Cheers,
P.S.:
The Instance where I manually edited the xml file to test the workaround is working also was reset to the defaults....
<cpu mode='custom' match='exact'> <model fallback='forbid'>Opteron_G4</model> </cpu>:-(
@catborise commented on GitHub (Apr 19, 2019):
no it is not defined in webvirtcloud. Libvirt fills its defaults if there is some xml glitch.
i think you change it not right way. you should check this
https://libvirt.org/formatdomain.html#elementsCPU
you must not close cpu tag before its properties set
<cpu mode='custom' match='exact'><model fallback='allow'>Opteron_G4</model></cpu>@4920441 commented on GitHub (Apr 20, 2019):
Hmm... one (or two) caveat(s), whatsoever...:
If I use WebVirtCloud via ssh connections to manage several servers I HAVE to create the instance on the opteron 6276 server first, because, anywhere else created, it won't boot there...
The next thing which would be problematic (did not test yet because of lacking shared storage in my test setup) I think is migrating the vm from the Opteron 6276 Server to a Xeon E3/E5 Server and vice versa... if the Flags are ignored migrating from AMD to Intel should work, but not the other way round.
Still, could be worse:-) I am more happy with WebVirtCloud than with ESXi 6.5/6.7 so far:-)))
@catborise commented on GitHub (Apr 20, 2019):
I have also opteron cpus. I have not get any problem so far. I did not understand the root cause. What is host os. Libvirt version? Qemu version?
Migration from different architectures always problematic even on esxi. I also do not test it but i do not have hope for that :)
I could install a test system with opteron cpus.
@4920441 commented on GitHub (Apr 22, 2019):
Hi catborise,
The host OS Ist debian Linux 9 with the official qemu + libvirt debs from the repository:
qemu-x86_64 -version
qemu-x86_64 version 2.8.1(Debian 1:2.8+dfsg-6+deb9u5)
Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers
libvirtd -V
libvirtd (libvirt) 3.0.0
I don't know what the root cause ist... until a couple of days ago, there was virtualbox installed on the system, but it is gone, so are the kernel modules and all other stuff... so that should not be the problem.
Using the Kernel from the Backports Reps...:
Linux nux 4.19.0-0.bpo.4-amd64 #1 SMP Debian 4.19.28-2~bpo9+1 (2019-03-27) x86_64 GNU/Linux
The mainboard is a Supermicro H8SGL with 'latest' Bios (which is already 2016 or so I think...)
Processor is a 2nd generation G34 Opteron 6276
As mentioned, before migrating that machine, I testet it on several i3-3220, Intel Xeon E3-12xx and a rather old Xeon L3426 and never got any glitches with qemu...
`
processor : 15
vendor_id : AuthenticAMD
cpu family : 21
model : 1
model name : AMD Opteron(TM) Processor 6276
stepping : 2
microcode : 0x600063d
cpu MHz : 1754.900
cache size : 2048 KB
physical id : 0
siblings : 16
core id : 7
cpu cores : 8
apicid : 47
initial apicid : 15
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 nodeid_msr topoext perfctr_core perfctr_nb cpb hw_pstate ssbd vmmcall arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
bugs : fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4599.93
TLB size : 1536 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb
@catborise commented on GitHub (Apr 24, 2019):
i prepare new environment, host OS: centos 7.6 :
hypervisor host ---> lscpu
second test:
i will try that test with host OS debian also.
@catborise commented on GitHub (Apr 25, 2019):
i prepare new environment, host OS: Debian 9.8 :
i cannot reproduce your problem. I do not know what is the difference.
i think the bug you specified is special to you.
sorry
have a nice day
@4920441 commented on GitHub (Apr 25, 2019):
Hi,
thanks for testing,
but maybe its because of your G3 Opteron.
I got a G4 one (6276) and the only other incident mentioned in the link in the first post got a G5 Opteron (I assume 63xx)...
whatever:-) I think this problem is more related to the underlying livirt configuration than webvirtcloud.
As long as webvirtcloud does not mess with the libvirt default xml config, it should be doable, I think.
Cheers,
4920441