[SOLVED] Fragen zur VM mit Windows


moonsorrox

Recommended Posts

Ich habe mir eine Windows VM erstellt und habe dazu einige Fragen.

Mich hat gestört das noVNC keinen Sound überträgt, dieses ist für eine normale Windows VM vllt. egal, aber wenn man sich YT oder Twitch Videos anschauen ist das wohl nicht angebracht.

 

Ist es momentan die einfachste Lösung dieses über einen Windows eigenen RDP zu machen.?

Der überträgt ja meines Wissens alles an Sound, Grafik usw.

 

Ich habe die VM erstellt mit einer 2. Festplatte, da ich  dort immer meine ganzen Daten, Bilder u. Dokumente hinlege. Ich mache das zumindest auf meinen Desktop PCs so.

Ist jetzt erst einmal zum testen, ich kann es ja auch auf einer Unassigned Devices HDD ablegen, die ich mounte.

 

wie im Screenshot zu sehen habe ich die 2. Festplatte auch in der VM und den Pfad habe ich auf einem Unassigned Devices HDD gelegt der Windows 10 heißt, dass wäre das Windows Daten Laufwerk 😧

Jetzt die Frage warum sehe ich in der VM nicht wenn ich eine Datei oder Bild von meinem physischen PC auf diese Platte in der VM lege und umgekehrt auch nicht.?

Darunter auf dem Screenshot ist z.B. die gesamte Festplatte des Unraid Server zu sehen, da kann ich dann in das Verzeichnis gehen welches Windows 10 heißt und etwas rauf kopieren das sehe ich auf beiden Geräten.

Wenn das nicht geht kann ich mir die zweite Festplatte in der VM sparen.

 

Was mich jetzt noch brennend interessiert wäre eine sogenannte Kopie dieser VM, damit ich diese immer als Sicherheit habe, falls mal etwas kaputt geht. ist das irgendwie möglich.

Ich hatte ja vorher mal Virtualbox da konnte man immer eine Kopie der jeweiligen VM machen.

 

Oder kann ich das z.B. mit Duplicati machen das ich jeden Abend eine Sicherung mache.? Obwohl mir das Programm momentan noch nicht ganz so das macht was es soll.

Ordner_VM.png

Link to comment

Du könntest statt RDP auch NoMachine testen. Damit kann auch der Sound übertragen werden und die Grafik ist auch besser als mit VNC.

 

Bzgl. der 2 Festplatte:

Wie hast du sie denn eingebunden, das geht aus deiner Beschreibung nicht hervor (oder ich kapier es nicht...). 

Warum nutzt du nicht einfach ein share vom Array? 

 

Was die Sicherung angeht, such mal im CA Plugin (community applications) nach VM Backup. Das ist ein plugin mit dem vm's gesichert werden können. Hinweis: Das Plugin ist im Beta Stadium. 

Ursprung des Plugins ist ein Script das über das Plugin User.scripts eingebunden wird. 

CA: 

User.Scripts:

VM Backup:

 

Link to comment

Ich steh auch etwas am Schlauch. Mir kommt das ganze etwas kompliziert vor.

Warum nicht einfach in Unraid einen Share machen und diesen kann dein physischer PC sowie deine VM ganz normal zugreifen.

 

Persönlich bin von den getrennten Festplatten (C->Windows, D->Programme, E->Daten) schon lange wieder weg, da ich meine Daten am Server (Share) oder in Nextcloud (auch Server) liegen habe. Für PC die ich aufsetzte, bzw. zwischen temporären VMs etc. habe ich einen Share am Server der "Transfer" heißt, da darf jeder schreiben/löschen etc.

 

NoMachine schau ich mir mal an. Hört sich interessant an. Derzeit verwende ich TightVNC zum Remote Verbinden zu den Computern die ich in der Familie supporte. Dazu braucht man aber immer VPN Zugang (oder Zerotier) - Was aber in deinem Fall ja nicht nötig ist, da lokal. - Weiß nur gerade im Moment nicht
ob der Sound überträgt.

Link to comment
16 minutes ago, Morrtin said:

Persönlich bin von den getrennten Festplatten (C->Windows, D->Programme, E->Daten) schon lange wieder weg

Jep, ist heutzutage eigentlich generell eher unüblich.

