Repair a virtual machine?

I had a working virtual machine, and then reinstalled tumbleweed.

Most data was not on the tumbleweed disk, but on another harddisk. sdb5

Tumbleweed/ home did have a folder, related to the virtual machine.
Of course that folder is gone now.(because I formatted the nvme disk)

Can this be fixed ?

guus@localhost:~> lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931,5G  0 disk 
├─sda1        8:1    0   529M  0 part 
├─sda2        8:2    0    99M  0 part 
├─sda3        8:3    0    16M  0 part 
└─sda4        8:4    0 930,9G  0 part 
sdb           8:16   0 931,5G  0 disk 
├─sdb1        8:17   0   512M  0 part 
├─sdb2        8:18   0  48,8G  0 part 
├─sdb3        8:19   0 800,8G  0 part 
├─sdb4        8:20   0     2G  0 part [SWAP]
└─sdb5        8:21   0  79,4G  0 part /run/media/guus/b9cf1de0-e38d-46a4-ba88-08665ca8d340
nvme0n1     259:0    0 931,5G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
└─nvme0n1p2 259:2    0   931G  0 part /usr/local
                                      /var
                                      /opt
                                      /srv
                                      /home
                                      /root
                                      /boot/grub2/x86_64-efi
                                      /boot/grub2/i386-pc
                                      /.snapshots
                                      /
guus@localhost:~> 

sda = windows disk, but is unrelated tot the virtual machine.
sdb is for the most part a Leap install

Yes, restore it from the recent backup of /home you made.

1 Like

If you don’t have backup of the VM, you can recreate the VM pointing the VM to use the old virtual disk, if you still have them.

1 Like

I a m trying but get an error something about qemu, owning the file.

Then had a look at fstab.

guus@localhost:/etc> cat fstab
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /                       btrfs  defaults                      0  0
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /var                    btrfs  subvol=/@/var                 0  0
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /root                   btrfs  subvol=/@/root                0  0
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /home                   btrfs  subvol=/@/home                0  0
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=9f94c7ef-ce94-4d99-8ebd-187f0d37b0e1  swap                    swap   defaults                      0  0
UUID=428e766a-4e37-4b48-9f7c-d2e7a8776611  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
UUID=189D-5D3D                             /boot/efi               vfat   utf8                          0  2
guus@localhost:/etc> 

There is something missing. :slight_smile:
Going to search for an old topic of mine, see what I need to add in there.
Then create a folder, which if I recall right, will be the mount point, fingers crossed.

When I try to create a new virtual machine , I am getting an message from the installer.

The emulator might not hane rights for the path ´/run /media/guus …Win 1021H1-dutch-x64.iso

I am lost, this is the iso I used before.

Its on a different harddisk, then the tumbleweed install.

Maybe I need to format, to clear out any history?

It seems like a permission issue. The virtualization runs with its own user, you have to configure permissions appropriately.

It looks like qemu owns the files.

I am probably gonna reformat that hard disk.

Not sure if I then later will install leap again.

200 gig for windows and the virtual machine, should be enough.
Then maybe two ext 4 partitions.

As we type I have two partitions, for the virtual machine.
There is some history, and there does not seem to be simple fix, with a Gparted usb, I have.

I made a bit of progress.

(although leap no longer starts, but that something for later, I probably know how to fix this.)

At least i now have one partition, sdb2, instead of two, for my virtual machine.

guus@localhost:~> lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931,5G  0 disk 
├─sda1        8:1    0   529M  0 part 
├─sda2        8:2    0    99M  0 part 
├─sda3        8:3    0    16M  0 part 
└─sda4        8:4    0 930,9G  0 part 
sdb           8:16   0 931,5G  0 disk 
├─sdb1        8:17   0   512M  0 part 
├─sdb2        8:18   0 128,2G  0 part /run/media/guus/7759207d-abda-421b-9492-4709e7909b72
├─sdb3        8:19   0 800,8G  0 part /run/media/guus/64d5c6b8-8098-497b-b56a-beb464958102
└─sdb4        8:20   0     2G  0 part [SWAP]
nvme0n1     259:0    0 931,5G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
└─nvme0n1p2 259:2    0   931G  0 part /var
                                      /usr/local
                                      /srv
                                      /root
                                      /opt
                                      /home
                                      /boot/grub2/x86_64-efi
                                      /boot/grub2/i386-pc
                                      /.snapshots
                                      /
