Edit VMX file with vSphere Client - virtual-machine

i'm looking for a correct solution to editing VMX file via vSphere clinet without need to SSH to ESX host or using VI and Nano
could anybody please help me??

#Hwoosuk The best way , those i have to use with Vmware, is to get Winscp http://winscp.net and connect it directly to the esxi IP console after enable SSH in the Vmware Firewall (configure/soft/security profile) , you can browse all the local esxi Disk or VMFS on you SAN/NAS. Edit Whatever you want carefully , your log etc.., your Vmxf (no write or edit permit by vmware if the VM is power on).So this is the best way to go inside the vmware file system for reading the low-level subsystem. Enjoy Winscp for any linux serveur you may use in your life with an micro$ computer you may use for admin your datacenter. In the winscp menu go to options/pref and paste the directory where you have Putty installed.(%PROGRAMFILES%\PuTTY\putty.exe). Retain #mister_potato_head solution to do it safely as vmware imposes it , in most case this is the better thing you have to do. :)

The VMX file is generated by vSphere, it you add a new NIC using GUI the vmx file will get updated to reflect this. With this in mind you can use any method to issue commands to edit VM configuration and therefore the vmx file.
Alternately if you would like to edit the VMX file directly you can use PowerCLI as described here

Related

Can I run one WSL2 virtual machine instance on two system?