@Moonsorrox, bitte poste doch mal deine Konfiguration der VM bzw der shares/Festplatte wie du sie eingerichtet hast. 

16 minutes ago, Morrtin said:

Derzeit verwende ich TightVNC zum Remote Verbinden zu den Computern die ich in der Familie supporte. 

OK, etwas off topic... Aber dafür verwende ich mittlerweile Anydesk seitdem mir teamviewer kommerzielle Nutzung vorgeworfen hat, als ich im März (Pandemie!!!) öfter meiner Mutter remote geholfen habe. Auch das ausfüllen des entsprechenden Formulars in dem man bestätigt teamviewer nicht kommerziell zu nutzen macht hat nicht geholfen. Seit dem ist teamviewer für mich gestorben! 

Link to comment
58 minutes ago, vakilando said:

OK, etwas off topic... Aber dafür verwende ich mittlerweile Anydesk.

Yeap das gleiche bei mir. Anydesk ist bei mir das Backup System. Hauptsächlich setzte ich Zerotier/TightVNC ein.
Was ist den dann der Unterschied zwischen Anydesk und NoMachine?

 

P.S.: TightVNC hat keine Soundübertragung:
https://en.wikipedia.org/wiki/Comparison_of_remote_desktop_software

 

Link to comment

vielen Dank für die Unterstützung, jetzt habe ich erst einmal etwas zum suchen und drucharbeiten, da ja noch absoluter Neuling.

Zu der Frage wie habe ich die VM erstellt oder konfiguriert, hier mal meine Config

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>Windows 10</name>
  <uuid>7148c693-8e4c-4cb3-222e-ecce38873f39</uuid>
  <description>Windows 10 Unraid-VM</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>12582912</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-5.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/7148c693-8e4c-4cb3-222e-ecce38873f39_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='4' threads='1'/>
    <cache mode='passthrough'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disks/Storage 3/Windows 10/vdisk2.img'/>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:1f:ff:82'/>
      <source bridge='br0'/>
      <model type='virtio-net'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='de'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
</domain>

OK, dass mit der zweiten Festplatte hatte ich ja schon geschrieben, dass es nicht unbedingt notwendig ist denn ich kann ja freien Speicher einer nicht zugewiesenen Platte nutzen.

Ich bin sowieso dabei, alles was ich so an Verzeichnisse bei dem jeweiligen PC auf der zweiten Festplatte habe auszulagern auf den Unraid und dann kann ich von jedem PC drauf zugreifen, habe ich bisher eigentlich schon so auf meinem 2. Qnap. Auch diese beiden Qnaps möchte ich auf einen reduzieren der dann die Backups drauf hat, aber das ist ein anderes Thema.

 

Das mit dem NoMachine Vorschlag schaue ich mir mal an, kenne ich überhaupt noch nicht.

Mir geht es ja hauptsächlich darum das ich eine virtualisierte Oberfläche mit Windows habe mit der ich dann arbeiten kann so als wäre es mein Hauptsystem.

Denke später darüber nach, dass dann noch in einer zweiten VM zu machen, da ich ganz selten spiele, dass auch nur deshalb da meine etwas betagter i5 in einem zweiten Pc steckt der dann noch eine RX580 drin hat und ich den eben wenig einschalte.

Der steht eigentlich nur herum.

 

Nun weiter Anydesk, kenne ich nur vom Namen, dass ist soweit ich gelesen habe Fernwartungssoftware sollte wie ein RDP von Windows alles übertragen, oder.? Ist aber meistens etwas aufwendiger aufgebaut, aber ein Blick werde ich mal drauf haben.

 

TightVNC kenne ich von gaaanz früher, da bin ich mal in Berührung gekommen, aber habe ich nicht nie genutzt.

 

VM Backup werde ich mir mal installieren und schauen wie es funktioniert, man muss ja auch immer klar kommen damit.

So ich hoffe ich habe alles soweit beantwortet.

Dann werde ich jetzt mal NoMachine anschauen.

 

 

Link to comment

ich muss hier nochmal fragen, was hat das mit den user.script auf sich. Ich habe mir das VM Backup erstellt und wollte es haute mal ausprobieren, dass einzige was er erstellt ist ein Orner mit Log Dateien, aber keine Sicherung nun habe ich in den Einstellungen gesehen das dort wohl ein user.script rein muss, ist das richtig.?  ..und um weiter zu fragen wenn das drin ist dann erstellt er auch eine Sicherung..?

 