guus@localhost:~> 

sdb2 is were I want to copy the win10 iso, but when I look under rights its root root.

How to change this to guus users?

chmod something ?

Need to do some more reading, there is also chown, and fstab.

Now what do I need for what I want? I do remember some parts, like that I need to be careful with fstab.

I think that the partition now gets mounted by root.

Its a puzzle, but I will get there. :slight_smile:

Dolphin keeps showing me a virtual machine, how do I get rit of that ?

format the partition sdb2 ?

guus@localhost:~> lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931,5G  0 disk 
├─sda1        8:1    0   529M  0 part 
├─sda2        8:2    0    99M  0 part 
├─sda3        8:3    0    16M  0 part 
└─sda4        8:4    0 930,9G  0 part 
sdb           8:16   0 931,5G  0 disk 
├─sdb1        8:17   0   512M  0 part 
├─sdb2        8:18   0 128,2G  0 part /run/media/guus/7759207d-abda-421b-9492-4709e7909b72
├─sdb3        8:19   0 800,8G  0 part 
└─sdb4        8:20   0     2G  0 part [SWAP]
nvme0n1     259:0    0 931,5G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
└─nvme0n1p2 259:2    0   931G  0 part /usr/local
                                      /srv
                                      /var
                                      /root
                                      /boot/grub2/x86_64-efi
                                      /opt
                                      /home
                                      /boot/grub2/i386-pc
                                      /.snapshots
                                      /
guus@localhost:~> 

Could you explain this better?

When I use dolphin, bottom left side of the window, there are the disks it sees.

There are 3 hardisk, which should show there but…
There is also a vm, the one I a m trying to get rid of.

Please send a screenshot.

Left side screen, were all disk are listed.

That’s just a partition labelled as VM on some internal storage device. You can use YaST Partitioner to manage it.

Thank you, then I might be closer to were I want to be.
Right now its way too small, but maybe this will work, because in the install of win 10, I will get asked about were I want to install win10.

I probably then can do the windows install in a partition a bit over 100 gig.

I think I know what to do.

Make a mount point (as a normal user)

Then edit fstab to mount the partition, were I am gonna install win10 in the virtual machine. So probably should format that partition as ntfs, but first I need to make sure, I can point to that partition when installing the vm.
Right now I can’t. :slight_smile:

First lets make a back up of the fstab file.

I am stuck but lets start positive.

I made a mount point and from dolphin I can access /dev/sdb2, without typing the root password.

I do not seem to be able though to use this for the virtual machine I try to install.
The installer wont let me point to /dev/sdb2. :thinking:

guus@localhost:~> LANG=C lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk 
|-sda1        8:1    0   529M  0 part 
|-sda2        8:2    0    99M  0 part 
|-sda3        8:3    0    16M  0 part 
`-sda4        8:4    0 930.9G  0 part 
sdb           8:16   0 931.5G  0 disk 
|-sdb1        8:17   0   512M  0 part 
|-sdb2        8:18   0 128.2G  0 part /home/guus/mountsdb2
|-sdb3        8:19   0 800.8G  0 part 
`-sdb4        8:20   0     2G  0 part [SWAP]
nvme0n1     259:0    0 931.5G  0 disk 
|-nvme0n1p1 259:1    0   512M  0 part /boot/efi
`-nvme0n1p2 259:2    0   931G  0 part /var
                                     /usr/local
                                     /root
                                     /boot/grub2/x86_64-efi
                                     /srv
                                     /opt
                                     /home
                                     /boot/grub2/i386-pc
                                     /.snapshots
                                     /
guus@localhost:~> 

Baby steps forward, but now I get this error when trying to make a new virtual machine:

cannot open directory ‘/var/lib/libvirt/images’:

I do understand that message, but don’t have a clue on how to fix this.

it must be related to this:
The last lines are about a virtual machine.

guus@localhost:~> LANG=C sudo rpm --verify --all
[sudo] password for root: 
.M.......  g /var/lib/power-profiles-daemon
missing     /var/cache/libx11/compose/l4_030_313cb605_00280cc0
.M.......  g /opt
.M.......  g /var/log/alternatives.log
WARNING: `chkstat` has been renamed to `permctl`.
.M.......    /var/lib/ca-certificates
.M.......  g /run/certmonger
.M.......    /var/lib/ca-certificates
.M.......  g /run/netns
.M.......  g /etc/xml/catalog-d.xml
....L....  d /usr/share/man/man1/ctags.1.gz
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
......G.P    /usr/bin/newgidmap
......G.P    /usr/bin/newuidmap
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
....L....  d /usr/share/man/man1/ftp.1.gz
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
.M.......  g /var/lib/wtmpdb
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
..5....T.  c /etc/pki/nssdb/cert9.db
..5....T.  c /etc/pki/nssdb/key4.db
.......T.  c /etc/pki/nssdb/pkcs11.txt
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
.M.......  g /run/ostree
WARNING: `chkstat` has been renamed to `permctl`.
.M.......  g /run/mcelog
S.5....T.  c /etc/speech-dispatcher/speechd.conf
S.5....T.  c /etc/chrony.d/pool.conf
.M.......  g /var/lib/chrony/drift
.M.......  g /run/avahi-daemon
.M.......  g /etc/aliases.lmdb
S.5....T.  c /etc/postfix/main.cf
S.5....T.  c /etc/postfix/master.cf
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
S.5....T.  c /etc/fonts/conf.d/10-rendering-options.conf
S.5....T.  c /etc/fonts/conf.d/58-family-prefer-local.conf
.M.......  g /usr/share/fonts/misc/encodings.dir
.M.......  g /usr/share/fonts/misc/fonts.scale
......G..    /etc/cups/ssl
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
.M.......  g /usr/share/fonts/Type1/encodings.dir
.M.......  g /usr/share/fonts/cyrillic/encodings.dir
.M.......  g /usr/share/fonts/cyrillic/fonts.scale
.M.......  g /usr/share/fonts/truetype/encodings.dir
.M.......  g /usr/share/fonts/100dpi/encodings.dir
.M.......  g /usr/share/fonts/100dpi/fonts.scale
.M.......  g /usr/share/fonts/75dpi/encodings.dir
.M.......  g /usr/share/fonts/75dpi/fonts.scale
.M.......  g /var/lib/flatpak
.M.......  g /var/lib/plymouth/boot-duration
.M.......  g /var/log/boot.log
........P    /usr/libexec/ksysguard/ksgrd_network_helper
WARNING: `chkstat` has been renamed to `permctl`.
missing     /var/lib/os-prober
S.5....T.  c /etc/default/grub
.M.......  g /run/media
missing     /var/adm/autoinstall
missing     /var/adm/autoinstall/cache
missing     /var/adm/autoinstall/files
missing     /var/adm/autoinstall/init.d
missing     /var/adm/autoinstall/logs
missing     /var/adm/autoinstall/scripts
missing     /var/lib/autoinstall
missing     /var/lib/autoinstall/autoconf
.M.......  g /var/cache/PackageKit
missing     /usr/lib64/libreoffice/program/intro-highres.png
missing     /usr/lib64/libreoffice/program/shell/logo.svg
missing     /usr/lib64/libreoffice/program/shell/logo_inverted.svg
WARNING: `chkstat` has been renamed to `permctl`.
S.5....T.  c /var/lib/unbound/root.key
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
.M.......  g /etc/iscsi/initiatorname.iscsi
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
WARNING: `chkstat` has been renamed to `permctl`.
missing     /var/lib/libvirt/boot
missing     /var/lib/libvirt/filesystems
missing     /var/lib/libvirt/images
missing     /var/log/libvirt
WARNING: `chkstat` has been renamed to `permctl`.
missing     /var/lib/libvirt/dnsmasq
missing     /var/lib/libvirt/network
missing     /var/lib/libvirt/swtpm
missing     /var/log/libvirt/qemu
missing     /var/log/swtpm
missing     /var/log/swtpm/libvirt
missing     /var/log/swtpm/libvirt/qemu
guus@localhost:~>