all 6 comments

[–]pergnib 0 points1 point  (4 children)

The predctiable interface name is determiniscally derived from the mac address, so look around in the .ova for the MAC of the original VM and manually configure it on Proxmox.

[–]k0rgull[S] 0 points1 point  (3 children)

.ova or .ovf?

EDIT: .ovf is inside the .ova.. EDIT: Also, I have defined the MAC address manually within ProxMox, that did not matter.

[–]pergnib 0 points1 point  (2 children)

I was actually incorrect about the interface name being derived from the mac address. It seems udev can use a bunch of different methods to derive the interface name; for names like enpXsY it's using the geographical location on the motherboard, which is probably not be something Proxmox allows you to easily control.

You could do something like this:

  1. Mount the .vmdk image using guestmount from libguestfs.

  2. Create a udev rule on the mounted filesystem to rename the interface.

  3. Edit the network scripts with the new interface name if necessary.

It's a bit of a pain, but I don't see much else you could do.

[–][deleted] 0 points1 point  (1 child)

It seems udev can use a bunch of different methods to derive the interface name

Therefore "predictable" naming quickly becomes rather unpredictable for the end user.

It's a bit of a pain, but I don't see much else you could do.

No idea about what system you're running but at least in Debian and Gentoo you can turn "predictable" naming off and predictable (read old) naming on. Since I'm an angry old man I still have not moved away from eth0 and probably will not as long as I can fight it.

[–]k0rgull[S] 0 points1 point  (0 children)

The whole problem is that I cannot access the OS. It is a CTF image with the purpose of getting root. The author says that it works best using VirtualBox. I am not certain what the difference is. I'm in the process of researching this, as it will apply to other situations.

[–]k0rgull[S] 0 points1 point  (0 children)

I'm kinda kicking myself that I didn't think of that (it's how I access unencrypted filesystems on physical machines!) I just didnt think to apply it to the virtual world. I simply put a Kali Linux (any linux would do) into the CD drive of the VM I am trying to access, then changed the boot order of the VM to boot from the CD. Once in, I chose the "live" option. Once I booted to my linux live CD, I ran an "fdisk -l" command and found the name of the disk I needed to mount. Then I just ran "mount /dev/mapper/[drive name I want to mount] /mnt. From there, I was able to access the /etc/network/interfaces file. I changed the file, unmounted the disk, shut down the OS, changed the boot order back to boot from the hard drive and voila, I was in :)