Aber ich weiß natürlich nicht was da rein muss, habe das noch nie gemacht. Ist das script nicht standardmäßig beim Plugin dabei..? 😧

Link to comment

Ok, ich lese mal darüber nur oft ist es so das ich gar nicht verstehe um was geht 😧

Ah ich sehe grad das ich auf dieser Seite schon war, weil ich eben ein script gesucht hatte (siehe unten)

 

Dazu hatte ich mir das script schon heraus geladen und angepasst, aber bitte mal nochmal meine Frage anschauen.

 

Aber als allgemeine Erklärung fehlt mir immer noch der Ansatz was es mit diesen User scripten auf sich hat.

Muss ich trotz das ich dieses Plugin einsetze in jedem Fall ein script nutzen..?

Denn wie oben geschrieben ich mache ein Backup und er macht weiter nicht wie einen log Ordner anlegen mit der eingestellten Menge an logs und das war es, eine Sicherugn gibt es nicht.

 

Ich bekomme immer eine Fehlermeldung wenn ich das script starte, aber so richtig versteh ich es eben nicht.

Ich habe das script von Github genommen und habe es "vm_backup" gennant, es dann editiert und als Fehler bekomme ich immer

official_script_name is vm_backup. script file's name is script. script name is invalid. exiting.

Was ist denn an dem script Namen nicht richtig, oder darf ich es nicht umbenennen.?

Edited by moonsorrox
Link to comment

Ich glaube ich habe jetzt ein wenig mehr verstanden, bitte berichtigen falls ich doch falsch liege.

Ich habe mir ein User script erstellt, welches "vm_backup" und folgenden Inhalt hat:

#!/bin/bash
#description=Backup meiner Virtualmaschinen
#foregroundOnly=true
backgroundOnly=true
arrayStarted=true
name=vm_backup
#argumentDescription=This is the description of the argument(s)
#argumentDefault=defaultArg1 defaultArg2 etc

wenn das soweit richtig ist bitte sagen, wenn etwas verändert werden sollte bitte mir schreiben. 😉

 

Diese Script startet dann eben mein vm_backup script welches ich in dem Plugin hinterlege, ict das richtig so.?

Das script habe ich aktuell vom 21.01.2020 von github genommen und für mich angepaßt, heißt die Pfade für mich erstellt.

Wenn ich diese ausführe

 

Der Konfigurationsteil ist glaube ich auch nur im oberen Teil anzupassen.

Das sieht dann bei mir so aus.

#!/bin/bash
#arrayStarted=true
#noParity=true

# v1.3.1 - 2020/01/21

#### DISCLAIMER ####
# Use at your own risk. This is a work-in-progress and provided as is.
# I have tested this on my own server, as best as I am able, but YMMV.
# -jtok


# what is the scripts' official name.
official_script_name="vm_backup"

# set the name of the script to a variable so it can be used.
me=$(basename "$0")


# this script copies unRAID vm's vdisks and their configurations to a specified location.


################################################## script variables start ######################################################

# default 0 but set the master switch to 1 if you want to enable the script otherwise it will not run.
enabled="0"

# backup location to put vdisks.
backup_location="/mnt/user/share/backup_folder/"
# backup_location="/mnt/disks/Storage 3/Backup/VM/Windows 10/vdisk1/vdisk1.img"
# backup_location="/mnt/disks/Storage 3/Backup/VM/Windows 10/vdisk2/vdisk2.img

# default is 0. backup all vms or use vms_to_backup.
# when set to 1, vms_to_backup will be used as an exclusion list.
backup_all_vms="1"

# list of vms that will be backed up separated by a new line.
# if backup_all_vms is set to 1, this will be used as a list of vms to exclude instead.
vms_to_backup="
Windows 10
"

# list of specific vdisks to be skipped separated by a new line. use the full path.
# NOTE: must match path in vm config file. remember this if you change the virtual disk path to enable snapshots.
vdisks_to_skip="
/mnt/user/domains/Windows 10/vdisk1.img
/mnt/user/domains/Windows 10/vdisk2.img
"

# list of specific vdisk extensions to be skipped separated by a new line. this replaces the old ignore_isos variable.
vdisk_extensions_to_skip="
iso
"