I'm new to the WSL2 and wondering if it's possible to run the same WSL2 ubuntu instance on both my desktop and laptop.
Now I am able to use wsl --export and wsl --import method to save and load the system to/from my portable hard drive. But these methods takes a long time.
I notice that wsl --import load a file named ext4.vhdx. Is there a way to load straightly from this file?
Update v2.0:
I was able to get a workaround and it works great.
Thanks to Booting from vhdx here, I was able to load straightly from my vhdx file on my portable hard disk. Windows track down its subsystem with regedit, So we can write our own(p.s: make sure to get BasePath right, it starts with "\\\\?", or you will not be able to access the subsystem' filesystem on your host system.):
Windows Registry Editor Version 5.00
[HKEY_USERS\【your SID here】\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\{【UUID here】}]
"State"=dword:00000001
"DistributionName"="distribution name"
"Version"=dword:00000002
"BasePath"="vhdx folder path" 【 e.g. "\\\\?\\E:\\S061\\WSL\\ubuntu-20"】
"Flags"=dword:0000000f
"DefaultUid"=dword:000003e8
I suppose the best way to do this would be to store ext4.vhd on a network storage device accessible to both devices.
I have previosly mentioned how to move ext4.vhd. You can check that out here
Basically you need to export from one machine and import it while making sure the vhd file is configured for wsl to access from the network storage
Since this should *officially* not supported expect some performance hits
Another way would be to run WSL on one computer and ssh/remote desktop to it from another device on the network
I'm of the strong belief that sharing the same ext4 vhd between two VM's simultaneously would be a bad idea. See this and this Unix & Linux StackExchange, including the part about ...
note that sharing LVs/partitions on a single disk between the servers at the same time is NOT very safe. You should only access whole disks from any of the servers at one time.
However, as dopewind's answer mentioned, you can access the WSL instance on one computer (probably the desktop) from another (e.g. the laptop). There are several techniques you can use:
If you have Windows 10 Professional or Enterprise on one of the computers, you can enable Remote Desktop, which allows you to access pretty much everything on one computer from another. RDP ("Remote Desktop Protocol") even works from other devices such as an iPad or Android tablet (or even a phone, although that's a bit of a small screen for a "desktop"). That said, there are better, more idiomatic solutions for WSL ...
You could enable SSH server on the Windows 10 computer with the WSL instance (instructions). This may sound counterintuitive to some people, since Linux itself running in the WSL instance also includes an SSH server (by default). But by SSH'ing from (for example) your laptop into your desktop's Windows 10, you can then launch any WSL instance you have installed (if you choose to install more than one) via wsl -d <distroName>. You also avoid a lot of the network unpleasantness in the next option ...
You could, as mentioned above, enable SSH on the WSL instance (usually something like sudo service ssh start) and then ssh directly into it. However, note that WSL2 instances are NAT'd, so there's a whole lot more hackery that you have to do to get access to the network interface. There's a whole huge thread on the WSL Github about it. Personally, I'd recommend the "Windows SSH Server" option mentioned about to start out with, then you can worry about direct SSH access later if you need it.
Side note: Even though I have SSH enabled on my WSL instances, I still use Windows SSH to proxy to them, to avoid these networking issues.

How to load package to openwrt in virtualbox

I have created an image of OpenWRT(x86-64) which I am running on Virtualbox. I have created a custom package and build it for my Virtual Machine. The thing is that I can not figure out how to copy the package file to the virtual machine's disk space.
I tried using using Guest Additions for Virtualbox but I think OpenWRT does not support it because I can not mount the file to install Guest Additions.
Is there any other way or am I doing something wrong?
To answer my own question, you can use Secure Copy (scp) to transfer your files.
Here is the link. SCP Example
SCP uses ssh to transfer files. Make sure that you have root password enabled in your remote host as this is needed to make a connection.
I hope that this may help someone in the future.

How to enable copy paste from between host machine and virtual machine in vmware, virtual machine is ubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am trying to copy and paste from my pc to the vm but i cant.
I also enable copy and paste but i still can't copy and paste from my pc to the vm. My pc runs windows 8.1 my vm has fedora.
You need to install VMware Tools on your vm:
To install VMware Tools in most VMware products:
Power on the virtual machine.
Log in to the virtual machine using an account with Administrator or root privileges.
Wait for the desktop to load and be ready.
Click Install/Upgrade VMware Tools. There are two places to find this option:
Right-click on the running virtual machine object and choose
Install/Upgrade VMware Tools.
Right-click on the running virtual
machine object and click Open Console. In the Console menu click VM
and click Install/Upgrade VMware Tools.
Note: In ESX/ESXi 4.x, navigate to VM > Guest > Install/Upgrade
VMware Tools. In Workstation, navigate to VM > Install/Upgrade VMware
Tools.
[...]
Source: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1014294
This worked for me. Might want to try editing virtual machine settings:
Here is a small hint that I hope might be useful to other poor saps that experienced the same issue as I did.
My Setup:
Host: Windows 7 Enterprise - build 7601 SP 1
VM: VMware® Workstation 12 Player 12.1.1 build-3770994 (free)
Guest: Fedora release 23
I naively failed to install open-vm-tools-desktop. I say naively because I had no idea such a thing existed, nor do I understand why instructions to install open-vm-tools do not (or at least where I read them, do not) include mentions of this package.
Installing open-vm-tools on its own appears to be nearly useless - the desktop package makes the copy and paste function - probably the single most important function of VMTools - work.
So, there you go. Install open-vm-tools-desktop, and copy-paste should work
If your VM already came with VMware Tools pre-installed, but this still isn't working for you--or if you install and still no luck--make sure you run Workstation or Player as Administrator. That fixed the issue for me.
here is another solution I started using after being fed up with the copy and paste issue:
Download MRemote (for pc). this is an alternative to remote desktop manager. You can use remote desktop manager if you like.
Change the VMNet settings to NAT or add another VMNet and set it to NAT.
Configure the vm ip address with an ip in the same network as you host machine. if you want to keep networks separated use a second vmnet and set it's ip address in the same network as the host. that's what I use.
Enable RDP connections on the guest (I only use windows guests)
Create a batch file with this command. add your guest machines:
vmrun start D:\VM\MySuperVM1\vm1.vmx nogui
vmrun start D:\VM\MySuperVM2\vm2.vmx nogui
save the file to startmyvms.cmd
create another batch file and add your vms
vmrun stop D:\VM\MySuperVM1\vm1.vmx nogui
vmrun stop D:\VM\MySuperVM2\vm2.vmx nogui
save the file to stopmyvms.cmd
Open Mremote go to tools => External tools
Add external tool => filename will be the startmyvms.cmd file
Add external tool => filename will be the stopmyvms.cmd file
So to start working with your vms:
Create you connections to your VMs in mremote
Now to work with your vm
1. You open mremote
2. You go to tools => external tools
3. You click the startmyvms tool
when you're done
1. You go to tools => external tools
2. You click the stopmyvms external tool
you could add the vmrun start on the connection setting => external tool before connection
and add the vmrun stop in the connection settings => external tool after
Voilà !
Are you talking about drag and drop, when you say copy and paste?
If yes, you can also use Rightclick on object on your main computer and click copy. And then you go into the Virtual Machine and Rightclick the position where you want the file to get copied to.
If this doesn't work use the method KaiserM11 explained and get yourselfe VMware Tools like in this Video: https://www.youtube.com/watch?v=McjwI_6BKZY
Hope my answer was helpfull to you and happy coding :D
the mremote option offers more automation and almost replicates the vmware workstation graphical experience plus major benefits:
NO DPI (guest resolution) hassle
no copy pose hassle
Automation = starting vms and suspending them automatically
plus more if you look deeper
You need to install some packages such as Unlocker, GuestOSx, etc.

Working on remote server

My OS: Windows 8
Virtualbox guest: Ubuntu 12.10 server
I configured apache server on vbox guest and mapped http, https, ssh port successfully into ubuntu server. It works nice without any problem.
I tried several IDEs like PHPStorm, Netbeans, editors like Sublime, all they do is to copy whole project from server, edit on local machine then sync back.
But it is not what I need. I want to work directly on guest server using ssh/sftp connection. I know that notepad++ has this functionality but I love sublime look and feel.
Is there any way to work on guest server with sublime or any other ide for free? (There is sftp solution but it's paid and works just like other ide's, not directly on guest machine) Any suggestions?
There are two approaches you can choose from, you will probably select the second one:
Use the KDE desktop environment (yes, it also exists for MS Windows). It features so called 'kio-slaves' which allow to use any protocol out there as if you were doing local file system operations. That means when using a KDE editor like 'kate' or even a whole IDE like 'kdevelop4' you can simply say "open file/project" and not only choose a local file, but something like sftp://server/path/file and start working. The network stuff is handled transparently by the environment, it is fully network transparent. This is how systems should be like. I think the GNOME environment had something similar, but it probably has been removed with version 3 of GNOME.
You can 'mount' the guests file system into your MS-Windows file system. not sure about the details how this works in MS-Windows, but I am sure that at least newer versions of MS-Windows have gained such feature. Most likely you are still limited to creating something like a "network harddrive" or something, in other systems (linux, unix, macOS) you can mount whereever in the file system you like. You can use any protocol for this, as long as it is supported by the mounting tools of your local system.
Again two options:
2.a You mount the whole virtual disk. Easy, but might be a problem if that disk is currently used by the guest system.
2.b You export the virtual disk by starting some server in the virtual system: samba is most likely your choice. Then you can mount that smb file export inside your MS-Windows system and start hacking.
Have fun!

dokan sshfs for windows

I read an article here about dokan sshfs for windows. I want to ask if you know similar software (free or not) in order to access windows partitions from windows. Samba is a always an answer, however I am seeking for something more secure.
You can use the Dokan SSHFS client with the OpenSSH server for Windows, you can configure OpenSSH like you would on UNIX, then use the Dokan SSH client to connect remotely, just as you would do on UNIX with sshfs.
When you say Samba, so you mean SMB? Samba is the *NIX client/server for SMB.
SSHFS for accessing Windows partitions from Windows ? Did you by any chance mean Linux partitions from windows ?
If windows-windows, then sorry, no. sshfs is a Linux/Unix feature, and microsoft does all it can to NOT make it work on Windows (after all, that would allow to easily and securely migrate from Windows to Linux). On Windows, you use WebDAV to accomplish similar things, needless to say WebDAV is way more insecure than sshfs.
If you meant accessing remote Linux partitions from Windows, then I had the same problem before:
Dokan doesn't work, at least not on Vista x64. (epic bluescreen crash)
The java sshfs explorer on sourceforge doesn't work, either.
Microsoft's services for unix (including sshfs) are only available on Vista 'Ultimate', not on < Ultimate, like my Vista business for example.
There are some commercial solutions, but first, they are way overpriced, and second, I wouldn't trust them, since they don't offer evaluation.
My solution was to install VirtualBox on Windows, and install an Ubuntu guest on it, mounting the host's C drive. You need to set the VirtualBox network adapter to bridged mode to make sshfs work with virtualization. I'm sorry, but so far that's the only free solution that really works...
imdisk driver, see if http://www.ltr-data.se/opencode.html helps.
From the documentation
It is even possible to boot a machine
with NTFS partitions using a Unix
Live-CD and use the included devio
tool to let ImDisk on another computer
running Windows on the network mount
the NTFS partition on the machine you
booted with the Unix Live-CD. This way
you can recover information and even
run chkdsk on drives on machines where
Windows does not boot.
I've been using Win SSHFS for awhile, is this what you're looking for?
https://github.com/Foreveryone-cz/win-sshfs/
It runs on top of Dokany