# default is 0. use snapshots to backup vms.
# NOTE: vms that are backed up using snapshots will not be shutdown. if a vm is already shutdown the default backup method will be used.
# NOTE: it is highly recommended that you install the qemu guest agent on your vms before using snapshots to ensure the integrity of your backups.
# WARNING: this will fail if the config path for the virtual disk is /mnt/user/. you must use /mnt/cache/ or /mnt/diskX/ for snapshots to work.
use_snapshots="0"

# default is 0. set this to 1 if you would like to kill a vm if it cant be shutdown cleanly.
kill_vm_if_cant_shutdown="0"

# default is 1. set this to 0 if you do not want a vm to be started if it was running before the backup started. Paused VMs will be left stopped.
set_vm_to_original_state="1"

# default is 0. set this to the number of days backups should be kept. 0 means indefinitely.
number_of_days_to_keep_backups="0"

# default is 0. set this to the number of backups that should be kept. 0 means infinitely.
# WARNING: If VM has multiple vdisks, then they must end in sequential numbers in order to be correctly backed up (i.e. vdisk1.img, vdisk2.img, etc.).
number_of_backups_to_keep="0"

# default is 0. set this to 1 if you would like to perform inline zstd compression.  This overrides the "compress_backups" and "compare_files" options.
inline_zstd_compress="0"

# default is 3. higher values may produce smaller archives but are slower and use more CPU.
zstd_level="3"

# default is 2. set this to the desired number of compression worker threads, or 0 to auto detect (i.e. use all)
zstd_threads="2"

# default is 0. set this to 1 if you would like to compress backups. This can add a significant amount of time to the backup process. uses tar.gz for sparse file compatibility.
# this is the legacy setting for compression.
# WARNING: do not turn on if you already have uncompressed backups. You will need to move or delete uncompressed backups before using. this will compress all config, nvram, and vdisk images in the backup directory into ONE tarball.
compress_backups="0"

# default is 1. set this to 0 if you would like to have backups without a timestamp. Timestamps are dropped only when number_of_backups_to_keep is equal to 1.
timestamp_files="1"


#### logging and notifications ####

# default is 1. set to 0 to have log file deleted after the backup has completed.
# NOTE: error logs are separate. settings for error logs can be found in the advanced variables.
keep_log_file="1"

# default is 1. number of successful log files to keep. 0 means infinitely.
number_of_log_files_to_keep="1"

# default is "logs". set to "" to put in root of backups folder. set to "logs/<subfolder>" to keep logs separate if running multiple versions of this script.
log_file_subfolder="logs"

# default is 0. create a vm specific log in each vm's subfolder using the same retention policy as the vm's backups.
enable_vm_log_file="0"

# default is 1. set to 0 to prevent notification system from being used. Script failures that occur before logging can start, and before this variable is validated will still be sent.
send_notifications="1"

# default is 0. set to 1 to receive more detailed notifications. will not work with send_notifications disabled or only_send_error_notifications enabled.
detailed_notifications="0"


#### advanced variables ####

# default is snap. extension used when creating snapshots.
# WARNING: do not choose an extension that is the same as one of your vdisks or the script will error out. cannot be blank.
snapshot_extension="snap"

# default is 0. fallback to standard backup if snapshot creation fails.
# NOTE: this will act as though use_snapshots was disabled for just the vm with the failed snapshot command.
snapshot_fallback="0"

# default is 0. pause vms instead of shutting them down during standard backups.
# WARNING: this could result in unusable backups, but I have not thoroughly tested.
pause_vms="0"

# list of vms that will be backed up WITHOUT first shutting down separated by a new line. these must also be listed in vms_to_backup.
# NOTE: vms backed up via snapshot will not be shutdown (see use_snapshots option).
# WARNING: using this setting can result in an unusable backup. not recommended.
vms_to_backup_running="
"

# default is 0. set to 1 to have reconstruct write (a.k.a. turbo write) enabled during the backup and then disabled after the backup completes.
# NOTE: may break auto functionality when it is implemented. do not use if reconstruct write is already enabled. backups may run faster with this enabled.
enable_reconstruct_write="0"

# default is 0. set this to 1 to compare files after copy and run rsync in the event of failure. could add significant amount of time depending on the size of vms.
compare_files="0"

# default is 1. set to 0 if you would like to skip backing up xml configuration files.
backup_xml="1"

# default is 1. set to 0 if you would like to skip backing up nvram files.
backup_nvram="1"

# default is 1. set to 0 if you would like to skip backing up vdisks. setting this to 0 will automatically disable compression.
backup_vdisks="1"

# default is 0. set this to 1 if you would like to start a vm after it has successfully been backed up. will override set_vm_to_original_state when set to 1.
start_vm_after_backup="0"

# default is 0. set this to 1 if you would like to start a vm after it has failed to have been backed up. will override set_vm_to_original_state when set to 1.
start_vm_after_failure="0"

# default is 0. set this to 1 to disable rsync delta syncs.
disable_delta_sync="0"

# default is 0. set this to 1 to always use rsync instead of cp.
# NOTE: rsync was significantly slower in my tests.
rsync_only="0"

# default is 1. set this to 0 if you would like to perform a dry-run backup.
# NOTE: dry run will not work unless rsync_only is set to 1. if this is set to 1 rsync_only will be set to 1.
actually_copy_files="1"

# default is 20. set this to the number of times you would like to check if a clean shutdown of a vm has been successful.
clean_shutdown_checks="20"

# default is 30. set this to the number of seconds to wait in between checks to see if a clean shutdown has been successful.
seconds_to_wait="30"

# default is 1. set to 0 to have error log files deleted after the backup has completed.
keep_error_log_file="1"

# default is 10. number of error log files to keep. 0 means infinitely.
number_of_error_log_files_to_keep="10"

# default is 0. set to 1 to only send error notifications.
only_send_error_notifications="0"

################################################## script variables end #########################################################

 

 

 

Wenn ich jetzt auf den Button Backup now drücke bekomme ich einen Fehler, er meckert mir den Namen an, was muss ich denn wo genau eintragen damit der Fehler nicht mehr kommt.? Aber er hat mir etwas an den Speicher Ort geschrieben und auch die vdisk.img hat er gemacht.

 

hier der Teil vom log mit dem Fehler:

2020-10-28 15:24:27 Starting VM Backup for vm_backup config.
2020-10-28 15:24:27 PID: 29618
2020-10-28 15:24:27 Pre-script copied to /tmp/vmbackup/scripts/vm_backup/pre-script.sh
2020-10-28 15:24:27 User script copied to /tmp/vmbackup/scripts/vm_backup/user-script.sh
2020-10-28 15:24:27 Running command: '/tmp/vmbackup/scripts/vm_backup/pre-script.sh' >> '/tmp/vmbackup/scripts/vm_backup/20201028_152427_user-script.log' 2>&1
2020-10-28 15:24:27 failure: official_script_name is vm_backup. script file's name is pre-script.sh. script name is invalid. exiting.
2020-10-28 15:24:27 Running command: '/tmp/vmbackup/scripts/vm_backup/user-script.sh' >> '/tmp/vmbackup/scripts/vm_backup/20201028_152427_user-script.log' 2>&1
2020-10-28 15:24:27 information: official_script_name is user-script.sh. script file's name is user-script.sh. script name is valid. continuing.

 

 

EDIT:// etwas weiter bin ich schon gekommen, aber er zeigt mir jetzt folgenden Fehler

2020-10-28 17:30:10 failure: enabled is 0. script is disabled. exiting.

 

Aber er macht mir das backup und schreibt auch die files an den angegebenen Ordner

Edited by moonsorrox
Link to comment

heute nun hat er das script ohne fehler ausgeführt keine Ahnung warum ich habe gestern nichts mehr verändert. Evtl hat er gestern den Fehler gezeigt weil ich es manuell gestartet habe..!!

 

Ich habe dazu jetzt noch Fragen, er macht das Backup ja nur, wenn die VM aus ist, richtig..?

Wie muss ich das denn machen wenn die VM läuft, denn ich möchte das Windows ja nutzen.

 

Kann man das einstellen das die VM erst runter gefahren wird und dann das Backup macht und vllt auch wieder die VM startet..?

Starten wäre nicht ganz so wichtig, das könnte ich manuell machen.

Link to comment
10 hours ago, moonsorrox said:

Ich habe dazu jetzt noch Fragen, er macht das Backup ja nur, wenn die VM aus ist, richtig..?

Nein, die VM wird standardmäßig beendet, dann wird das Backup gemacht, dann wird sie wieder gestartet.

Läuft die VM nicht, wird sie auch nach dem Backup nicht gestartet.

 

10 hours ago, moonsorrox said:

Kann man das einstellen das die VM erst runter gefahren wird und dann das Backup macht und vllt auch wieder die VM startet..?

Das ist der Standard.

Standardeinstellung ist, dass eine vor dem Backup gestartete VM auch wieder gestartet wird. Siehe:

# default is 1. set this to 0 if you do not want a vm to be started if it was running before the backup started. Paused VMs will be left stopped.
set_vm_to_original_state="1"

 

Allerdings, kann es sein, dass sich die VM nicht beenden lässt, weil ein Programm geöffnet ist. Dann wird kein Backup gemacht.

Es sei denn du hast eingestellt, dass die "getötet" werden soll, wenn sie sich nicht beenden lässt:

# default is 0. set this to 1 if you would like to kill a vm if it cant be shutdown cleanly.
kill_vm_if_cant_shutdown="1"

(der Wert für "kill_vm_if_cant_shutdown" ist standardmäßig = 0)

 

Das habe ich aber nie probiert.....ich wäre also vorsichtig damit und würde erst mal ein "sauberes" Backup im ausgeschaltetem Zustand machen.

Achte auch darauf, dass du mehrere Backupversionen behältst, sonst hast du am Ende nur das defekte..... 

Sinnvollerweise sollte man auch mal ein restore probieren, bevor man sich auf die Ganze Chose verlässt...!

Link to comment

ich weiß jetzt nicht ob ich verkehrt bin, wenn ich unter "Settings > Scheduler > Fixed Schedules" gehe habe ich nur die Paritätsprüfung, Mover Einstellungen und SSD Trim.

Sollte da noch das Backup für die VMs auftauchen..?

 

Wenn aber die Einstellungen in der VM gemeint sind da habe ich

Backup Frequency: Weekly

Day of the Week: Sunday

Day of the Month: 01 8ausgegraut)

Hour: 01

Minute: 20

Custom Cron: leer

 

Heute nacht hat er mir auch wieder einen Fehler angezeigt, da war ich noch am PC und ich denke es hängt damit zusammen das der Server sich irgendwann schlafen legt, oder kann das nicht sein.?

 

Der ganze Backup Kram kommt mir etwas supekt vor... in der Woche macht er Updates irgendwann und wenn er es machen soll zeigt er einen Fehler.

In dem Backup Ordner habe ich stand heute 4 Sicherungen drin..!!

Keine Ahnung was ich da noch einstellen soll.

 

Ich hänge mal einen Screenshot ran

vm_backup.png

Link to comment

Ah, ok, du nutzt also das Plugin? Ich dachte du nutzt das Script...

Ich habe anfangs das Script von JTok genutzt als es sein Plugin noch nicht gab.

Als JTok dann das Plugin entwickelt hat, bin ich auf das Plugin umgestiegen.

jetzt wirds etwas kompliziert....:

Da das Backup über die Plugin Schedule Einstellungen irgendwann nicht mehr funktioniert hat, habe ich die Schedule Einstellungen auf Disabled gesetzt und starte das Backup über üser.scripts... Etwas kompliziert aber so funktionierts jetzt.

 

So sieht es bei mir aus:

Plugin-Einstellungen:

284223303_2020-11-0113_58.23192_168.1.2229671c7ecee0d.thumb.png.7d4b6a920eff4742a743c6383b5188d3.png

 

User.scripts Einstellungen:

1089077087_2020-11-0113_59.16192_168.1.22255254dc32fc3.thumb.png.17468099bd627371c03699e5678b30a5.png

 

das Script selbst:

#!/bin/bash
#arrayStarted=true
### Cron Eintrag unter /var/spool/cron/crontabs/root fuer JTok VMBackup Plugin funktioniert nach reboot nicht!
### Es wird durch reboot veraendert... Siehe https://forums.unraid.net/topic/86303-vm-backup-plugin/page/6/

virsh shutdown Linux-Mint
sleep 3m
/usr/local/emhttp/plugins/vmbackup/runscript.php run_backup Linux-Mint-Lucifer > /dev/null 2>&1
sleep 2h
virsh start Linux-Mint

ach ja, die virsh Befehle stehen da weil die Linux Maschine irgendwie nicht immer runtergefahren wurde und dadurch gabs dann kein Backup. Ansich wird nur die Zeile "/usr/local/...." benötigt.

 

  • Like 1
Link to comment

das muss ich mir jetzt erst einmal anschauen, denn mit den Script Geschichten stehe ich noch auf Kriegsfuß, das habe ich noch nicht richtig verstanden.

Mein Script für das VM Backup sieht nämlich ganz anders aus, ich hänge es mal als text Datei ran. Das Script hatte ich vom Github von ihm geholt und nur im oberen Teil angepaßt.

Sicher steht da irgendwo drin das er es täglich machen soll, ich habe es jetzt mal auf disabled gestellt so wie es bei dir ist.

 

Ich habe mit diesen Scripten noch so meine Probleme evtl. braucht es ja gar nicht so ein riesen Script wie meines, vllt reichen da auch die Zeilen von dir aus.

Ich werde mich da nochmal ran machen, denn er schreibt bei mir ja jede Menge Backup Files jeden Tag.

vmBackup_script.txt

Link to comment

Mal ne andere Frage: Lief eure Windows VM auch schon ohne Grafikkarte flüssig?

Meine ruckelt sich einen zurecht beim verschieben von z.B. einem Explorer Fenster und ich habe schon "Inhalt während Bewegung anzeigen" auf aus...

Mag natürlich auch an demXeon liegen (nur AVX1 usw.)

 

Wie sind da so die Erfahrungen?

 

Gruß

Dark

Link to comment

Ich habe ein neues script erstellt nach deinem Muster und es hat folgende Zeilen:

#!/bin/bash
#arrayStarted=true

/usr/local/emhttp/plugins/vmbackup/runscript.php run_backup Windows 10 > /dev/null 2>&1

ich hatte das obige/angehängte script auch als pre-script eingetragen, muss ich das evtl. wieder so machen, weil dieses jetzt erstellte in der Liste nicht auftaucht...

Edited by moonsorrox
Link to comment

Wegen deines Screenshots nehme ich an du verwendest das Plugin (wie ich auch).

Mein Script startet nur die Config, die ich im Plugin vornehme.

 

Dein neues Script hat einen Fehler:

Du musst den Namen eintragen der unter "current editing config" steht.

Also bei dir "vm_backup" und nicht den Namen der VM "Windows 10".

 

Schau dir mein Screenshot an:

  • current editing config = Linux-Mint-Lucifer
  • List VMs to backup = Linux Mint

Schau dir mein Script an:

  • Script: /usr/local/emhttp/plugins/vmbackup/runscript.php run_backup Linux-Mint-Lucifer > /dev/null 2>&1

 

Dein Script sollte sein:

  • /usr/local/emhttp/plugins/vmbackup/runscript.php run_backup vm_backup > /dev/null 2>&1

 

Hinweis:

Ich weiß nicht wie das Script Leerzeichen bzw. Unterstriche interpretiert, daher habe ich Bindestriche verwendet im Namen für "current editing config"

Link to comment

Ja ich hatte es mir gestern nochmals angeschaut und habe da ein wenig gebastelt 😉

 

Ich hatte mir deins noch mal angeschaut und festgestellt das ich dieses nicht angeboten bekam unter "current editing config" da stand vorher "vm_backup" drin und das neue ist dort nicht aufgetaucht.

Ich habe dann gefunden das man unter "Manage Configs" erst einmal das script von mir "Choose a config name:" eintragen muss,

dann taucht es auch unter "current editing config" auf und heißt bei mir

  •  vm_backup_windows_10 

Siehe Screenshot

Dann habe ich dort eingetragen:

#!/bin/bash
#arrayStarted=true

/usr/local/emhttp/plugins/vmbackup/runscript.php run_backup Windows 10 > /dev/null 2>&1

ich habe dann einmal das Backup mnauell ausgeführt und es wurde gemacht. Hatte da noch einen Fehler drin, er hat etwas in rot eingetragen das werde ich mir nochmal anschauen, zumindest habe ich erst einmal ein laufendes Backup

vm_backup_neu.png

vm_script.png

Edited by moonsorrox
Link to comment
  • ich777 changed the title to [SOLVED] Fragen zur VM mit Windows

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.